96 lines
3.6 KiB
XML
96 lines
3.6 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="control-label col-xs-2">No dossier</label>
|
|
<div class="col-xs-9">
|
|
<span class="form-control-static text-danger">${nodossier} | ${rdv.C_QUALITE} ${rdv.C_NOM}</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-xs-2" for="date_rdv_picker">Date et heure</label>
|
|
<div class="col-xs-3 input-group date" id="date_rdv_picker">
|
|
<input class="form-control" type="text" name="rdv_debut" value="${rdv.rdv_debut.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</label>
|
|
<div class="col-xs-10">
|
|
<input class="form-control" type="text" id=".COMMENT" name="COMMENT" value="${rdv.COMMENT}"
|
|
placeholder="65 caractères maximum"
|
|
data-fv-notempty="true"
|
|
data-fv-notempty-message="Un commentaire est obligatoire"
|
|
data-fv-stringlength="true"
|
|
data-fv-stringlength-max="65"
|
|
data-fv-stringlength-message="65 caractères maximum" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="control-label col-xs-2">Dern. modif le</label>
|
|
<div class="col-xs-9">
|
|
<p class="form-control-static">${rdv.DATEMAJ.strftime('%d-%m-%Y %H:%M')} par ${rdv.USERMAJ}</p>
|
|
</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="/agenda/${rdv.rdv_debut.strftime('%Y-%m-%d')}">
|
|
<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-danger" type="submit" name="form.deleted"
|
|
tal:condition="nolig != '0' and logged_in.upper()==rdv.USERMAJ.upper()">
|
|
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
|
<a class="btn btn-warning" href="${request.route_url('dossier_view', nodossier=nodossier)}">
|
|
<span class="glyphicon glyphicon-folder-open"></span> Dossier</a>
|
|
</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>
|