initial upload
This commit is contained in:
175
aem_gestion/templates/crm/agenda_edit.pt
Normal file
175
aem_gestion/templates/crm/agenda_edit.pt
Normal file
@@ -0,0 +1,175 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-warning" tal:condition="message" tal:content="message" />
|
||||
|
||||
<form id="agenda_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="item"
|
||||
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-3 control-label" for="debut_rdv">Début rdv</label>
|
||||
<div class="col-xs-8 date">
|
||||
<div class="input-group input-append date" id="debut_rdv">
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-time"></span>
|
||||
</span>
|
||||
<input class="form-control" type="text" name="debut_rdv" value="${item.debut_rdv.strftime('%d-%m-%Y %H:%M')}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La date de début la réunion est obligatoire"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY HH:mm"
|
||||
data-fv-date-message="La date de début de la réunion n'est pas valide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label" for="fin_rdv">Fin rdv</label>
|
||||
<div class="col-xs-8 date">
|
||||
<div class="input-group input-append date" id="fin_rdv">
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-time"></span>
|
||||
</span>
|
||||
<input class="form-control" type="text" name="fin_rdv" value="${item.fin_rdv.strftime('%d-%m-%Y %H:%M')}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La date de fin de la réunion est obligatoire"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY HH:mm"
|
||||
data-fv-date-message="La date de fin de la réunion n'est pas valide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Contact</label>
|
||||
<div class="col-xs-5">
|
||||
<p class="form-control-static"><b>${cd_prospect} - ${item.objet_rdv}</b></p>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4">
|
||||
<a class="btn btn-warning" role="button" href="${url_fiche}" tal:condition="url_fiche != ''">
|
||||
<span class="glyphicon glyphicon-user"></span> Fiche contact</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Notes</label>
|
||||
<div class="col-xs-8">
|
||||
<textarea class="form-control" rows="4" cols="40" id="notes" name="notes">${item.notes}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="statut">Statut</label>
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" name="statut">
|
||||
<option value="NR" tal:attributes="selected item.statut == 'NR' and 'selected' or None">NR</option>
|
||||
<option value="PRESENT" tal:attributes="selected item.statut == 'PRESENT' and 'selected' or None">PRESENT</option>
|
||||
<option value="ABSENT" tal:attributes="selected item.statut == 'ABSENT' and 'selected' or None">ABSENT</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Résultat</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" name="resultat" value="${item.resultat}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="50"
|
||||
data-fv-stringlength-message="50 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Contacté par </label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" name="contact" value="${item.contact}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Dernière modif le</label>
|
||||
<div class="col-xs-9">
|
||||
<p class="form-control-static">${item.modif_le.strftime('%d-%m-%Y %H:%M')} par ${item.cd_uti}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-3 col-xs-8">
|
||||
<a href="/agenda/${item.debut_rdv.strftime('%Y-%m-%d')}" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<button class="btn btn-danger" data-toggle="modal" data-target="#confirmDelete">
|
||||
<span class="glyphicon glyphicon-trash"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
|
||||
<!-- Modal : Confirmation SUPRESSION -->
|
||||
<div class="modal fade" id="confirmDelete" role="dialog" aria-labelledby="confirmDeleteLabel" aria-hidden="true">
|
||||
<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">Supprimer le rendez-vous</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="confirmForm" method="post" class="form-horizontal">
|
||||
<p>Etes-vous certain(e) de vouloir supprimer ?</p>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted">Supprimer</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#agenda_edit-form').formValidation({
|
||||
framework: 'bootstrap',
|
||||
message: 'This value is not valid',
|
||||
icon: {
|
||||
valid: 'glyphicon glyphicon-ok',
|
||||
invalid: 'glyphicon glyphicon-remove',
|
||||
validating: 'glyphicon glyphicon-refresh'
|
||||
},
|
||||
fields: {
|
||||
notes: {
|
||||
validators: {
|
||||
stringLength: {
|
||||
max: 200,
|
||||
message: '200 caractères maximum'
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
$('#debut_rdv').datetimepicker({
|
||||
format: 'DD-MM-YYYY HH:mm',
|
||||
stepping: 15,
|
||||
showClear: true,
|
||||
allowInputToggle: true,
|
||||
});
|
||||
$('#fin_rdv').datetimepicker({
|
||||
format: 'DD-MM-YYYY HH:mm',
|
||||
stepping: 15,
|
||||
showClear: true,
|
||||
allowInputToggle: true,
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
Reference in New Issue
Block a user