Files
dumas_gestion/mondumas/templates/agenda/rdv_edit.pt
2017-03-24 13:39:35 +01:00

92 lines
3.4 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="empl_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="rdv"
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_vi">Date</label>
<div class="col-xs-3 date">
<input class="form-control" type="text" name="date_vi"
value="${rdv.DATEVI.strftime('%d-%m-%Y')}"
data-fv-notempty="true"
data-fv-notempty-message="La date est obligatoire"
data-fv-date="true"
data-fv-date-format="DD-MM-YYYY"
data-fv-date-message="La date n'est pas valide" />
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-2" for="heurevi">Heure</label>
<div class="col-xs-3">
<input class="form-control" type="text" name="heurevi"
value="${rdv.HEUREVI.strftime('%H:%M')}"
data-fv-notempty="true"
data-fv-notempty-message="L'heure est obligatoire"
data-fv-date="true"
data-fv-date-format="h:m"
data-fv-date-message="L'heure n'est pas valide" />
</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="${rdv.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="${rdv.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: rdv.NOLIG <> '0'">
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
</div>
</div>
</div>
</form>
<br />
<br />
<br />
</div> <!-- row -->
<script>
$(document).ready(function() {
$('#empl_edit-form').formValidation();
$('form input').on('keypress', function(e) {
return e.which !== 13;
});
});
</script>
</div>
</metal:block>