92 lines
3.3 KiB
XML
92 lines
3.3 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="rdv_edit-form" class="form-horizontal" action="${url}" method="post"
|
|
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" for="date_rdv">Date et heure</label>
|
|
<div class="col-xs-3 input-group date" id="date_rdv_picker">
|
|
<input class="form-control" type="text" name="date_rdv" value="${date_rdv.strftime('%d-%m-%Y %H:%M')}"
|
|
data-fv-notempty="true"
|
|
data-fv-notempty-message="La date et l'heure sont obligatoires"
|
|
data-fv-date="true"
|
|
data-fv-date-format="DD-MM-YYYY HH:mm"
|
|
data-fv-date-message="La date et l'heure ne sont pas valides" />
|
|
<span class="input-group-addon add-on">
|
|
<span class="glyphicon glyphicon-calendar"></span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="control-label col-xs-2" for="comment">Commentaire 1</label>
|
|
<div class="col-xs-5">
|
|
<input class="form-control" type="text" id="comment" name="comment" value="${comment}"
|
|
placeholder="30 caractères maximum"
|
|
data-fv-notempty="true"
|
|
data-fv-notempty-message="Un commentaire est obligatoire"
|
|
data-fv-stringlength="true"
|
|
data-fv-stringlength-max="30"
|
|
data-fv-stringlength-message="30 caractères maximum" />
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-xs-2" for="commentvi">Commentaire 2</label>
|
|
<div class="col-xs-5">
|
|
<input class="form-control" type="text" id="commentvi" name="commentvi" value="${commentvi}"
|
|
placeholder="30 caractères maximum"
|
|
data-fv-stringlength="true"
|
|
data-fv-stringlength-max="30"
|
|
data-fv-stringlength-message="30 caractères maximum" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-xs-offset-2 col-xs-10">
|
|
<div class="form-group">
|
|
<a class="btn btn-default" href="${request.route_url('dossier_view', nodossier=nodossier)}">
|
|
<span class="glyphicon glyphicon-arrow-left"></span> Annuler</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="python: nolig <> '0'">
|
|
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
</div> <!-- row -->
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#rdv_edit-form').formValidation();
|
|
$('#date_rdv_picker').datetimepicker({
|
|
format: 'DD-MM-YYYY HH:mm',
|
|
showClear: true,
|
|
allowInputToggle: true,
|
|
stepping: 15,
|
|
})
|
|
.on('changeDate', function(e) {
|
|
// Revalidate the date field
|
|
$('#rdv_edit-form').formValidation('revalidateField', 'date_rdv');
|
|
});
|
|
$('form input').on('keypress', function(e) {
|
|
return e.which !== 13;
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</div>
|
|
</metal:block>
|