add rdv_edit.pt
This commit is contained in:
@@ -4,41 +4,31 @@
|
||||
<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"
|
||||
<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_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')}"
|
||||
<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 est obligatoire"
|
||||
data-fv-notempty-message="La date et l'heure sont obligatoires"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
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="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}"
|
||||
<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"
|
||||
@@ -50,7 +40,7 @@
|
||||
<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}"
|
||||
<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"
|
||||
@@ -66,7 +56,7 @@
|
||||
<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'">
|
||||
tal:condition="python: nolig <> '0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -80,7 +70,17 @@
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#empl_edit-form').formValidation();
|
||||
$('#date_rdv_picker').datetimepicker({
|
||||
format: 'DD-MM-YYYY HH:mm',
|
||||
showClear: true,
|
||||
allowInputToggle: true,
|
||||
stepping: 15,
|
||||
});
|
||||
$('#rdv_edit-form').formValidation();
|
||||
$('#date_rdv_picker').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;
|
||||
});
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=yes" />
|
||||
|
||||
<!-- Bootstrap core + Plug-ins CSS -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
||||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.1.0/fullcalendar.min.css" rel="stylesheet">
|
||||
<link href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
|
||||
<!-- link href="${request.static_url('mondumas:static/dist/datatable/dataTables.bootstrap.css')}" rel="stylesheet" media="all" -->
|
||||
<link href="${request.static_url('mondumas:static/dist/formvalidation/css/formValidation.min.css')}" rel="stylesheet">
|
||||
<!-- Custom CSS -->
|
||||
@@ -24,6 +25,8 @@
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.1.0/fullcalendar.min.js"></script>
|
||||
<script src="${request.static_url('mondumas:static/dist/fullcalendar/fr.js')}"></script>
|
||||
<!-- Bootstrap Datepicker plugin -->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<!-- Datatable
|
||||
<script src="${request.static_url('mondumas:static/dist/datatable/jquery.dataTables.js')}"></script>
|
||||
<script src="${request.static_url('mondumas:static/dist/datatable/dataTables.bootstrap.js')}"></script>
|
||||
|
||||
Reference in New Issue
Block a user