65 lines
2.2 KiB
XML
65 lines
2.2 KiB
XML
<metal:block use-macro="main_template">
|
|
<div metal:fill-slot="content">
|
|
|
|
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
|
<br />
|
|
<div class="row">
|
|
<form id="categorie_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="categorie"
|
|
data-fv-framework="bootstrap"
|
|
data-fv-icon-valid="glyphicon glyphicon-ok"
|
|
data-fv-icon-invalid="glyphicon glyphicon-remove"
|
|
data-fv-icon-validating="glyphicon glyphicon-refresh">
|
|
|
|
<div class="form-group">
|
|
<label class="col-xs-2 control-label">Categorie</label>
|
|
<div class="col-xs-3">
|
|
<input class="form-control" type="text" name="categorie"
|
|
value="${categorie.categorie}" placeholder="15 caractères maximum"
|
|
data-fv-notempty="true"
|
|
data-fv-notempty-message="Le symbole est obligatoire"
|
|
data-fv-stringlength="true"
|
|
data-fv-stringlength-max="15"
|
|
data-fv-stringlength-message="15 caractères maximum" />
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-xs-2" for="pc_cible">Pourcentage cible</label>
|
|
<div class="col-xs-2">
|
|
<input class="form-control" type="text" id="pc_cible" name="pc_cible" value="${categorie.pc_cible}"
|
|
data-fv-digits="true"
|
|
data-fv-digits-message="Le nombre doit être composé que de chiffres" />
|
|
</div>
|
|
</div>
|
|
|
|
<br />
|
|
<div class="form-group">
|
|
<div class="col-xs-offset-2 col-xs-10">
|
|
<div class="form-group">
|
|
<a class="btn btn-default" href="${request.application_url}/categories_list">
|
|
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
|
<button class="btn btn-primary" type="submit" name="form.submitted">
|
|
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
|
<button class="btn btn-warning" type="submit" name="form.deleted"
|
|
tal:condition="categorie.no_cat <> 0">
|
|
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<br />
|
|
<br />
|
|
</div> <!-- row -->
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#categorie_edit-form').formValidation();
|
|
$('form input').on('keypress', function(e) {
|
|
return e.which !== 13;
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</div>
|
|
</metal:block>
|