correction bug cration actif AUTTRE

This commit is contained in:
2020-04-14 09:30:43 +02:00
parent e5acd171fc
commit e344887606
2 changed files with 22 additions and 9 deletions

View File

@@ -20,15 +20,9 @@
</div>
<div class="form-group">
<label class="control-label col-xs-2" for="doc-text">Texte</label>
<label class="control-label col-xs-2" for="texte">Texte</label>
<div class="col-xs-8">
<textarea class="form-control" rows="15" cols="40" id="doc-text" name="texte"
data-fv-notempty="true"
data-fv-notempty-message="Le texte est obligatoire"
data-fv-stringlength="true"
data-fv-stringlength-max="30000"
data-fv-stringlength-message="30000 caractères maximum">${texte}
</textarea>
<textarea class="form-control" rows="15" cols="40" id="texte" name="texte">${texte}</textarea>
</div>
</div>
@@ -64,7 +58,25 @@
<script>
$(document).ready(function() {
$('#doc_edit-form').formValidation();
$('#doc_edit-form').formValidation({
framework: 'bootstrap',
message: 'This value is not valid',
icon: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
texte: {
validators: {
stringLength: {
max: 30000,
message: '30000 caractères maximum'
},
}
},
},
});
$('form input').on('keypress', function(e) {
return e.which !== 13;
});