refonte de monaa pour remplacer caotek.fr

This commit is contained in:
2020-04-27 21:38:48 +02:00
parent 5e6495e3ae
commit cb73317f8c
24 changed files with 495 additions and 416 deletions

View File

@@ -8,30 +8,29 @@
<div class="form-group">
<label class="control-label col-xs-2" for="intitule">Intitulé</label>
<div class="col-xs-8">
<div class="col-xs-10">
<input class="form-control" type="text" id="intitule" name="intitule" value="${intitule}"
placeholder="40 caractères maximum"
data-fv-notempty="true"
data-fv-notempty-message="L'intitule est obligatoire"
data-fv-stringlength="true"
data-fv-stringlength-max="40"
data-fv-stringlength-message="40 caractères maximum" />
data-fv-stringlength-max="100"
data-fv-stringlength-message="100 caractères maximum" />
</div>
</div>
<div class="form-group">
<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="texte" name="texte">${texte}</textarea>
<div class="col-xs-10">
<textarea class="form-control monospace-font" rows="15" cols="40" id="texte" name="texte">${texte}</textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-2" for="theme">Thème</label>
<div class="col-xs-4">
<div class="col-xs-6">
<select class="form-control" id="theme" name="theme">
<div tal:repeat="item themes">
<option value="${item}" tal:attributes="selected theme==item and 'selected' or None">${item}</option>
<option value="${item.theme}" tal:attributes="selected theme==item.theme and 'selected' or None">${item.theme}</option>
</div>
</select>
</div>
@@ -66,16 +65,6 @@ $(document).ready(function() {
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;