ajout module Dossier et devis_view.pt + creer_rdv.pt
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<label class="control-label col-md-2">Dossier en cours :</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" name="dossier" value="${mem_nodossier} - ${mem_nomdossier}" readonly />
|
||||
<input class="form-control" type="text" name="dossier" value="${mem_nodossier} | ${mem_nomdossier}" readonly />
|
||||
<div class="input-group-btn">
|
||||
<a href="${url_select}" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-search"></span></a>
|
||||
@@ -39,9 +39,61 @@
|
||||
<span class="label" style="background-color:LightBlue; color:black;">RDV Plomberie</span>
|
||||
</p>
|
||||
<br />
|
||||
<!-- Modal : Confirmation CREATION -->
|
||||
<div class="modal fade" id="confirmCreate" role="dialog" aria-labelledby="confirmCreateLabel" aria-hidden="true" tal:condition="mem_nodossier != 'Aucun'">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Créer un rendez-vous pour ${agenda}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="create_rdv-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">
|
||||
|
||||
<p>
|
||||
Voulez-vous créer un rendez-vous avec : <br />
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-8">
|
||||
<p class="text-danger"><b>${mem_nodossier} - ${mem_nomdossier}</p>
|
||||
<p>le <span id=dateheureRDV>date</p>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="dateRDV" id=dateRDV value="date">
|
||||
<input type="hidden" name="heureRDV" id=heureRDV value="heure">
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-8">
|
||||
<label>Motif :</label>
|
||||
<select class="form-control" id="type_rdv" name="type_rdv">
|
||||
<div tal:repeat="item types_rdv">
|
||||
<option value="${item.LIB}" tal:attributes="selected type_rdv==item.LIB and 'selected' or None">${item.LIB}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-4">
|
||||
<button type="submit" class="btn btn-danger" name="form.submitted">Créer</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var datePlan = '${datePlan}';
|
||||
|
||||
$('#calendar').fullCalendar({
|
||||
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
|
||||
locale: 'fr',
|
||||
@@ -50,7 +102,9 @@ $(document).ready(function() {
|
||||
center: 'prev title next',
|
||||
right: 'today'
|
||||
},
|
||||
allDaySlot: false,
|
||||
defaultView: 'agendaWeek',
|
||||
defaultDate: moment(datePlan),
|
||||
weekends: false,
|
||||
height: 'auto',
|
||||
minTime: "07:00:00",
|
||||
@@ -58,7 +112,22 @@ $(document).ready(function() {
|
||||
events:${fullcalendar_events},
|
||||
eventRender: function(event, element){
|
||||
element.find('.fc-title').append("<br/>" + event.description);
|
||||
}
|
||||
},
|
||||
dayClick: function(date, jsEvent, view) {
|
||||
$('#dateheureRDV').html(moment(date).format('dddd DD MMMM à HH:mm'));
|
||||
$('#dateRDV').attr('value', moment(date).format('YYYY-MM-DD'));
|
||||
$('#heureRDV').attr('value', moment(date).format('HH:mm'));
|
||||
$("#confirmCreate").modal("show");
|
||||
}
|
||||
});
|
||||
$('#create_rdv-form').formValidation({
|
||||
framework: 'bootstrap',
|
||||
excluded: ':disabled',
|
||||
icon: {
|
||||
valid: 'glyphicon glyphicon-ok',
|
||||
invalid: 'glyphicon glyphicon-remove',
|
||||
validating: 'glyphicon glyphicon-refresh'
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user