74 lines
2.7 KiB
Plaintext
74 lines
2.7 KiB
Plaintext
include mixins
|
|
|
|
form(class="form-horizontal subroot", role="form", id="form", method="POST", action="#{keep_in_mind_href}/commit")
|
|
.new_flex_zero(style="margin-bottom: 20px;")
|
|
.container-fluid
|
|
button(class="btn btn-success btn-sm", type="submit")
|
|
span(class="glyphicon glyphicon-ok", aria-hidden="true")
|
|
span
|
|
span Übernehmen
|
|
|
|
+messageview(messages.other)
|
|
|
|
.new_flex_one
|
|
.container-fluid
|
|
|
|
.form-group
|
|
label(for='edit_kontext', class="col-sm-2 control-label") Kontext
|
|
.col-sm-10
|
|
.input-group
|
|
input(id="edit_kontext_dn", type="hidden", name="punit_dn", value="#{keep_in_mind.punit.dn}")
|
|
input(id="edit_kontext", type="text", name="punit_name", class="form-control", value="#{keep_in_mind.punit.name}", readonly)
|
|
span(class="input-group-btn")
|
|
button(class="btn btn-default", type="button", onclick="save_and_goto('select_pastoralunit', {})") Ändern
|
|
|
|
.form-group
|
|
label(for='edit_name', class="col-sm-2 control-label") Kurzbeschreibung
|
|
.col-sm-10
|
|
input(id='edit_name', type="text", class="form-control noEnterSubmit", name="edit_name", value="#{keep_in_mind.name}", required)
|
|
.help-block.with-errors
|
|
.row
|
|
fieldset(class="col-sm-12", style="margin-top: 20px; padding-bottom: 200px;")
|
|
legend(style="font-size: 150%") Beschreibung
|
|
textarea(class="form-control", rows="5", id="area_description", name="area_description").
|
|
#{keep_in_mind.description}
|
|
script.
|
|
$('.noEnterSubmit').keydown(function(e){
|
|
if ( e.which == 13 ) e.preventDefault();
|
|
});
|
|
|
|
$('.noDirectInput').keydown(function(e) {
|
|
var target = $(e.currentTarget);
|
|
var form_group = target.closest('.form-group');
|
|
var help_block = form_group.find('.with-errors');
|
|
if(! form_group.hasClass('has-error'))
|
|
{
|
|
target.closest('.form-group').addClass('has-error');
|
|
}
|
|
if(! help_block.hasClass('has-halieus-error')) {
|
|
help_block.addClass('has-halieus-error');
|
|
help_block.append("<ul class='list-unstyled'><li>Sie müssen den 'Ändern'-Button benutzen!</li></ul>");
|
|
}
|
|
|
|
e.preventDefault();
|
|
});
|
|
$('.noDirectInput').keyup(function(e) { e.preventDefault(); });
|
|
$('.noDirectInput').keypress(function(e) { e.preventDefault(); });
|
|
|
|
$('.noDirectInput').focusout(function(e) {
|
|
var target = $(e.currentTarget);
|
|
var form_group = target.closest('.form-group');
|
|
var help_block = form_group.find('.with-errors');
|
|
help_block.empty();
|
|
help_block.removeClass('has-halieus-error');
|
|
});
|
|
|
|
$('#form').validator().on('invalid.bs.validator', function (e) {
|
|
console.log("INVALID");
|
|
console.log(e);
|
|
}).on('valid.bs.validator', function (e) {
|
|
console.log("VALID");
|
|
console.log(e);
|
|
});
|
|
|