initial upload
This commit is contained in:
119
aem_gestion/templates/compta/balance_clients.pt
Normal file
119
aem_gestion/templates/compta/balance_clients.pt
Normal file
@@ -0,0 +1,119 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<form id="balance-form" action="${url}" method="post" class="form-horizontal">
|
||||
<h3 class="text-primary">1. Générer la Balance Clients</h3>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4">Société</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static"><b>CERRA</b></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="cat">Catégorie</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="cat" name="cat">
|
||||
<div tal:repeat="item permis">
|
||||
<option value="${item.CAT}" tal:attributes="selected cat==item.CAT and 'selected' or None">${item.CAT}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="date_debut">Période du </label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group date" id="date_debut">
|
||||
<input class="form-control" type="text" name="date_debut" value="${layout.date2dmy(date_debut)}"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="date_fin">au</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group date" id="date_fin">
|
||||
<input class="form-control" type="text" name="date_fin" value="${layout.date2dmy(date_fin)}"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-8 col-xs-offset-4">
|
||||
<button id="extractButton" class="btn btn-lg btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-export"></span> Générer Balance</button>
|
||||
<a href="/parametres" class="btn btn-lg btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<h3 class="text-primary">2. Imprimer la Balance Clients</h3>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4">Critères de sélection</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${balance_criteres}</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4">Générée le</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${generer_debut}</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4">Terminée le</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${generer_fin}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" tal:condition="balance_fin">
|
||||
<div class="col-xs-8 col-xs-offset-4">
|
||||
<a href="/balance_print" class="btn btn-lg btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-print"></span> Imprimer Balance</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</div><!-- content -->
|
||||
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#balance-form').formValidation();
|
||||
$('#date_debut').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
}).on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#balance-form').formValidation('revalidateField', 'date_debut');
|
||||
});
|
||||
$('#date_fin').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
}).on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#balance-form').formValidation('revalidateField', 'date_fin');
|
||||
});
|
||||
});
|
||||
$('#extractButton').on('click', function(){
|
||||
$('i.gly-spin').removeClass('gly-spin');
|
||||
$('i').addClass('gly-spin');
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
|
||||
67
aem_gestion/templates/compta/balance_print.pt
Normal file
67
aem_gestion/templates/compta/balance_print.pt
Normal file
@@ -0,0 +1,67 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div class="col-xs-6">
|
||||
<p>
|
||||
Société : <b>CERRA</b> <br />
|
||||
Edité le : ${TODAY.strftime('%d-%m-%Y')}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<button type="button" class="btn btn-primary" onclick="window.print()">Imprimer</button>
|
||||
</div>
|
||||
<table id="jnl_caisse-table" class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Nom prénom</th>
|
||||
<th>Formule</th>
|
||||
<th class="text-right">Solde</th>
|
||||
<th class="text-right">Mt valeur</th>
|
||||
<th class="text-right">Crédit</th>
|
||||
<th class="text-right">Solde D</th>
|
||||
<th class="text-right">Solde C</th>
|
||||
<th class="text-right">Solde C-D</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm');
|
||||
$('#jnl_caisse-table').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
paging: false,
|
||||
ordering: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
order: [[5, 'asc']],
|
||||
columnDefs: [
|
||||
{
|
||||
targets: [3, 4, 5, 6, 7, 8],
|
||||
className: 'text-right',
|
||||
},
|
||||
],
|
||||
fnRowCallback: function(nRow, aData, iDisplayIndex) {
|
||||
if (aData[0] == "") {
|
||||
$('td', nRow).each(function(){
|
||||
$(this).css('font-weight','bold');
|
||||
});
|
||||
}
|
||||
return nRow;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div> <!-- contents -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
116
aem_gestion/templates/compta/export_cpta.pt
Normal file
116
aem_gestion/templates/compta/export_cpta.pt
Normal file
@@ -0,0 +1,116 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<p>
|
||||
<a href="/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
</p>
|
||||
|
||||
<form id="export_cpta" action="${url}" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="etape" value="${etape}" />
|
||||
|
||||
<h3>1. Extraire le brouillard</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="date_fin">Jusqu'à la date du</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group date" id="date_fin">
|
||||
<input class="form-control" type="text" name="date_fin" value="${layout.date2dmy(date_fin)}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La Date de fin est obligatoire"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
<span class="input-group-btn" tal:condition="etape=='1'">
|
||||
<button id="extractButton" class="btn btn-primary" type="submit" name="form.extraction">
|
||||
<span class="glyphicon glyphicon-export"></span> Extraire</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-bordered table-condensed" cellspacing="0" width="100%" tal:condition="etape=='2'">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Jnl</th>
|
||||
<th>Date</th>
|
||||
<th>Compte</th>
|
||||
<th>Désignation</th>
|
||||
<th class="text-right">Débit</th>
|
||||
<th class="text-right">Crédit</th>
|
||||
<th>Analytique</th>
|
||||
<th>Référence</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:repeat="item brouillard">
|
||||
<td class="text-center">${item.JOURNAL}</td>
|
||||
<td>${item.DATE.strftime("%d-%m-%Y")}</td>
|
||||
<td>${item.COMPTE}</td>
|
||||
<td>${item.LIBELLE}</td>
|
||||
<td class="text-right" tal:condition="item.SENS=='D'">${item.MONTANT}</td>
|
||||
<td class="text-right" tal:condition="item.SENS=='D'"></td>
|
||||
<td class="text-right" tal:condition="item.SENS=='C'"></td>
|
||||
<td class="text-right" tal:condition="item.SENS=='C'">${item.MONTANT}</td>
|
||||
<td>${item.CENTRE}</td>
|
||||
<td>${item.REFERENCE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="4"><b>Totaux</b></td>
|
||||
<td class="text-right"><b>${total_debit}</b></td>
|
||||
<td class="text-right"><b>${total_credit}</b></td>
|
||||
<td class="text-right" colspan="2"><b>${len(brouillard)} écritures générées</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div tal:condition="etape=='2'">
|
||||
<h3>2. Générer le fichier d'export</h3>
|
||||
<p>Le fichier d'export se trouve dans le dossier <b>\JUSTIFS\EXPORT</b></p>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="nom_fichier">Nom du fichier</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group date" id="nom_fichier">
|
||||
<input class="form-control" type="text" name="nom_fichier" value="${nom_fichier}" readonly />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="submit" name="form.generer">
|
||||
<span class="glyphicon glyphicon-download-alt"></span> Générer</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</div><!-- content -->
|
||||
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#export_cpta').formValidation();
|
||||
$('#date_fin').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
}).on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#export_cpta').formValidation('revalidateField', 'date_fin');
|
||||
});
|
||||
});
|
||||
$('#extractButton').on('click', function(){
|
||||
$('i.gly-spin').removeClass('gly-spin');
|
||||
$('i').addClass('gly-spin');
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
|
||||
51
aem_gestion/templates/compta/jnl_caisse.pt
Normal file
51
aem_gestion/templates/compta/jnl_caisse.pt
Normal file
@@ -0,0 +1,51 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<!-- JNL_CAISSE -->
|
||||
<form id="jnl_caisse-form" action="${url}" method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="date_edition">Date d'édition</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group date" id="date_edition">
|
||||
<input class="form-control" type="text" name="date_edition" value="${layout.date2dmy(date_edition)}"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-8 col-xs-offset-4">
|
||||
<button id="extractButton" class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-export"></span> Imprimer</button>
|
||||
<a href="/" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#jnl_caisse-form').formValidation();
|
||||
$('#date_edition').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
}).on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#jnl_caisse-form').formValidation('revalidateField', 'date_fin');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
83
aem_gestion/templates/compta/prt_caisse.pt
Normal file
83
aem_gestion/templates/compta/prt_caisse.pt
Normal file
@@ -0,0 +1,83 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<!-- PRINT_CAISSE -->
|
||||
<form action="" method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Caisse effectuée par :</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label tal:condition="agence==6" class="control-label col-xs-3">Fond de caisse :</label>
|
||||
<label tal:condition="agence!=6" class="control-label col-xs-3">Dépôt en banque le et par :</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Enveloppe ESP Banque :</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Enveloppe ESP Compta :</label>
|
||||
<div class="col-xs-6 col-xs-offset-3">
|
||||
<button type="button" class="btn btn-primary" onclick="window.print()">Imprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<table id="jnl_caisse-table" class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Nom prénom</th>
|
||||
<th>Cat.</th>
|
||||
<th>Intitulé</th>
|
||||
<th class="text-right">Montant</th>
|
||||
<th class="text-center">Mode</th>
|
||||
<th>Util.</th>
|
||||
<th>Créé, Modif</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm');
|
||||
$('#jnl_caisse-table').DataTable({
|
||||
data: dataSet,
|
||||
paging: false,
|
||||
bLengthChange: false,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
order: [[5, 'asc']],
|
||||
columnDefs: [
|
||||
{
|
||||
targets: 4,
|
||||
className: 'text-right',
|
||||
},
|
||||
{
|
||||
targets: 5,
|
||||
className: 'text-center',
|
||||
}
|
||||
],
|
||||
fnRowCallback: function(nRow, aData, iDisplayIndex) {
|
||||
if (aData[0] == "") {
|
||||
$('td', nRow).each(function(){
|
||||
$(this).css('font-weight','bold');
|
||||
});
|
||||
}
|
||||
return nRow;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
99
aem_gestion/templates/compta/recap_moniteur.pt
Normal file
99
aem_gestion/templates/compta/recap_moniteur.pt
Normal file
@@ -0,0 +1,99 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<form id="balance-form" action="${url}" method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="cd_mon1">Moniteur début</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="cd_mon1" name="cd_mon1">
|
||||
<div tal:repeat="item moniteurs">
|
||||
<option value="${item.CD_MON}" tal:attributes="selected cd_mon1 == item.CD_MON and 'selected' or None">${item.CD_MON} - ${item.NOM} </option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="cd_mon2">Moniteur fin</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="cd_mon2" name="cd_mon2">
|
||||
<div tal:repeat="item moniteurs">
|
||||
<option value="${item.CD_MON}" tal:attributes="selected cd_mon2 == item.CD_MON and 'selected' or None">${item.CD_MON} - ${item.NOM}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="date_debut">Période du </label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group date" id="date_debut">
|
||||
<input class="form-control" type="text" name="date_debut" value="${layout.date2dmy(date_debut)}"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="date_fin">au</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group date" id="date_fin">
|
||||
<input class="form-control" type="text" name="date_fin" value="${layout.date2dmy(date_fin)}"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-8 col-xs-offset-4">
|
||||
<button id="extractButton" class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-export"></span> Générer Récap</button>
|
||||
<a href="/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</div><!-- content -->
|
||||
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#balance-form').formValidation();
|
||||
$('#date_debut').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
}).on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#balance-form').formValidation('revalidateField', 'date_debut');
|
||||
});
|
||||
$('#date_fin').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
}).on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#balance-form').formValidation('revalidateField', 'date_fin');
|
||||
});
|
||||
});
|
||||
$('#extractButton').on('click', function(){
|
||||
$('i.gly-spin').removeClass('gly-spin');
|
||||
$('i').addClass('gly-spin');
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
|
||||
72
aem_gestion/templates/compta/recap_print.pt
Normal file
72
aem_gestion/templates/compta/recap_print.pt
Normal file
@@ -0,0 +1,72 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<h3>${periode}</h3>
|
||||
<br />
|
||||
<div class="col-xs-6">
|
||||
<p>
|
||||
Société : <b>CERRA</b> <br />
|
||||
Edité le : ${TODAY.strftime('%d-%m-%Y')}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<button type="button" class="btn btn-primary" onclick="window.print()">Imprimer</button>
|
||||
</div>
|
||||
<table id="recap_moniteurs-table" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Moniteur</th>
|
||||
<th>Statut</th>
|
||||
<th>Réf.</th>
|
||||
<th>Intitulé</th>
|
||||
<th class="text-right">Heures</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm');
|
||||
$('#recap_moniteurs-table').DataTable({
|
||||
data: dataSet,
|
||||
paging: false,
|
||||
bLengthChange: false,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
order: [[0, 'asc']],
|
||||
columnDefs: [
|
||||
{
|
||||
targets: 4,
|
||||
className: 'text-right',
|
||||
},
|
||||
],
|
||||
createdRow: function( row, data, dataIndex ) {
|
||||
if ( data[1] == "(15)" ) {
|
||||
$('td', row).eq(1).css('background-color', 'Yellow');
|
||||
$('td', row).eq(4).css('background-color', 'Yellow');
|
||||
}
|
||||
},
|
||||
fnRowCallback: function(nRow, aData, iDisplayIndex) {
|
||||
if (aData[1] == "") {
|
||||
$('td', nRow).each(function(){
|
||||
$(this).css('font-weight','bold');
|
||||
});
|
||||
}
|
||||
return nRow;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div> <!-- contents -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
67
aem_gestion/templates/compta/solder_contrats.pt
Normal file
67
aem_gestion/templates/compta/solder_contrats.pt
Normal file
@@ -0,0 +1,67 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<p>
|
||||
<a href="/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
</p>
|
||||
|
||||
<form id="solder_contrats" action="${url}" method="post" class="form-horizontal">
|
||||
<div class="col-xs-6">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading"><h3>SOLDER les CONTRATS AUTO</h3></div>
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
Ce traitement sélectionne tous les contrats AUTO qui sont :<br />
|
||||
- inactifs depuis plus de 6 mois<br />
|
||||
- dont le statut = 0<br />
|
||||
- dont la date de fin de contrat est atteinte depuis plus d'un an<br />
|
||||
- dont le SOLDE est positif (total CREDIT > total MT_VALEUR)<br />
|
||||
pour les solder :<br />
|
||||
- ajout d'une ligne 'REGUL FIN AUTO' d'un montant = SOLDE du compte élève
|
||||
</p>
|
||||
<p>Procédure appelée : <b>spUpd_SOLDER_CONTRAT_B</b></p>
|
||||
<br />
|
||||
<p class="text-center">
|
||||
<button id="extractButton" class="btn btn-primary" type="submit" name="form.solder_auto">
|
||||
<span class="glyphicon glyphicon-check"></span> Solder les contrats AUTO</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading"><h3>SOLDER les CONTRATS 2 ROUES</h3></div>
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
Ce traitement sélectionne tous les contrats 2 ROUES qui sont :<br />
|
||||
- inactifs depuis plus de 6 mois<br />
|
||||
- dont le statut = 0<br />
|
||||
- dont la date de fin de contrat est atteinte depuis plus d'un an<br />
|
||||
- dont le SOLDE est positif (total CREDIT > total MT_VALEUR)<br />
|
||||
pour les solder :<br />
|
||||
- ajout d'une ligne 'REGUL FIN MOTO' d'un montant = SOLDE du compte élève<br />
|
||||
</p>
|
||||
<p>Procédure appelée : <b>spUpd_SOLDER_CONTRAT_2R</b></p>
|
||||
<br />
|
||||
<p class="text-center">
|
||||
<button id="extractButton" class="btn btn-primary" type="submit" name="form.solder_moto">
|
||||
<span class="glyphicon glyphicon-check"></span> Solder contrats 2 ROUES</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</div><!-- content -->
|
||||
|
||||
</metal:block>
|
||||
|
||||
|
||||
192
aem_gestion/templates/crm/agenda.pt
Normal file
192
aem_gestion/templates/crm/agenda.pt
Normal file
@@ -0,0 +1,192 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div class="container">
|
||||
|
||||
<div class="alert alert-warning" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<p>
|
||||
<a href="/contacts_list" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour aux CONTACTS</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<form id="exams_agence-form" action="${url}" method="POST">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-1">Agence</label>
|
||||
<div class="col-xs-11">
|
||||
<a class="btn btn-default" href="${url}?agenceid=1" >VALMY</a>
|
||||
<a class="btn btn-default" href="${url}?agenceid=2" >SAXE</a>
|
||||
<a class="btn btn-default" href="${url}?agenceid=3" >CROIX ROUSSE</a>
|
||||
<a class="btn btn-default" href="${url}?agenceid=4" >MONPLAISIR</a>
|
||||
<a class="btn btn-default" href="${url}?agenceid=5" >CHARPENNES</a>
|
||||
<a class="btn btn-default" href="${url}?agenceid=6" >VAUGNERAY</a>
|
||||
<a class="btn btn-default" href="${url}?agenceid=7" >GENTIL</a>
|
||||
<a class="btn btn-default" href="${url}?agenceid=8" >VITTON</a>
|
||||
<a class="btn btn-default" href="${url}?agenceid=9" >WEB</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div id="calendar"></div>
|
||||
<br />
|
||||
<!-- Modal : Confirmation CREATION -->
|
||||
<div class="modal fade" id="confirmCreate" role="dialog" aria-labelledby="confirmCreateLabel" 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">Créer un rendez-vous</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 nouveau rendez-vous : <br />
|
||||
</p>
|
||||
<div class="col-xs-offset-3 col-xs-9">
|
||||
<b>le <span id=dateheureRDV>date</span></b><br />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Pour un</label>
|
||||
<div class="col-xs-8">
|
||||
<label class="radio-inline"><input type="radio" name="type_rech" value="E">Elève</label>
|
||||
<label class="radio-inline"><input type="radio" name="type_rech" value="P" checked>Prospect</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-xs-3 control-label">Nom ou Code</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="3 caractères minimum" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="datetimeRDV" id="datetimeRDV" value="date">
|
||||
<input type="hidden" name="current_agence" id="current_agence" value="${current_agence}">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="submit" id="submitRdv" 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>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div><!-- content -->
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<!-- Bootstrap Fullcalendar plugin -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar-scheduler/1.9.4/scheduler.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/locale/fr.js"></script>
|
||||
<!-- autocomplete plugin -->
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var datePlan = '${datePlan}';
|
||||
|
||||
$('#calendar').fullCalendar({
|
||||
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
|
||||
locale: 'fr',
|
||||
header: {
|
||||
left: 'agendaWeek month listWeek',
|
||||
center: 'prev title next',
|
||||
right: 'today'
|
||||
},
|
||||
allDaySlot: true,
|
||||
allDayHtml: "A relancer",
|
||||
defaultView: 'agendaWeek',
|
||||
defaultDate: moment(datePlan),
|
||||
hiddenDays: [0], // hide sunday
|
||||
height: 'auto',
|
||||
minTime: "07:00:00",
|
||||
maxTime: "21:00:00",
|
||||
displayEventTime: true,
|
||||
events:${calendar_events},
|
||||
eventRender: function(event, element){
|
||||
element.find('.fc-title').append("<br/>" + event.description);
|
||||
},
|
||||
dayClick: function(date, jsEvent, view) {
|
||||
inputDate = moment(date).format('YYYY-MM-DD');
|
||||
var today = new Date();
|
||||
|
||||
if (date < today)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$('#dateheureRDV').html(moment(date).format('dddd DD MMMM à HH:mm'));
|
||||
$('#datetimeRDV').attr('value', moment(date).format('YYYY-MM-DD 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'
|
||||
},
|
||||
});
|
||||
$('#name').on('change input',function(){
|
||||
$('#text-error-message').text('');
|
||||
$('#form-code').removeClass('has-feedback has-error');
|
||||
$('#submitRdv').removeClass('disabled').attr("disabled", false);;
|
||||
});
|
||||
$('#create_rdv-form').submit(function(ev){
|
||||
var actionurl = ev.currentTarget.action;
|
||||
console.log(actionurl)
|
||||
var array_code = $('#name').val().split(' | ');
|
||||
var reg = new RegExp('^[A-Z0-9]+-[A-Z0-9]+|[0-9]{6}$');
|
||||
var condition1 = array_code.length == 2 && array_code[0].length >= 3 && array_code[1].length == 6 ;
|
||||
var condition2 = reg.test( $('#name').val().trim())
|
||||
if(condition1 && condition2){
|
||||
$('#text-error-message').text('');
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
$('#form-code').addClass('has-feedback has-error');
|
||||
$('#submitRdv').addClass('disabled').attr("disabled", true);
|
||||
$('#text-error-message').text('Code non validé');
|
||||
ev.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#name').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_lookup',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: $("input[name='type_rech']:checked").val() + request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 3,
|
||||
appendTo: "#confirmCreate"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
|
||||
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>
|
||||
|
||||
68
aem_gestion/templates/crm/confirm.pt
Normal file
68
aem_gestion/templates/crm/confirm.pt
Normal file
@@ -0,0 +1,68 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
|
||||
<form id="member-search-form" class="form-horizontal" role="form" 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 tal:condition="action=='won'">
|
||||
<p class="col-xs-offset-4 col-xs-8 text-danger">
|
||||
Ce traitement va clôturer cette fiche et le prospect sera converti en client. <br />
|
||||
Si vous le confirmez, cette opération sera irrévsersible.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div tal:condition="action=='leave' or action=='cancel' or action=='error'">
|
||||
<p class="col-xs-offset-4 col-xs-8 text-danger">
|
||||
Ce traitement va clôturer ce devis. <br />
|
||||
Si vous le confirmez, cette opération sera irrévsersible.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div tal:condition="action=='lost'">
|
||||
<p class="col-xs-offset-4 col-xs-8 text-danger">
|
||||
Ce traitement va clôturer cette fiche. <br />
|
||||
Si vous le confirmez, cette opération sera irrévsersible.
|
||||
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="motif_abandon">Motif d'abandon ? </label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="motif_abandon" name="motif_abandon">
|
||||
<div tal:repeat="item motifs_abandon">
|
||||
<option value="${item.LIBELLE}">${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-4 col-xs-8">
|
||||
<a class="btn btn-default" href="${url_retour}">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Confirmer</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div><!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#member-search-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
744
aem_gestion/templates/crm/contact_edit.pt
Normal file
744
aem_gestion/templates/crm/contact_edit.pt
Normal file
@@ -0,0 +1,744 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#contact">CONTACT</a></li>
|
||||
<li><a data-toggle="tab" href="#formation">FORMATION</a></li>
|
||||
<li><a data-toggle="tab" href="#relances">RELANCES</a></li>
|
||||
<li tal:condition="individu.cd_prospect != 0"><a data-toggle="tab" href="#suivi">SUIVI ADM.</a></li>
|
||||
<li tal:condition="individu.cd_prospect != 0"><a data-toggle="tab" href="#cpf">CPF</a></li>
|
||||
<li tal:condition="individu.cd_prospect != 0"><a data-toggle="tab" href="#devis">DEVIS</a></li>
|
||||
<li tal:condition="individu.cd_prospect != 0"><a data-toggle="tab" href="#vente">VENTE EN LIGNE</a></li>
|
||||
</ul>
|
||||
|
||||
<form id="contact_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="individu"
|
||||
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="tab-content">
|
||||
<!-- ONGLET CONTACT -->
|
||||
<div id="contact" class="tab-pane fade in active">
|
||||
<h3>CONTACT</h3>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="access">Type de contact ?</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="type_contact" name="type_contact">
|
||||
<div tal:repeat="item types_contact">
|
||||
<option value="${item.LIBELLE}" tal:attributes="selected individu.type_contact==item.LIBELLE and 'selected' or None">${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="access">C'est pour qui ?</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="pour_qui" name="pour_qui">
|
||||
<div tal:repeat="item pour_quis">
|
||||
<option value="${item}" tal:attributes="selected individu.pour_qui==item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="access">Pour quel type de permis ?</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="permis_demande" name="permis_demande">
|
||||
<div tal:repeat="item permis">
|
||||
<option value="${item.CAT}" tal:attributes="selected individu.permis_demande==item.CAT and 'selected' or None">${item.CAT}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="age">Votre âge ?</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="age" name="age" value="${individu.age}"
|
||||
placeholder="45 caractères maximum"
|
||||
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-4" for="permis_obtenu">Avez-vous déjà un permis ?</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" name="permis_obtenu">
|
||||
<option value="Non" tal:attributes="selected individu.permis_obtenu == 'Non' and 'selected' or None">Non</option>
|
||||
<option value="Oui" tal:attributes="selected individu.permis_obtenu == 'Oui' and 'selected' or None">Oui</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="client_marietton">Connaissiez-vous déjà Marietton ?</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" name="client_marietton">
|
||||
<option value="Non" tal:attributes="selected individu.client_marietton == 'Non' and 'selected' or None">Non</option>
|
||||
<option value="Oui" tal:attributes="selected individu.client_marietton == 'Oui' and 'selected' or None">Oui</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="origine">Comment vous nous avez connu ?</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="origine" name="origine">
|
||||
<div tal:repeat="item origines">
|
||||
<option value="${item.LIBELLE}" tal:attributes="selected individu.origine==item.LIBELLE and 'selected' or None">${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="origine_compl">Complément sur l'origine</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="origine_compl" name="origine_compl" value="${individu.origine_compl}"
|
||||
placeholder="45 caractères maximum"
|
||||
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-4" for="qui_choisit">Qui a choisi l'auto-école ?</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="qui_choisit" name="qui_choisit">
|
||||
<div tal:repeat="item decideurs">
|
||||
<option value="${item.LIBELLE}" tal:attributes="selected individu.qui_choisit==item.LIBELLE and 'selected' or None">${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="qui_paye">Qui finance le permis ?</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="qui_paye" name="qui_paye">
|
||||
<div tal:repeat="item financeurs">
|
||||
<option value="${item.LIBELLE}" tal:attributes="selected individu.qui_paye==item.LIBELLE and 'selected' or None">${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="profession_payeur">Profession du financeur ?</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="profession_payeur" name="profession_payeur">
|
||||
<div tal:repeat="item prof_financeurs">
|
||||
<option value="${item.LIBELLE}" tal:attributes="selected individu.profession_payeur==item.LIBELLE and 'selected' or None">${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4">Commentaires</label>
|
||||
<div class="col-xs-6">
|
||||
<textarea class="form-control" rows="5" cols="40" id="observation" name="observation">${individu.observation}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="text-primary"><b>COORDONNEES</b></h4>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="civilite">Civilité</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" name="civilite">
|
||||
<option value="M." tal:attributes="selected individu.civilite == 'M.' and 'selected' or None">M.</option>
|
||||
<option value="Mme" tal:attributes="selected individu.civilite == 'Mme' and 'selected' or None">Mme</option>
|
||||
<option value="Mlle" tal:attributes="selected individu.civilite == 'Mlle' and 'selected' or None">Mlle</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="nom">Nom</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="nom" name="nom" value="${individu.nom}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le nom est obligatoire"
|
||||
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-4" for="prenom">Prénom</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="prenom" name="prenom" value="${individu.prenom}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le prénom est obligatoire"
|
||||
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-4" for="adresse">Adresse</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="adresse" name="adresse" value="${individu.adresse}"
|
||||
placeholder="40 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="adresse2">Adresse 2</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="adresse2" name="adresse2" value="${individu.adresse2}"
|
||||
placeholder="40 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="code_postal">Code postal</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="code_postal" name="code_postal" value="${code_postal}"
|
||||
placeholder="5 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le code postal est obligatoire" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="tel_fixe">Téléphone fixe</label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="tel_fixe" name="tel_fixe" value="${individu.tel_fixe}"
|
||||
data-fv-phone="true"
|
||||
data-fv-phone-country="FR"
|
||||
data-fv-phone-message="Numéro de téléphone non valide" />
|
||||
<span class="input-group-addon" tal:condition="individu.tel_fixe">
|
||||
<a href="tel:${individu.tel_fixe}"><span class="glyphicon glyphicon-earphone"></span></a></span>
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-xs-2" for="tel_portable">mobile</label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="tel_portable" name="tel_portable" value="${individu.tel_portable}"
|
||||
data-fv-phone="true"
|
||||
data-fv-phone-country="FR"
|
||||
data-fv-phone-message="Numéro de téléphone non valide" />
|
||||
<span class="input-group-addon" tal:condition="individu.tel_portable">
|
||||
<a href="tel:${individu.tel_portable}"><span class="glyphicon glyphicon-earphone"></span></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="tel_pere">Téléphone père</label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="tel_pere" name="tel_pere" value="${individu.tel_pere}"
|
||||
data-fv-phone="true"
|
||||
data-fv-phone-country="FR"
|
||||
data-fv-phone-message="Numéro de téléphone non valide" />
|
||||
<span class="input-group-addon" tal:condition="individu.tel_pere">
|
||||
<a href="tel:${individu.tel_pere}"><span class="glyphicon glyphicon-earphone"></span></a></span>
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-xs-2" for="tel_mere">mère</label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="tel_mere" name="tel_mere" value="${individu.tel_mere}"
|
||||
data-fv-phone="true"
|
||||
data-fv-phone-country="FR"
|
||||
data-fv-phone-message="Numéro de téléphone non valide" />
|
||||
<span class="input-group-addon" tal:condition="individu.tel_mere">
|
||||
<a href="tel:${individu.tel_mere}"><span class="glyphicon glyphicon-earphone"></span></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Email</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" name="email" value="${individu.email}" placeholder="50 caractères maximum"
|
||||
data-fv-emailaddress="true"
|
||||
data-fv-emailaddress-message="L'adresse email n'est pas valide" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div> <!-- onglet contact -->
|
||||
|
||||
<!-- ONGLET FORMATION -->
|
||||
<div id="formation" class="tab-pane fade">
|
||||
<h3>FORMATION</h3>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="inscrit_autre_AE">Déjà inscrit dans une autre AE ?</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" name="inscrit_autre_AE">
|
||||
<option value="Non" tal:attributes="selected individu.inscrit_autre_AE == 'Non' and 'selected' or None">Non</option>
|
||||
<option value="Oui" tal:attributes="selected individu.inscrit_autre_AE == 'Oui' and 'selected' or None">Oui</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4">Qu’avez-vous fait dans cette AE ?</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="effectue_autre_AE" name="effectue_autre_AE" value="${individu.effectue_autre_AE}"
|
||||
placeholder="45 caractères maximum"
|
||||
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-4" for="raison_formation">Pour quelle raison passer le permis ?</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="raison_formation" name="raison_formation">
|
||||
<div tal:repeat="item types_raison">
|
||||
<option value="${item.LIBELLE}" tal:attributes="selected individu.raison_formation==item.LIBELLE and 'selected' or None">${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4">Avez-vous un budget pour la formation ?</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="budget_formation" name="budget_formation" value="${individu.budget_formation}"
|
||||
data-fv-digits="true"
|
||||
data-fv-digits-message="Veuillez saisir un montant" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="echeance_formation">Avez-vous une échéance pour l’obtenir ?</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="echeance_formation" name="echeance_formation">
|
||||
<div tal:repeat="item echeances">
|
||||
<option value="${item}" tal:attributes="selected individu.echeance_formation==item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="type_formation">Comment voulez-vous passer votre permis ? </label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="type_formation" name="type_formation">
|
||||
<div tal:repeat="item types_formation">
|
||||
<option value="${item.LIBELLE}" tal:attributes="selected individu.type_formation==item.LIBELLE and 'selected' or None">${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4">Vos disponibilités ?</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="disponibilites" name="disponibilites" value="${individu.disponibilites}"
|
||||
placeholder="45 caractères maximum"
|
||||
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-4">Attentes vis à vis AE</label>
|
||||
<div class="col-xs-6">
|
||||
<textarea class="form-control" rows="5" cols="40" id="attentes" name="attentes">${individu.attentes}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4">Sources de stress / frustrations :</label>
|
||||
<div class="col-xs-6">
|
||||
<textarea class="form-control" rows="5" cols="40" id="stress" name="stress">${individu.stress}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- onglet contact -->
|
||||
|
||||
<!-- ONGLET RELANCES -->
|
||||
<div id="relances" class="tab-pane fade">
|
||||
<h3>RELANCES et RDV</h3>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="date_relance1">1ère relance le</label>
|
||||
<div class="col-xs-2">
|
||||
<input class="form-control" type="text" id="date_relance1" name="date_relance1" value="${individu.date_relance1}"
|
||||
placeholder="jj/mm/aaaa"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-stringlength-message="format date jj/mm/aaaa" />
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="resultat1" name="resultat1" value="${individu.resultat1}"
|
||||
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-4" for="date_relance2">2ème relance le</label>
|
||||
<div class="col-xs-2">
|
||||
<input class="form-control" type="text" id="date_relance2" name="date_relance2" value="${individu.date_relance2}"
|
||||
placeholder="jj/mm/aaaa"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD/MM/YYYY"
|
||||
data-fv-date-message="La date n'est pas valide (JJ/MM/AAAA)"
|
||||
data-fv-stringlength-message="format date jj/mm/aaaa" />
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="resultat2" name="resultat2" value="${individu.resultat2}"
|
||||
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-4" for="date_relance3">3ème relance le</label>
|
||||
<div class="col-xs-2">
|
||||
<input class="form-control" type="text" id="date_relance3" name="date_relance3" value="${individu.date_relance3}"
|
||||
placeholder="jj/mm/aaaa"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD/MM/YYYY"
|
||||
data-fv-date-message="La date n'est pas valide (JJ/MM/AAAA)"
|
||||
data-fv-stringlength-message="format date jj/mm/aaaa" />
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="resultat3" name="resultat3" value="${individu.resultat3}"
|
||||
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-4" for="a_relancer_le">A relancer le</label>
|
||||
<div class="col-xs-2">
|
||||
<input class="form-control" type="type" id="a_relancer_le" name="a_relancer_le" value="${individu.a_relancer_le}"
|
||||
placeholder="jj/mm/aaaa"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD/MM/YYYY"
|
||||
data-fv-date-message="La date n'est pas valide (JJ/MM/AAAA)"
|
||||
data-fv-stringlength-message="format date jj/mm/aaaa" />
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<button class="btn btn-primary" type="submit" name="form.a_relancer" tal:condition="not individu.cloture_le and individu.cd_prospect > 0">
|
||||
<span class="glyphicon glyphicon-earphone"></span> A relancer à J+7</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="prochain_rdv_le">Prochain rdv le</label>
|
||||
<div class="col-xs-2">
|
||||
<p class="form-control-static" tal:condition="individu.prochain_rdv_le">
|
||||
${individu.prochain_rdv_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<button class="btn btn-primary" type="submit" name="form.rdv_relance" tal:condition="not individu.cloture_le and individu.cd_prospect > 0">
|
||||
<span class="glyphicon glyphicon-calendar"></span> Planifier un RDV</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- agence -->
|
||||
<h4 class="text-primary"><b>STATUT</b></h4>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="agence">Agence</label>
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" id="agence" name="agence">
|
||||
<div tal:repeat="item agences">
|
||||
<option value="${item.CODE}" tal:attributes="selected individu.agence==item.CODE and 'selected' or None">${item.CODE} | ${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="cd_prospect">Code prospect</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static"><b>${individu.cd_prospect}</b> - Code élève : ${individu.cd_cli}</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4" for="statut">Statut</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">
|
||||
${individu.statut}
|
||||
<span tal:condition="individu.cloture_le">- ${individu.cloture_le.strftime('%d/%m/%Y')} -
|
||||
${individu.motif_abandon}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4" for="access">Dernière modif.</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${individu.modif_le.strftime('%d/%m/%Y - %H:%M')} par ${individu.cd_uti}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- relances -->
|
||||
|
||||
<!-- SUIVI -->
|
||||
<div id="suivi" class="tab-pane fade">
|
||||
<h3>SUIVI ADMINISTRATIF
|
||||
<a href="${request.application_url}/contact_suivi/${individu.cd_prospect}/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau</a>
|
||||
</h3>
|
||||
<table class="table table-striped table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20%">Date</th>
|
||||
<th>Type</th>
|
||||
<th>Moyen</th>
|
||||
<th>Résultat</th>
|
||||
<th>Uti.</th>
|
||||
<th>No</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:repeat="item suivis">
|
||||
<td>${item.cree_le.strftime('%d/%m/%Y - %H:%M')}</td>
|
||||
<td>${item.type_rel}</td>
|
||||
<td>${item.moyen_rel}</td>
|
||||
<td><a href="/contact_suivi/${item.cd_prospect}/${item.no_ligne}">${item.infos}</a></td>
|
||||
<td>${item.cd_uti}</td>
|
||||
<td>${item.no_ligne}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3 class="text-primary">RENDEZ-VOUS DU PROSPECT</h3>
|
||||
<table class="table table-striped table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20%">Date</th>
|
||||
<th>Statut</th>
|
||||
<th>Résultat</th>
|
||||
<th>Notes</th>
|
||||
<th>Uti.</th>
|
||||
<th width="20%">Créé le</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:repeat="item rdvs">
|
||||
<td><a href="/agenda_edit/${item.no_ligne}">${item.debut_rdv.strftime('%d/%m/%Y - %H:%M')}</a></td>
|
||||
<td>${item.statut}</td>
|
||||
<td>${item.resultat}</td>
|
||||
<td>${item.notes}</td>
|
||||
<td>${item.cd_uti}</td>
|
||||
<td>${item.cree_le.strftime('%d/%m/%Y - %H:%M')}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- ONGLET CPF -->
|
||||
<div id="cpf" class="tab-pane fade">
|
||||
<h3><a href="${request.application_url}/devis_cpf_frm/0/P${individu.cd_prospect}" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau CPF</a></h3>
|
||||
|
||||
<table class="table table-condensed table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No devis</th>
|
||||
<th>Créé le</th>
|
||||
<th>Type devis</th>
|
||||
<th>Montant - Heures</th>
|
||||
<th>No dossier</th>
|
||||
<th>Demandé le</th>
|
||||
<th class="text-center">Début le</th>
|
||||
<th class="text-center">Fin le</th>
|
||||
<th class="text-center">Clôturé le</th>
|
||||
<th class="text-center">Util.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:repeat="item devis_cpf">
|
||||
<td>
|
||||
<a href="${request.application_url}/devis_cpf_frm/${item.no_devis}/P${individu.cd_prospect}">${item.no_devis}</a>
|
||||
</td>
|
||||
<td>${item.cree_le.strftime('%d-%m-%Y')}</td>
|
||||
<td>${item.type_devis}</td>
|
||||
<td>${layout.to_euro(item.montant_pec)} - ${item.nb_heures_pec} h</td>
|
||||
<td>${item.no_dossier}</td>
|
||||
<td tal:condition="item.demande_le">${item.demande_le.strftime('%d-%m-%Y')}</td>
|
||||
<td tal:condition="not item.demande_le"> </td>
|
||||
<td tal:condition="item.formation_debut_le">${item.formation_debut_le.strftime('%d-%m-%Y')}</td>
|
||||
<td tal:condition="not item.formation_debut_le"> </td>
|
||||
<td tal:condition="item.formation_fin_le">${item.formation_fin_le.strftime('%d-%m-%Y')}</td>
|
||||
<td tal:condition="not item.formation_fin_le"> </td>
|
||||
<td tal:condition="item.cloture_le" class="text-success text-center"><b>${item.cloture_le.strftime('%d-%m-%Y')} (${item.statut})</b></td>
|
||||
<td tal:condition="not item.cloture_le"> </td>
|
||||
<td class="text-center">${item.cd_uti}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- onglet CPF -->
|
||||
|
||||
<!-- ONGLET DEVIS -->
|
||||
<div id="devis" class="tab-pane fade">
|
||||
<h3><a href="${request.application_url}/devis_frm/0/P${individu.cd_prospect}" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau devis</a></h3>
|
||||
|
||||
<table class="table table-condensed table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No devis</th>
|
||||
<th>Créé le</th>
|
||||
<th>Organisme</th>
|
||||
<th>Type devis</th>
|
||||
<th class="text-center">Clôturé le</th>
|
||||
<th class="text-center">Util.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:repeat="item devis">
|
||||
<td>
|
||||
<a href="${request.application_url}/devis_frm/${item.no_devis}/P${individu.cd_prospect}">${item.no_devis}</a>
|
||||
</td>
|
||||
<td>${item.cree_le.strftime('%d-%m-%Y')}</td>
|
||||
<td>${item.organisme}</td>
|
||||
<td>${item.type_devis}</td>
|
||||
<td class="text-success text-center" tal:condition="item.cloture_le"><b>${item.cloture_le.strftime('%d-%m-%Y')} (${item.statut})</b></td>
|
||||
<td tal:condition="not item.cloture_le"> </td>
|
||||
<td class="text-center">${item.cd_uti}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- onglet devis -->
|
||||
|
||||
<!-- ONGLET VENTE -->
|
||||
<div id="vente" class="tab-pane fade">
|
||||
<h3>VENTE EN LIGNE</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="cd_prospect">Code prospect</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${individu.cd_prospect}</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4" for="cd_prospect">Nom et prénom</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${individu.civilite} ${individu.nom} ${individu.prenom}</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4" for="cd_prospect">Email</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${individu.email}</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4" for="cd_prospect">Tél. portable</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${individu.tel_portable}</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4" for="cd_prospect">Permis demandé</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${individu.permis_demande}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="access">Formation</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="formation" name="formation">
|
||||
<div tal:repeat="item formations">
|
||||
<option value="${item}" tal:attributes="selected formation==item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" tal:condition="not individu.cloture_le">
|
||||
<div class="col-xs-offset-4 col-xs-8">
|
||||
<button class="btn btn-primary" type="submit" name="form.email">
|
||||
<span class="glyphicon glyphicon-envelope"></span> Envoi mail INSCRIPTION</button>
|
||||
<button class="btn btn-primary" type="submit" name="form.sms">
|
||||
<span class="glyphicon glyphicon-phone"></span> Envoi SMS INSCRIPTION</button>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- onglet VENTE -->
|
||||
|
||||
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/contacts_list">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted" tal:condition="not individu.cloture_le">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<a class="btn btn-success" href="${request.application_url}/confirm/${individu.cd_prospect}/won"
|
||||
tal:condition="not individu.cloture_le and individu.cd_prospect > 0">
|
||||
<span class="glyphicon glyphicon-thumbs-up"></span> Gagné</a>
|
||||
<a class="btn btn-danger" href="${request.application_url}/confirm/${individu.cd_prospect}/lost"
|
||||
tal:condition="not individu.cloture_le and individu.cd_prospect > 0">
|
||||
<span class="glyphicon glyphicon-thumbs-down"></span> Perdu</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- tab content -->
|
||||
</form>
|
||||
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script type="text/javascript">
|
||||
$('#contact_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: {
|
||||
observation: {
|
||||
validators: {
|
||||
stringLength: {
|
||||
max: 450,
|
||||
message: '450 caractères maximum'
|
||||
},
|
||||
}
|
||||
},
|
||||
attentes: {
|
||||
validators: {
|
||||
stringLength: {
|
||||
max: 450,
|
||||
message: '450 caractères maximum'
|
||||
},
|
||||
}
|
||||
},
|
||||
stress: {
|
||||
validators: {
|
||||
stringLength: {
|
||||
max: 450,
|
||||
message: '450 caractères maximum'
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('#code_postal').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_codepostal',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 1,
|
||||
});
|
||||
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
// Javascript to enable link to tab
|
||||
var hash = document.location.hash;
|
||||
if (hash) {
|
||||
console.log(hash);
|
||||
$('.nav-tabs a[href="'+hash+'"]').tab('show');
|
||||
}
|
||||
|
||||
// Change hash for page-reload
|
||||
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
|
||||
window.location.hash = e.target.hash;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div> <!-- slot contant -->
|
||||
</metal:block>
|
||||
116
aem_gestion/templates/crm/contact_lookup.pt
Normal file
116
aem_gestion/templates/crm/contact_lookup.pt
Normal file
@@ -0,0 +1,116 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
|
||||
<form id="member-search-form" class="form-horizontal" role="form" action="${url}" method="post">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Nom, Code ou No mobile du contact</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" name="name" value="${name}" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- case a cocher "Afficher fiches cloturées" -->
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-4 col-xs-8">
|
||||
<input type="checkbox" name="cb_tous" value="cb_tous"
|
||||
tal:attributes="checked cb_tous == 'oui' and 'checked' or None">
|
||||
Afficher les fiches cloturées</input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-4 col-xs-8">
|
||||
<button class="btn btn-primary" id="submitButton" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-search"></span> Rechercher</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div><!-- row -->
|
||||
|
||||
<div class="row" tal:condition="nb > 0">
|
||||
<table id="contacts_list" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Nom, Prénom</th>
|
||||
<th>Permis</th>
|
||||
<th>Créé le</th>
|
||||
<th>Tél. port.</th>
|
||||
<th>C. postal</th>
|
||||
<th>Statut</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$.fn.dataTable.moment('DD/MM/YYYY');
|
||||
$('#contacts_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ "targets": 0,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/contact_edit/' + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
],
|
||||
createdRow: function( row, data, dataIndex ) {
|
||||
if ( data[6] == "Gagné" ) {
|
||||
$('td', row).eq(6).css('background-color', 'LightGreen');
|
||||
}
|
||||
if ( data[6] == "Perdu" ) {
|
||||
$('td', row).eq(6).css('background-color', 'LightPink');
|
||||
}
|
||||
},
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
$('#member-search-form').formValidation({
|
||||
framework: 'bootstrap',
|
||||
message: 'This value is not valid',
|
||||
icon: {
|
||||
valid: 'glyphicon glyphicon-ok',
|
||||
invalid: 'glyphicon glyphicon-remove',
|
||||
validating: 'glyphicon glyphicon-refresh'
|
||||
},
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Le nom ou le code est obligatoire'
|
||||
},
|
||||
stringLength: {
|
||||
min: 2,
|
||||
max: 30,
|
||||
message: 'Le nom ou le code doit avoir de 2 à 30 caractères de long'
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
var code = e.keyCode || e.which;
|
||||
if (code === 13) {
|
||||
e.preventDefault();
|
||||
// simuler clic bouton submit
|
||||
document.getElementById("submitButton").click();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
59
aem_gestion/templates/crm/contact_suivi.pt
Normal file
59
aem_gestion/templates/crm/contact_suivi.pt
Normal file
@@ -0,0 +1,59 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form id="contact_suivi-form" action="${url}" method="post" class="form-horizontal">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="infos">Texte</label>
|
||||
<div class="col-xs-8">
|
||||
<textarea class="form-control" rows="20" cols="40" id="infos" name="infos">${item.infos}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<a href="${request.application_url}/contact_edit/${item.cd_prospect}#suivi" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted" tal:condition="readonly==False">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<button class="btn btn-warning" type="submit" name="form.deleted" tal:condition="readonly==False and no_ligne!='0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#contact_suivi-form').formValidation({
|
||||
framework: 'bootstrap',
|
||||
message: 'This value is not valid',
|
||||
icon: {
|
||||
valid: 'glyphicon glyphicon-ok',
|
||||
invalid: 'glyphicon glyphicon-remove',
|
||||
validating: 'glyphicon glyphicon-refresh'
|
||||
},
|
||||
fields: {
|
||||
infos: {
|
||||
validators: {
|
||||
stringLength: {
|
||||
max: 900,
|
||||
message: '900 caractères maximum'
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
80
aem_gestion/templates/crm/contacts_list.pt
Normal file
80
aem_gestion/templates/crm/contacts_list.pt
Normal file
@@ -0,0 +1,80 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<form id="frm-contacts_list" action="${request.application_url}/contacts_list" method="POST" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-xs-6">
|
||||
<a href="${request.application_url}" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="${request.application_url}/contact_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau contact</a>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<a href="${request.application_url}/contact_lookup" class="btn btn-primary btn-lg" role="button">
|
||||
<span class="glyphicon glyphicon-search"></span> RECHERCHE</a>
|
||||
<a href="${request.application_url}/agenda/today" class="btn btn-primary btn-lg" role="button">
|
||||
<span class="glyphicon glyphicon-calendar"></span> AGENDA</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<table id="contacts_list" class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Créé le</th>
|
||||
<th>Nom Prénom</th>
|
||||
<th>Type de permis</th>
|
||||
<th>A relancer</th>
|
||||
<th>Contact</th>
|
||||
<th>Relance 1</th>
|
||||
<th>Relance 2</th>
|
||||
<th>Relance 3</th>
|
||||
<th>Proch. rdv</th>
|
||||
<th>Statut</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD/MM/YYYY');
|
||||
$('#contacts_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ "targets": 1,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/contact_edit/' + data.substring(0, 6) + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
{ targets: 4,
|
||||
render: function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
if (type === 'display' && data != '')
|
||||
{ data = '<span></span><a href="tel:' + data + '"> <span class="glyphicon glyphicon-earphone"></span></a>'+data+'<span>'; }
|
||||
else
|
||||
{ date = ''; }
|
||||
return data;
|
||||
},
|
||||
},
|
||||
],
|
||||
order: [[ 0, "desc" ]]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
348
aem_gestion/templates/crm/devis_cpf_frm.pt
Normal file
348
aem_gestion/templates/crm/devis_cpf_frm.pt
Normal file
@@ -0,0 +1,348 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form id="devis_cpf_frm" action="${url}" method="post" class="form-horizontal">
|
||||
|
||||
<!-- Phase : DEMANDE -->
|
||||
<h4 class="text-primary">1. Demande</h4>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="cd_prospect">Code prospect</label>
|
||||
<div class="col-xs-2 text-primary">
|
||||
<p class="form-control-static"><b>${devis.cd_prospect}</b></p>
|
||||
</div>
|
||||
<div class="col-xs-2 text-right"><b>Code élève</b></div>
|
||||
<div class="col-xs-4 text-danger"><b>${devis.cd_cli}</b></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="type_devis">Type de PEC</label>
|
||||
<div class="col-xs-8" tal:condition="etape <= 3">
|
||||
<select class="form-control" id="type_devis" name="type_devis">
|
||||
<div tal:repeat="item types_devis">
|
||||
<option value="${item.type_devis}" tal:attributes="selected devis.type_devis==item.type_devis and 'selected' or None">${item.libelle}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-8" tal:condition="etape > 3">
|
||||
<input class="form-control" type="text" id="type_devis" name="type_devis" value="${devis.type_devis}" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="montant_pec">Montant de PEC</label>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">TTC</span>
|
||||
<input class="form-control" type="text" id="montant_pec" name="montant_pec" value="${devis.montant_pec}" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">HT</span>
|
||||
<input class="form-control" type="text" id="montant_ht" name="montant_ht" value="${devis.montant_ht}" readonly />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="nb_heures_pec">Nombre d'heures</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="nb_heures_pec" name="nb_heures_pec" value="${devis.nb_heures_pec}" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="no_dossier">Numéro de dossier</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="no_dossier" name="no_dossier" value="${devis.no_dossier}"
|
||||
placeholder="(20 car. max.)"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le Numéro de dossier< est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="demande_le">Date de demande</label>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group date" id="demande_le">
|
||||
<input class="form-control" type="text" name="demande_le" value="${layout.date2dmy(devis.demande_le)}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La Date de damande est obligatoire"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="demande_log" name="demande_log" value="${devis.demande_log}"
|
||||
placeholder="Commentaire (20 car. max.)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-4 col-sm-8">
|
||||
<a href="${url_retour}" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted" tal:condition="devis.cloture_le == None and devis.accepte_le == None">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<a href="/confirm/${no_devis}/leave" class="btn btn-danger" role="button" tal:condition="no_devis != '0' and devis.facture_mt==0">
|
||||
<span class="glyphicon glyphicon-remove"></span> Abandon</a>
|
||||
<a href="/confirm/${no_devis}/cancel" class="btn btn-warning" role="button" tal:condition="no_devis != '0' and devis.facture_mt==0">
|
||||
<span class="glyphicon glyphicon-remove"></span> Refus AEM</a>
|
||||
<a href="/confirm/${no_devis}/error" class="btn btn-warning" role="button" tal:condition="no_devis != '0' and devis.facture_mt==0">
|
||||
<span class="glyphicon glyphicon-remove"></span> Annulation AEM</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Phase : FORMATION -->
|
||||
<div tal:condition="etape >= 2">
|
||||
<h4 class="text-primary">2. Formation</h4>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="formation_debut_le">Début du programme prévu le</label>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group date" id="formation_debut_le">
|
||||
<input class="form-control" type="text" name="formation_debut_le" value="${layout.date2dmy(devis.formation_debut_le)}"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="formation_fin_le">Fin du programme prévu le</label>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group date" id="formation_fin_le">
|
||||
<input class="form-control" type="text" name="formation_fin_le" value="${layout.date2dmy(devis.formation_fin_le)}"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="fin_pec_le">Date de fin PEC</label>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group date" id="fin_pec_le">
|
||||
<input class="form-control" type="text" name="fin_pec_le" value="${layout.date2dmy(devis.fin_pec_le)}"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="validation_log" name="validation_log" value="${devis.validation_log}"
|
||||
placeholder="Commentaire (20 car. max.)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="accepte_le">Date d'acceptation</label>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group date" id="accepte_le">
|
||||
<input class="form-control" type="text" name="accepte_le" value="${layout.date2dmy(devis.accepte_le)}"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="accepte_log" name="accepte_log" value="${devis.accepte_log}"
|
||||
placeholder="Commentaire (20 car. max.)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="debut_renseigne_le">Date d'entrée déclarée</label>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group date" id="debut_renseigne_le">
|
||||
<input class="form-control" type="text" name="debut_renseigne_le" value="${layout.date2dmy(devis.debut_renseigne_le)}"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="debut_renseigne_log" name="debut_renseigne_log" value="${devis.debut_renseigne_log}"
|
||||
placeholder="Commentaire (20 car. max.)" />
|
||||
</div>
|
||||
<p class="col-xs-offset-4 col-xs-8 text-danger">Attention : ne pas oublier de renseigner le portail CPF </p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-4 col-sm-8">
|
||||
<button class="btn btn-primary" type="submit" name="form.formation" tal:condition="devis.cloture_le == None and devis.fin_renseigne_le == None">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Phase : FACTURATION -->
|
||||
<div tal:condition="etape >= 3">
|
||||
<h4 class="text-primary">3. Facturation</h4>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="fin_renseigne_le">Date de sortie déclarée</label>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group date" id="fin_renseigne_le">
|
||||
<input class="form-control" type="text" name="fin_renseigne_le" value="${layout.date2dmy(devis.fin_renseigne_le)}"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="nb_heures_effectue">Nombre d'heures effectué</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="nb_heures_effectue" name="nb_heures_effectue" value="${devis.nb_heures_effectue}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre d'heures est invalide" />
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="fin_renseigne_log" name="fin_renseigne_log" value="${devis.fin_renseigne_log}"
|
||||
placeholder="Commentaire (20 car. max.)" />
|
||||
</div>
|
||||
<p class="col-xs-offset-4 col-xs-8 text-danger">Attention : ne pas oublier de renseigner le portail CPF </p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="facture_mt">Montant facturé</label>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="facture_mt" name="facture_mt" value="${devis.facture_mt}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le montant de PEC est obligatoire"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="facture_log" name="facture_log" value="${devis.facture_log}"
|
||||
placeholder="Commentaire (20 car. max.)" />
|
||||
</div>
|
||||
<p class="col-xs-offset-4 col-xs-8 text-danger">Attention : ne pas oublier de renseigner le portail CPF </p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" >Numéro facture</label>
|
||||
<div class="col-xs-4">
|
||||
<p class="form-control-static">${devis.no_facture} <b> du </b>${layout.date2dmy(devis.date_facture)} </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-4 col-sm-8">
|
||||
<button class="btn btn-primary" type="submit" name="form.facturation" tal:condition="devis.cloture_le == None">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" tal:condition="devis.cloture_le">
|
||||
<label class="control-label col-xs-4" for="cloture_le">Date de clôture</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${devis.cloture_le.strftime('%d/%m/%Y')} (${devis.statut})</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="cd_prospect">Date de création</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${devis.cree_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4" for="cd_prospect">Dernière modifcation</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${devis.modif_le.strftime('%d/%m/%Y - %H:%M')} par ${devis.cd_uti}</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<!-- Bootstrap Datepicker plugin -->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#devis_cpf_frm').formValidation();
|
||||
// faire une requete pour récuper le montant et nb heures
|
||||
$('#type_devis').on('change', function () {
|
||||
$.post('/ajax_type_devis',
|
||||
{type_devis: $('#type_devis').val()},
|
||||
function (data) {
|
||||
$('#montant_pec').val(data.montant);
|
||||
$('#montant_ht').val(data.montant_ht);
|
||||
$('#nb_heures_pec').val(data.nb_heures);
|
||||
});
|
||||
});
|
||||
$('#demande_le').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
}).on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#devis_cpf_frm').formValidation('revalidateField', 'demande_le');
|
||||
});
|
||||
$('#formation_debut_le').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
}).on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#devis_cpf_frm').formValidation('revalidateField', 'formation_debut_le');
|
||||
});
|
||||
$('#formation_fin_le').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
}).on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#devis_cpf_frm').formValidation('revalidateField', 'formation_fin_le');
|
||||
});
|
||||
$('#fin_pec_le').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
}).on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#devis_cpf_frm').formValidation('revalidateField', 'fin_pec_le');
|
||||
});
|
||||
$('#accepte_le').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
}).on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#devis_cpf_frm').formValidation('revalidateField', 'accepte_le');
|
||||
});
|
||||
$('#debut_renseigne_le').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
}).on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#devis_cpf_frm').formValidation('revalidateField', 'debut_renseigne_le');
|
||||
});
|
||||
$('#fin_renseigne_le').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
}).on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#devis_cpf_frm').formValidation('revalidateField', 'fin_renseigne_le');
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
215
aem_gestion/templates/crm/devis_frm.pt
Normal file
215
aem_gestion/templates/crm/devis_frm.pt
Normal file
@@ -0,0 +1,215 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form id="devis_frm" action="${url}" method="post" class="form-horizontal">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="cd_prospect">Code prospect</label>
|
||||
<div class="col-xs-8 text-primary">
|
||||
<p class="form-control-static"><b>${devis.cd_prospect}</b></p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4" for="cd_cli">Code élève</label>
|
||||
<div class="col-xs-8 text-danger">
|
||||
<p class="form-control-static"><b>${devis.cd_cli}</b></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="organisme">Organisme payeur</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="organisme" name="organisme" value="${devis.organisme}"
|
||||
placeholder="20 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="L'organisme est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="entreprise">Entreprise</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="entreprise" name="entreprise" value="${devis.entreprise}"
|
||||
placeholder="20 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="adr_org">Adresse</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="adr_org" name="adr_org" value="${devis.adr_org}"
|
||||
placeholder="40 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="L'adresse est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="adr2_org">Adresse 2</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="adr2_org" name="adr2_org" value="${devis.adr2_org}"
|
||||
placeholder="facultatif"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="cp_org">Code postal</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="cp_org" name="cp_org" value="${devis.cp_org}"
|
||||
placeholder="5 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le code postal est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="5"
|
||||
data-fv-stringlength-message="5 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="ville_org">Ville</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="ville_org" name="ville_org" value="${devis.ville_org}"
|
||||
placeholder="40 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La ville est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="type_devis">Type de devis</label>
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" id="type_devis" name="type_devis">
|
||||
<div tal:repeat="item types_devis">
|
||||
<option value="${item.type_devis}" tal:attributes="selected devis.type_devis==item.type_devis and 'selected' or None">${item.libelle}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="no_pec">Numéro de PEC</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static"><b>${devis.no_pec}</b>
|
||||
<span tal:condition="devis.date_pec"> du <b>${devis.date_pec.strftime('%d/%m/%Y')}</b></span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="date_pec">Nombre d'heures</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${devis.nb_heures_pec} h</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="date_debut_pec">Période de PEC</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">
|
||||
<span tal:condition="devis.date_debut_pec">du <b>${devis.date_debut_pec.strftime('%d/%m/%Y')}</b></span>
|
||||
<span tal:condition="devis.date_fin_pec"> au <b>${devis.date_fin_pec.strftime('%d/%m/%Y')}</b></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="montant_pec">Montant de PEC</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${layout.to_euro(devis.montant_pec)} (TVA : ${devis.taux_tva}%)</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-offset-4 col-sm-8">
|
||||
<table class="table table-condensed table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No facture</th>
|
||||
<th>Date</th>
|
||||
<th class="text-right">Montant</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:condition="devis.date_facture1">
|
||||
<td>${devis.no_facture1}</td>
|
||||
<td>${devis.date_facture1.strftime('%d-%m-%Y')}</td>
|
||||
<td>${layout.to_euro(devis.mt_facture1)}</td>
|
||||
</tr>
|
||||
<tr tal:condition="devis.date_facture2">
|
||||
<td>${devis.no_facture2}</td>
|
||||
<td>${devis.date_facture2.strftime('%d-%m-%Y')}</td>
|
||||
<td>${layout.to_euro(devis.mt_facture2)}</td>
|
||||
</tr>
|
||||
<tr tal:condition="devis.date_facture3">
|
||||
<td>${devis.no_facture3}</td>
|
||||
<td>${devis.date_facture3.strftime('%d-%m-%Y')}</td>
|
||||
<td>${layout.to_euro(devis.mt_facture3)}</td>
|
||||
</tr>
|
||||
<tr tal:condition="devis.date_facture4">
|
||||
<td>${devis.no_facture4}</td>
|
||||
<td>${devis.date_facture4.strftime('%d-%m-%Y')}</td>
|
||||
<td>${layout.to_euro(devis.mt_facture4)}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="montant_pec">Reste à facturer</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static text-danger">${layout.to_euro(devis.reste_a_facturer)}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" tal:condition="devis.date_edition">
|
||||
<label class="control-label col-xs-4" for="date_edition">Date d'édition</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static"><b>${devis.date_edition.strftime('%d/%m/%Y')}</b></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" tal:condition="devis.cloture_le">
|
||||
<label class="control-label col-xs-4" for="cloture_le">Date de clôture</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${devis.cloture_le.strftime('%d/%m/%Y')} (${devis.statut})</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="cd_prospect">Date de création</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${devis.cree_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4" for="cd_prospect">Dernière modifcation</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${devis.modif_le.strftime('%d/%m/%Y - %H:%M')} par ${devis.cd_uti}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-4 col-sm-8">
|
||||
<a href="${url_retour}" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<a href="/devis_pec/${no_devis}/${code}" class="btn btn-success" role="button" tal:condition="no_devis != '0' and access == 9">
|
||||
<span class="glyphicon glyphicon-pencil"></span> Saisir la PEC</a>
|
||||
<a href="http://devng.marietton.com/PDF/devisPEC-pdf.php?no_devis=${no_devis}" class="btn btn-warning" role="button"
|
||||
tal:condition="no_devis != '0'">
|
||||
<span class="glyphicon glyphicon-print"></span> Editer devis</a>
|
||||
<button class="btn btn-danger" type="submit" name="form.abandoned" tal:condition="no_devis != '0' and devis.montant_pec==0">
|
||||
<span class="glyphicon glyphicon-remove"></span> Abandon Devis</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#devis_frm').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
184
aem_gestion/templates/crm/devis_pec.pt
Normal file
184
aem_gestion/templates/crm/devis_pec.pt
Normal file
@@ -0,0 +1,184 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form id="devis_pec_frm" action="${url}" method="post" class="form-horizontal">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="cd_prospect">Code prospect</label>
|
||||
<div class="col-xs-8 text-primary">
|
||||
<p class="form-control-static"><b>${devis.cd_prospect}</b></p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4" for="cd_cli">Code élève</label>
|
||||
<div class="col-xs-8 text-danger">
|
||||
<p class="form-control-static"><b>${devis.cd_cli}</b></p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4" for="cd_cli">Organisme payeur</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static"><b>${devis.organisme}</b></p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4" for="cd_cli">Entreprise</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static"><b>${devis.entreprise}</b></p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4" for="type_devis">Type de devis</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static"><b>${devis.type_devis}</b></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="no_pec">Numéro de PEC</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="no_pec" name="no_pec" value="${devis.no_pec}"
|
||||
placeholder="20 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="date_pec">Date de PEC</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group date" id="date_pec">
|
||||
<input class="form-control" type="text" name="date_pec" value="${date_pec}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La date de PEC est obligatoire"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="nb_heures_pec">Nombre d'heures</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="nb_heures_pec" name="nb_heures_pec" value="${devis.nb_heures_pec}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre d'heures est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="date_debut_pec">Date de début PEC</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group date" id="date_debut_pec">
|
||||
<input class="form-control" type="text" name="date_debut_pec" value="${date_debut_pec}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La date de début PEC est obligatoire"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="date_fin_pec">Date de fin PEC</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group date" id="date_fin_pec">
|
||||
<input class="form-control" type="text" name="date_fin_pec" value="${date_fin_pec}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La date de fin PEC est obligatoire"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="montant_pec">Montant de PEC</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="montant_pec" name="montant_pec" value="${devis.montant_pec}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le montant est de PEC est obligatoire"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="code_tva">Taux TVA</label>
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" id="code_tva" name="code_tva">
|
||||
<div tal:repeat="item codes_tva">
|
||||
<option value="${item.CODE}" tal:attributes="selected devis.code_tva==item.CODE and 'selected' or None">${item.TAUX} %</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="statut">Statut</label>
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" id="statut" name="statut">
|
||||
<div tal:repeat="item statuts">
|
||||
<option value="${item.CODE}" tal:attributes="selected devis.statut==item.CODE and 'selected' or None">${item.CODE} - ${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-4 col-sm-8">
|
||||
<a href="/devis_frm/${no_devis}/${code}" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<!-- Bootstrap Datepicker plugin -->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#devis_pec_frm').formValidation();
|
||||
$('#date_pec').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
})
|
||||
.on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#devis_pec_frm').formValidation('revalidateField', 'date_pec');
|
||||
});
|
||||
$('#date_debut_pec').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
})
|
||||
.on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#devis_pec_frm').formValidation('revalidateField', 'date_debut_pec');
|
||||
});
|
||||
$('#date_fin_pec').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
showClear: true,
|
||||
allowInputToggle: true,
|
||||
stepping: 15,
|
||||
})
|
||||
.on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#devis_pec_frm').formValidation('revalidateField', 'date_fin_pec');
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
14
aem_gestion/templates/default/404.pt
Normal file
14
aem_gestion/templates/default/404.pt
Normal file
@@ -0,0 +1,14 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="content text-center">
|
||||
<img src="${request.static_url('aem_gestion:static/img/logo.png')}" width="90" />
|
||||
<br />
|
||||
<br />
|
||||
<p class="lead"><span class="font-semi-bold">Désolé ! </span> La page demandée n'est pas encore créée.</p>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
18
aem_gestion/templates/default/affiche_message.pt
Normal file
18
aem_gestion/templates/default/affiche_message.pt
Normal file
@@ -0,0 +1,18 @@
|
||||
<metal:block use-macro="main_template">
|
||||
|
||||
<div metal:fill-slot="content">
|
||||
<div class="alert alert-info"
|
||||
tal:condition="messages"
|
||||
tal:repeat="message messages">
|
||||
<h4>${structure:message}</h4>
|
||||
</div>
|
||||
<p>
|
||||
<br />
|
||||
<a href="${url_identification}">Se connecter à mon compte</a>
|
||||
<br /><br />
|
||||
</p>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
</metal:block>
|
||||
62
aem_gestion/templates/default/change_agency.pt
Normal file
62
aem_gestion/templates/default/change_agency.pt
Normal file
@@ -0,0 +1,62 @@
|
||||
<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="user_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="individu"
|
||||
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" for="cd_uti">Identifiant</label>
|
||||
<div class="col-xs-2">
|
||||
<p class="form-control-static">${individu.cd_uti}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="intitule">Nom et prénom</label>
|
||||
<div class="col-xs-5">
|
||||
<p class="form-control-static">${individu.nom}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="agence">Agence par défaut</label>
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control" id="agence" name="agence">
|
||||
<div tal:repeat="item agences">
|
||||
<option value="${item.CODE}" tal:attributes="selected individu.agence==item.CODE and 'selected' or None">${item.CODE} | ${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#user_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
63
aem_gestion/templates/default/change_password.pt
Normal file
63
aem_gestion/templates/default/change_password.pt
Normal file
@@ -0,0 +1,63 @@
|
||||
<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="change-password-form" class="form-horizontal" action="${url}" method="post" tal:condition="member"
|
||||
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">Mot de passe actuel</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="password" name="old_password"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le mot de passe est obligatoire" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Nouveau mot de passe</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="password" name="new_password1"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le mot de passe est obligatoire" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Confirmer le mot de passe</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="password" name="new_password2"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-identical="true"
|
||||
data-fv-identical-field="password"
|
||||
data-fv-identical-message="Le mot de passe et sa confirmation ne sont pas identiques" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-3 col-xs-4">
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#change-password-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
35
aem_gestion/templates/default/connecter_a.pt
Normal file
35
aem_gestion/templates/default/connecter_a.pt
Normal file
@@ -0,0 +1,35 @@
|
||||
<metal:block use-macro="main_template">
|
||||
|
||||
<div metal:fill-slot="content">
|
||||
<br />
|
||||
<div id="detail" class="col-md-8">
|
||||
|
||||
<form id="connecter_a-form" role="form" action="${url}" method="post">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="matricule">Matricule du compte à prendre en main:</label>
|
||||
<input class="form-control" type="text" id="matricule" name="login" value="" placeholder="Code élève à prendre en main"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" name="form.submitted" value="Se connecter à" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- detail -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#connecter_a-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
</metal:block>
|
||||
|
||||
45
aem_gestion/templates/default/email_password.pt
Normal file
45
aem_gestion/templates/default/email_password.pt
Normal file
@@ -0,0 +1,45 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form id="email_pwd-form" role="form" action="${url}" method="post" class="form-horizontal"
|
||||
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-sm-3" for="login">Entrez votre code utilisateur</label>
|
||||
<div class="col-sm-3">
|
||||
<input class="form-control" type="text" name="login" placeholder="Le code utilisateur à 3 caractères"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le code utilisateur est obligatoire" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-3">
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-send"></span> Envoyer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<p>
|
||||
Un lien permettant de redéfinir votre mot de passe vous sera transmis à l'adresse email enregistrée dans votre fiche utilisateur.
|
||||
</p>
|
||||
</div><!-- row -->
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#email_pwd-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
211
aem_gestion/templates/default/home.pt
Normal file
211
aem_gestion/templates/default/home.pt
Normal file
@@ -0,0 +1,211 @@
|
||||
<metal:block use-macro="main_template">
|
||||
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="container-fluid text-center">
|
||||
<br />
|
||||
<!-- row 1 -->
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/monplanning/codeMon/today">
|
||||
<span class="glyphicon glyphicon-calendar logo-small"></span><br />
|
||||
<h4>MON PLANNING</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/planningb">
|
||||
<span class="glyphicon glyphicon-calendar logo-small"></span><br />
|
||||
<h4>PLANNING AGENCE</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/plannings">
|
||||
<span class="glyphicon glyphicon-calendar logo-small"></span><br />
|
||||
<h4>LES PLANNINGS</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/examens_schd/today/B">
|
||||
<span class="glyphicon glyphicon-blackboard logo-small"></span><br />
|
||||
<h4>EXAMENS</h4></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- row 2 -->
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/eleves">
|
||||
<span class="glyphicon glyphicon-search logo-small"></span>
|
||||
<h4>RECHERCHE ELEVE</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/show_iframe/msgerie">
|
||||
<span class="glyphicon glyphicon-envelope logo-small"></span>
|
||||
<h4>MESSAGES <span class="badge">${nlus}</span></h4></a>
|
||||
</div> <div class="col-sm-3">
|
||||
<a href="${request.application_url}/show_iframe/smartcode">
|
||||
<span class="glyphicon glyphicon-warning-sign logo-small"></span>
|
||||
<h4>SMARTCODE</h4></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- row 3 -->
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/show_iframe/dessin">
|
||||
<span class="glyphicon glyphicon-picture logo-primary"></span>
|
||||
<h4>DESSIN</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/show_iframe/infos">
|
||||
<span class="glyphicon glyphicon-question-sign logo-primary"></span>
|
||||
<h4>AIDE & INFOS</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/show_iframe/pedagogie">
|
||||
<span class="glyphicon glyphicon-education logo-primary"></span>
|
||||
<h4>PEDAGOGIE</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/show_iframe/pedagoGL">
|
||||
<span class="glyphicon glyphicon-road logo-primary"></span>
|
||||
<h4>PEDAGOGIE GL</h4></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- row 4 -->
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/contacts_list">
|
||||
<span class="glyphicon glyphicon-screenshot logo-success"></span><br />
|
||||
<h4>CRM</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3" tal:condition="access >= 6 ">
|
||||
<a href="${request.application_url}/jnl_caisse">
|
||||
<span class="glyphicon glyphicon-modal-window logo-success"></span><br />
|
||||
<h4>JNL CAISSE</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3" tal:condition="access >= 6 ">
|
||||
<a href="${request.application_url}/last_emailing"><span class="glyphicon glyphicon-envelope logo-success"></span></a>
|
||||
<h4>Rappels RDV et RESA</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/show_iframe/agences">
|
||||
<span class="glyphicon glyphicon-map-marker logo-success"></span>
|
||||
<h4>AGENCES</h4></a>
|
||||
</div>
|
||||
</div> <!-- row 4 -->
|
||||
|
||||
<div class="row">
|
||||
<!-- Réussites aux examens par agence -->
|
||||
<h2>Challenge réussite Marietton</h2>
|
||||
<div class="col-md-6">
|
||||
<!-- Bar chart année N-2 -->
|
||||
<div id="barChart_annee_3" style="width: 100%; height: 500px;"></div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<!-- Bar chart année N-1 -->
|
||||
<div id="barChart_annee_2" style="width: 100%; height: 500px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<!-- Bar chart année N -->
|
||||
<div id="barChart_annee_1" style="width: 100%; height: 500px;"></div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div id="barChart_annee" style="width: 100%; height: 500px;"></div>
|
||||
</div>
|
||||
</div> <!-- row 5 -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<br />
|
||||
<br />
|
||||
<a href="${request.application_url}/stats_exam1">
|
||||
<span class="glyphicon glyphicon-stats logo-primary"></span><br />
|
||||
<h4>HISTORIQUE par AGENCE</h4></a>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<br />
|
||||
<br />
|
||||
<a href="${request.application_url}/stats_exam2">
|
||||
<span class="glyphicon glyphicon-stats logo-primary"></span><br />
|
||||
<h4>HISTORIQUE par MONITEUR</h4></a>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
||||
<script type="text/javascript">
|
||||
google.charts.load("current", {packages:['corechart', 'bar']});
|
||||
google.charts.setOnLoadCallback(drawChart);
|
||||
var dataSet_annee_3 = ${bar_annee_3};
|
||||
var dataSet_annee_2 = ${bar_annee_2};
|
||||
var dataSet_annee_1 = ${bar_annee_1};
|
||||
var dataSet_annee = ${bar_annee};
|
||||
|
||||
function drawChart() {
|
||||
var data_annee_3 = google.visualization.arrayToDataTable(dataSet_annee_3);
|
||||
var data_annee_2 = google.visualization.arrayToDataTable(dataSet_annee_2);
|
||||
var data_annee_1 = google.visualization.arrayToDataTable(dataSet_annee_1);
|
||||
var data_annee = google.visualization.arrayToDataTable(dataSet_annee);
|
||||
var options_annee_3 = {
|
||||
title: '${title_3}',
|
||||
legend: 'none',
|
||||
hAxis: {
|
||||
viewWindow: {
|
||||
min: 0,
|
||||
max: 100
|
||||
},
|
||||
ticks: [0, 20, 40, 60, 80, 100] // display labels every 20
|
||||
}
|
||||
};
|
||||
var options_annee_2 = {
|
||||
title: '${title_2}',
|
||||
legend: 'none',
|
||||
hAxis: {
|
||||
viewWindow: {
|
||||
min: 0,
|
||||
max: 100
|
||||
},
|
||||
ticks: [0, 20, 40, 60, 80, 100] // display labels every 20
|
||||
}
|
||||
};
|
||||
var options_annee_1 = {
|
||||
title: '${title_1}',
|
||||
legend: 'none',
|
||||
hAxis: {
|
||||
viewWindow: {
|
||||
min: 0,
|
||||
max: 100
|
||||
},
|
||||
ticks: [0, 20, 40, 60, 80, 100] // display labels every 20
|
||||
}
|
||||
};
|
||||
var options_annee = {
|
||||
title: '${title}',
|
||||
legend: 'none',
|
||||
hAxis: {
|
||||
viewWindow: {
|
||||
min: 0,
|
||||
max: 100
|
||||
},
|
||||
ticks: [0, 20, 40, 60, 80, 100] // display labels every 20
|
||||
}
|
||||
};
|
||||
|
||||
var chart_annee_3 = new google.visualization.BarChart(document.getElementById('barChart_annee_3'));
|
||||
chart_annee_3.draw(data_annee_3, options_annee_3);
|
||||
var chart_annee_2 = new google.visualization.BarChart(document.getElementById('barChart_annee_2'));
|
||||
chart_annee_2.draw(data_annee_2, options_annee_2);
|
||||
var chart_annee_1 = new google.visualization.BarChart(document.getElementById('barChart_annee_1'));
|
||||
chart_annee_1.draw(data_annee_1, options_annee_1);
|
||||
var chart_annee = new google.visualization.BarChart(document.getElementById('barChart_annee'));
|
||||
chart_annee.draw(data_annee, options_annee);
|
||||
}
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
124
aem_gestion/templates/default/login.pt
Normal file
124
aem_gestion/templates/default/login.pt
Normal file
@@ -0,0 +1,124 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
|
||||
<div class="col-md-offset-4 col-md-4 well">
|
||||
<form id="login-form" role="form" action="${url}" method="post">
|
||||
<input type="hidden" name="came_from" value="${came_from}"/>
|
||||
|
||||
<h3>Se connecter</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<input class="form-control" name="login" id="login" value="${login}" placeholder="Code utilisateur" type="text" />
|
||||
<span style="font-size:11px;color:#8f0a03" id="error"></span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<!-- label class="control-label" for="password">Mot de passe</label -->
|
||||
<input class="form-control" type="password" id="password" name="password" value="${password}" placeholder="Mot de passe" />
|
||||
</div>
|
||||
<div class="form-group hidden" id="form-agence">
|
||||
<select class="form-control" type="text" id="agence" name="agence" >
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button id="submitButton" class="btn btn-primary" disabled="disabled" type="submit" name="form.submitted">Se connecter</button>
|
||||
</div>
|
||||
|
||||
<p class="help-block">
|
||||
<a href="${request.route_url('email_password')}">Mot de passe oublié ?</a><br />
|
||||
</p>
|
||||
<p class="text-right">${device}</p>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#login-form').formValidation({
|
||||
framework: 'bootstrap',
|
||||
message: 'This value is not valid',
|
||||
icon: {
|
||||
valid: 'glyphicon glyphicon-ok',
|
||||
invalid: 'glyphicon glyphicon-remove',
|
||||
validating: 'glyphicon glyphicon-refresh'
|
||||
},
|
||||
fields: {
|
||||
login: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Le code utilisateur est obligatoire'
|
||||
},
|
||||
}
|
||||
},
|
||||
password: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Le mot de passe est obligatoire'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('form input').on('keypress', function(e) {
|
||||
var code = e.keyCode || e.which;
|
||||
if (code === 13) {
|
||||
e.preventDefault();
|
||||
// simuler clic bouton submit
|
||||
document.getElementById("submitButton").click();
|
||||
}
|
||||
});
|
||||
$('#login').on('change input',function(e){
|
||||
if(e.currentTarget.value.trim() != ''){
|
||||
$.ajax({
|
||||
url: "${request.application_url}/ajax_login",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data:{
|
||||
login: e.currentTarget.value.toUpperCase(),
|
||||
},
|
||||
success: function(data){
|
||||
$('#submitButton').attr('disabled','disabled');
|
||||
if(data.find == true){
|
||||
$('#error').text('');
|
||||
$('#agence').html('');
|
||||
if(data.mobile){
|
||||
$.each(data.agence,function(i,item){
|
||||
$('#agence').append(new Option(item.libelle, item.code));
|
||||
});
|
||||
$('#form-agence').removeClass('hidden');
|
||||
}
|
||||
else{
|
||||
$('#form-agence').addClass('hidden');
|
||||
}
|
||||
$('#submitButton').removeAttr('disabled');
|
||||
}
|
||||
else{
|
||||
$('#login').parent().removeClass('has-success').addClass('has-error');
|
||||
$('#error').text('Code utilisateur non trouvé');
|
||||
$('#form-agence').addClass('hidden');
|
||||
}
|
||||
},
|
||||
error: function(errMsg) {
|
||||
$('#agence').html('');
|
||||
$('#form-agence').addClass('hidden');
|
||||
$('#submitButton').attr('disabled','disabled');
|
||||
$('#error').text('Erreur de la connexion');
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
else{
|
||||
$('#error').text('');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
45
aem_gestion/templates/default/redefinir_mdp.pt
Normal file
45
aem_gestion/templates/default/redefinir_mdp.pt
Normal file
@@ -0,0 +1,45 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<form id="change-password-form" 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" for="new_password1">Nouveau mot de passe</label>
|
||||
<input class="form-control" type="password" size="10" name="new_password1"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le mot de passe est obligatoire"
|
||||
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-min="6"
|
||||
data-fv-stringlength-message="Le mot de passe doit avoir au moins 6 charactères" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="new_password2">Confirmer le mot de passe</label>
|
||||
<input class="form-control" type="password" size="10" name="new_password2"
|
||||
data-fv-identical="true"
|
||||
data-fv-identical-field="new_password1"
|
||||
data-fv-identical-message="Le mot de passe et sa confirmation ne sont pas identiques" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">Valider</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#change-password-form').formValidation();
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
68
aem_gestion/templates/eleves/doc_edit.pt
Normal file
68
aem_gestion/templates/eleves/doc_edit.pt
Normal file
@@ -0,0 +1,68 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<h3>${justif.LIBELLE}</h3>
|
||||
<p class="text-danger">${justif.conditions}</p>
|
||||
|
||||
<form id="upload_doc-form" action="${url}" method="post" class="form-horizontal"
|
||||
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" tal:condition="justif.code == 'PHOTO_ID'">
|
||||
<label class="control-label col-xs-4" for="libelle_fic">Code e-photo</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="libelle_fic" name="libelle_fic" value="${justif.libelle_fic}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="intitule">Nom du fichier</label>
|
||||
<div class="col-xs-8">
|
||||
<p>${justif.nom_fic}
|
||||
|
||||
<button class="btn btn-warning" type="submit" name="form.erased" tal:condition="justif.nom_fic">
|
||||
<i class="glyphicon glyphicon-erase"></i> Effacer fichier</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4">Taille du fichier</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${justif.taille_fic} Ko</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-4">Créé par</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${justif.cd_uti}, le ${justif.cree_le.strftime('%d/%m/%Y %H:%M')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" tal:condition="justif.type=='JUST'">
|
||||
<div class="col-xs-offset-4 col-xs-8 checkbox">
|
||||
<label><input type="checkbox" name="valide" value="justif.valide" id="valide"
|
||||
tal:attributes="checked justif.valide != 0 and 'checked' or None"><b>Le document est validé</b>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="col-sm-offset-4 col-sm-8">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${url_retour}">
|
||||
<span class="glyphicon glyphicon-arrow-left"></span> Retour</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<i class="glyphicon glyphicon-pencil"></i> Valider</button>
|
||||
<button class="btn btn-danger" type="submit" name="form.deleted">
|
||||
<i class="glyphicon glyphicon-remove"></i> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#uploadButton').on('click', function(){
|
||||
$('i.gly-spin').removeClass('gly-spin');
|
||||
$('i').addClass('gly-spin');
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
57
aem_gestion/templates/eleves/doc_upload.pt
Normal file
57
aem_gestion/templates/eleves/doc_upload.pt
Normal file
@@ -0,0 +1,57 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<span class="glyphicon glyphicon-plus"></span> ${justif.LIBELLE}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form id="upload_doc-form" action="${url}" method="post" accept-charset="utf-8" enctype="multipart/form-data"
|
||||
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 class="text-danger">${justif.conditions}</p>
|
||||
<div class="form-group" tal:condition="justif.code == 'PHOTO_ID'">
|
||||
<label class="control-label" for="libelle_fic">Veuillez saisir un code e-photo :</label>
|
||||
<div>
|
||||
<input class="form-control" type="text" id="libelle_fic" name="libelle_fic" value="${justif.libelle_fic}">
|
||||
</div>
|
||||
<br />
|
||||
<p><b>ou bien </b></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="uploadfile">Veuillez séléctionner un fichier</label>
|
||||
<span class="btn btn-default btn-file">
|
||||
<input class="file" id="uploadfile" name="uploadfile" type="file" multiple />
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${url_retour}">
|
||||
<span class="glyphicon glyphicon-arrow-left"></span> Retour</a>
|
||||
<button id="uploadButton" class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<i class="glyphicon glyphicon-refresh"></i> Télécharger</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<ul>
|
||||
<li>Seuls les documents au format <b>PNG, JPG ou JPEG</b> seront acceptés.</li>
|
||||
<li>La taille de chaque document ne doit <b>pas dépasser 4 Mo</b>.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#uploadButton').on('click', function(){
|
||||
$('i.gly-spin').removeClass('gly-spin');
|
||||
$('i').addClass('gly-spin');
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
407
aem_gestion/templates/eleves/eleve_credit.pt
Normal file
407
aem_gestion/templates/eleves/eleve_credit.pt
Normal file
@@ -0,0 +1,407 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<form id="change-eleve-details-form" class="form-horizontal container-fluid" action="${url}" method="post" tal:condition="eleve"
|
||||
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-md-3 control-label" for="DATE">Date</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" tal:attributes="readonly iseditable==False and 'readonly' or None" type="text" id="DATE" name="DATE" value="${date_credit}" placeholder="JJ/MM/AAAA"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La date est obligatoire" />
|
||||
<div id="no_validate_data" class="hidden"><small class="help-block" style="color:#a94442;">Date invalidé </small></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3" for="INTITULE">Intitule</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" id="INTITULE" name="INTITULE" value="${compte.INTITULE}"
|
||||
placeholder="40 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Intitule est obligatoire" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group " >
|
||||
<label class="control-label col-md-6 hidden-xs hidden-sm" style="margin-top:25px;"></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" for="CREDIT">Montant</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" tal:attributes="readonly iseditable==False and 'readonly' or None"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Montant obligatoire"
|
||||
id="CREDIT" name="CREDIT" value="${compte.CREDIT}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" for="MODE_REGL">Mode de Reglément</label>
|
||||
<div class="col-md-6">
|
||||
<select class="form-control" name="MODE_REGL" id="MODE_REGL" tal:attributes="readonly iseditable==False and 'readonly' or None" >
|
||||
<div tal:repeat="item mode_regls">
|
||||
<option value="${item.CODE}" tal:attributes="selected compte.MODE_REGL == item.CODE and 'selected' or None">${item.CODE} | ${item.LIB4}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6"> Ventilation du montant en : </label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" for="MT1"> Leçon : </label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control " tal:attributes="readonly iseditable==False and 'readonly' or None" type="text" id="MT1" name="MT1" value="${compte.MT1}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Vantilation du montant en Livre obligatoire" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" for="MT3">Livre : </label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" tal:attributes="readonly iseditable==False and 'readonly' or None" type="text" id="MT3" name="MT3" value="${compte.MT3}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Vantilation du montant en Livre obligatoire" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row" tal:condition="int(code)==9" >
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6">Comptabilisation </label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" for="DATE_VALEUR"> Date de valeur : </label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control " tal:attributes="readonly code != 9 and 'readonly' or None" type="text" id="DATE_VALEUR" name="DATE_VALEUR" value="${date_valeur}"
|
||||
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 (JJ/MM/AAAA)" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" for="MTVAL">Montant valeur : </label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="MTVAL" name="MTVAL" value="${compte.MTVAL}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" > Exporté le : ${date_exporte}</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6">No Chrono : ${compte.no_chrono}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-5">
|
||||
<a class="btn btn-default" tal:condition="eleve.CD_CLI != 0" href="${request.application_url}/fiche_eleve/${eleve.CD_CLI}#compte">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<a class="btn btn-default" tal:condition="eleve.CD_CLI == 0" href="${request.application_url}/eleves">
|
||||
<span class="glyphicon glyphicon-chevron-left" ></span> Annuler</a>
|
||||
<button class="btn btn-default" type="submit" name="form.send-email" tal:condition="no_ligne != 0">
|
||||
<span class="glyphicon glyphicon-envelope"></span> Email Reçu</button>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted" tal:condition="ismodifiable == True">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var code = ${code};
|
||||
|
||||
const notEmptyValidator = {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Date invalidé',
|
||||
callback: function(input) {
|
||||
return validateMontant(input)
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function compareDate(input){
|
||||
var replaced = input.replaceAll('/','-')
|
||||
var mm = moment.utc(replaced,'DD-MM-YYYY',true)
|
||||
if(mm.isValid()){
|
||||
var today = moment.utc(new Date())
|
||||
var times = mm.toDate().getTime() - today.toDate().getTime();
|
||||
var days = Math.round(times /(1000 * 3600 * 24));
|
||||
var mode = parseInt($('#MODE_REGL').val());
|
||||
console.log(days)
|
||||
if(days < 180 && days > -180 && ( code === 9 || (mode === 2 && days > 0 ))){
|
||||
$('#DATE_VALEUR').val(input);
|
||||
if((mode !== 2 && days !== -1) || (mode === 2 && days < 0)){
|
||||
$('#no_validate_data').removeClass("hidden");
|
||||
}
|
||||
else{
|
||||
$('#no_validate_data').addClass("hidden");
|
||||
}
|
||||
return {
|
||||
valid: true,
|
||||
}
|
||||
}
|
||||
else if(days === 0){
|
||||
$('#DATE_VALEUR').val(input);
|
||||
return {
|
||||
valid: true
|
||||
}
|
||||
}
|
||||
else{
|
||||
return {
|
||||
valid: false,
|
||||
message: 'Date invalidé pour ce mode de règlement'
|
||||
};
|
||||
}
|
||||
}
|
||||
else{
|
||||
return {
|
||||
valid: false,
|
||||
message: 'Date invalidé'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function verifyDate(input){
|
||||
var today = new Date();
|
||||
var replaced = input.replaceAll('/','-')
|
||||
var mm = moment(replaced,'DD-MM-YYYY',true)
|
||||
if(mm.isValid()){
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function validateDateValeur(input){
|
||||
var replaced = input.replaceAll('/','-')
|
||||
var mm = moment.utc(replaced,'DD-MM-YYYY',true)
|
||||
if(mm.isValid()){
|
||||
var today = moment.utc(new Date())
|
||||
var times = mm.toDate().getTime() - today.toDate().getTime();
|
||||
var days = Math.round(times /(1000 * 3600 * 24));
|
||||
if(days < 180 && days > -180 && (code === 9 || days >=0)){
|
||||
$('#DATE').val(input);
|
||||
return true
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function validateMontant(input){
|
||||
var mt1 = parseFloat($('#MT1').val())
|
||||
if(isNaN(mt1)){
|
||||
mt1 = 0.0
|
||||
}
|
||||
var mt3 = parseFloat($('#MT3').val())
|
||||
if(isNaN(mt3)){
|
||||
mt3 = 0.0
|
||||
}
|
||||
var somme = parseFloat(mt1 + mt3);
|
||||
var inputval = parseFloat(input) ;
|
||||
if(isNaN(inputval) || inputval !== somme){
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
$('#CREDIT').on('change input',function(){
|
||||
var credit = $('#CREDIT').val()
|
||||
var val3 = parseFloat($('#MT3').val())
|
||||
if(isNaN(val3)){
|
||||
val3 = 0.0
|
||||
}
|
||||
if(val3 <= 0 ){
|
||||
$('#MT1').val(credit)
|
||||
}
|
||||
})
|
||||
$('#MT1').on('change input',function(){
|
||||
var val1 = parseFloat($('#MT1').val())
|
||||
if(isNaN(val1)){
|
||||
val1 = 0.0
|
||||
}
|
||||
var val3 = parseFloat($('#MT3').val())
|
||||
if(isNaN(val3)){
|
||||
val3 = 0.0
|
||||
}
|
||||
var somme = val1+val3
|
||||
if(!isNaN(somme) && !$('#CREDIT').is('[disabled]')){
|
||||
$('#CREDIT').val(somme)
|
||||
}
|
||||
})
|
||||
$('#MT3').on('change input',function(){
|
||||
var val1 = parseFloat($('#MT1').val())
|
||||
if(isNaN(val1)){
|
||||
val1 = 0.0
|
||||
}
|
||||
var val3 = parseFloat($('#MT3').val())
|
||||
if(isNaN(val3)){
|
||||
val3 = 0.0
|
||||
}
|
||||
var somme = val1+val3
|
||||
if(!isNaN(somme) && !$('#CREDIT').is('[disabled]')){
|
||||
$('#CREDIT').val(somme)
|
||||
}
|
||||
})
|
||||
|
||||
var fv = $('#change-eleve-details-form').formValidation({
|
||||
fields: {
|
||||
DATE: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Date invalidé pour ce mode de règlement',
|
||||
callback: function(input) {
|
||||
return compareDate(input)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
DATE_VALEUR: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Date invalidé',
|
||||
callback: function(input) {
|
||||
return validateDateValeur(input)
|
||||
}
|
||||
},
|
||||
date: {
|
||||
format: '/DD/MM/YYYY',
|
||||
message: 'Date invalidé',
|
||||
}
|
||||
}
|
||||
},
|
||||
CREDIT: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Montant incompatible',
|
||||
callback: function(input) {
|
||||
var flt = parseFloat(input);
|
||||
return validateMontant(input) && !isNaN(flt);
|
||||
}
|
||||
},
|
||||
numeric: {
|
||||
message: 'Ce n\'est pas un montant validé',
|
||||
thousandsSeparator: '',
|
||||
decimalSeparator: '.'
|
||||
}
|
||||
}
|
||||
},
|
||||
MT1: {
|
||||
validators: {
|
||||
numeric: {
|
||||
message: 'Ce n\'est pas un montant validé',
|
||||
thousandsSeparator: '',
|
||||
decimalSeparator: '.'
|
||||
}
|
||||
}
|
||||
},
|
||||
MT3: {
|
||||
validators: {
|
||||
numeric: {
|
||||
message: 'Ce n\'est pas un montant validé',
|
||||
thousandsSeparator: '',
|
||||
decimalSeparator: '.'
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}).data();
|
||||
|
||||
$('#MODE_REGL').on('change',function(){
|
||||
var input = $('#DATE').val();
|
||||
if(!compareDate(input).valid){
|
||||
if(parseInt(this.value) != 2 ){
|
||||
fv.formValidation.updateStatus($('#DATE'),'INVALID').revalidateField($('#DATE'));
|
||||
fv.formValidation.validateField($('#DATE'));
|
||||
}
|
||||
else{
|
||||
fv.formValidation.validateField($('#DATE'))
|
||||
fv.formValidation.updateStatus($('#DATE'),'VALID');
|
||||
}
|
||||
}
|
||||
else{
|
||||
fv.formValidation.updateStatus($('#DATE'),'VALID');
|
||||
}
|
||||
});
|
||||
|
||||
$('#INTITULE').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_libelle_regl',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 1,
|
||||
});
|
||||
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
358
aem_gestion/templates/eleves/eleve_debit.pt
Normal file
358
aem_gestion/templates/eleves/eleve_debit.pt
Normal file
@@ -0,0 +1,358 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<form id="change-eleve-details-form" class="form-horizontal container-fluid" action="${url}" method="post" tal:condition="eleve"
|
||||
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-md-3 control-label" for="DATE">Date : </label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" tal:attributes="readonly iseditable==False and 'readonly' or None" id="DATE" name="DATE" value="${date_debit}" placeholder="JJ/MM/AAAA"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD/MM/YYYY"
|
||||
data-fv-date-message="La date n'est pas valide (JJ/MM/AAAA)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3" for="REF">Reference : </label>
|
||||
<div class="col-md-6">
|
||||
<select class="form-control reference" tal:attributes="readonly iseditable2==False and 'readonly' or None" >
|
||||
<div tal:repeat="item reference">
|
||||
<option value="${item}" tal:attributes="selected compte.REF == item.REF and 'selected' or None">${item.LIB}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<input class="form-control" type="text" tal:attributes="readonly iseditable2==False and 'readonly' or None" id="INTITULE" name="INTITULE" value="${compte.INTITULE}"
|
||||
placeholder="40 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Intitule est obligatoire" />
|
||||
</div>
|
||||
<input class="form-control" type="hidden" id="REF" name="REF" value="${compte.REF}"
|
||||
placeholder="40 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Intitule est obligatoire" />
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group " >
|
||||
<label class="control-label col-md-6 hidden-xs hidden-sm" style="margin-top:25px;"></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" for="QTE">Quantité</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" tal:attributes="readonly iseditable2==False or iseditable==False and 'readonly' or None"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Montant obligatoire"
|
||||
id="QTE" name="QTE" value="${compte.QTE}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" for="DEBIT">Montant</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" tal:attributes="readonly iseditable==False and 'readonly' or None"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Montant obligatoire"
|
||||
id="DEBIT" name="DEBIT" value="${compte.DEBIT}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6"> Heure de conduite : </label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" for="HEURE"> Heure : </label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control " type="text" id="HEURE" name="HEURE" value="${compte.HEURE}" readonly />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" for="STATUT">Statut : </label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="STATUT" name="STATUT" value="${compte.STATUT}" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-8" for="STATUT">A confirmer avant le : </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3" for="LIEU_RDV">Lieu rendez-vous :</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" id="LIEU_RDV" name="LIEU_RDV" value="${compte.LIEU_RDV}" disabled/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" tal:condition="int(code)>=9">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6">Comptabilisation </label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" for="DATE_VALEUR"> Date de valeur : </label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="DATE_VALEUR" name="DATE_VALEUR" value="${date_valeur}"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD/MM/YYYY"
|
||||
data-fv-date-message="La date n'est pas valide (JJ/MM/AAAA)" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" for="MTVAL">Montant valeur : </label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="MTVAL" name="MTVAL" value="${compte.MTVAL}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" for="COMPTE">Compte : </label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="COMPTE" name="COMPTE" value="${compte.COMPTE}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6 hidden-xs hidden-sm" style="margin-top:25px;"></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" id="CTVA_LABELLE" >TVA : ${compte.CTVA}</label>
|
||||
<input type="hidden" name="CTVA" id="CTVA" value="${compte.CTVA}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6 hidden-xs hidden-sm" style="margin-top:5px;"></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" > Exporté le : ${date_exporte}</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6">No Chrono : ${compte.no_chrono}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<div class="row" tal:condition="int(code) < 9">
|
||||
<input class="form-control" type="hidden" id="DATE_VALEUR_HIDDEN" name="DATE_VALEUR" value="${date_valeur}"/>
|
||||
<input class="form-control" type="hidden" id="MTVAL_HIDDEN" name="MTVAL" value="${compte.MTVAL}"/>
|
||||
<input class="form-control" type="hidden" id="COMPTE_HIDDEN" name="COMPTE" value="${compte.COMPTE}"/>
|
||||
<input type="hidden" name="CTVA" id="CTVA_HIDDEN" value="${compte.CTVA}" />
|
||||
</div>
|
||||
<br/>
|
||||
<!-- modal -->
|
||||
<div class="modal fade" id="deleteItem" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Suppression</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Confirmez-vous la suppression de cet element ?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted" tal:condition="no_ligne != 0 and isDeltable == True" >Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- modal -->
|
||||
<div class="modal fade" id="deleteItem" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Suppression</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Confirmez-vous la suppression de cet element ?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted" tal:condition="no_ligne != 0 and isDeltable == True" >Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-5">
|
||||
<button class="btn btn-danger" tal:condition="no_ligne != 0 and isDeltable == True" type="button" data-toggle="modal" data-target="#deleteItem">
|
||||
<span class="glyphicon glyphicon-trash"></span> Supprimer</button>
|
||||
<a class="btn btn-default" tal:condition="eleve.CD_CLI != 0" href="${request.application_url}/fiche_eleve/${eleve.CD_CLI}#compte">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<a class="btn btn-default" tal:condition="eleve.CD_CLI == 0" href="${request.application_url}/eleves">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" tal:condition="ismodifiable == True" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok" ></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
function compareDate(input){
|
||||
var today = new Date();
|
||||
var replaced = input.replaceAll('/','-')
|
||||
var mm = moment(replaced,'DD-MM-YYYY',true)
|
||||
if(mm.isValid()){
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
function validateHhMm(value) {
|
||||
var isValid = /^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$/.test(value);
|
||||
return isValid;
|
||||
}
|
||||
|
||||
$('select.reference').on('change',function(){
|
||||
var json_data = this.value.toString().replaceAll("'",'"')
|
||||
var data = JSON.parse(json_data);
|
||||
$('#REF').val(data['REF']);
|
||||
$('#INTITULE').val(data['LIB']);
|
||||
$('#CTVA').val(data['CTVA']);
|
||||
$('#CTVA_HIDDEN').val(data['CTVA']);
|
||||
$('#CTVA_LABELLE').text("TVA : "+data['CTVA']);
|
||||
$('#COMPTE').val(data['COMPTE']);
|
||||
$('#COMPTE_HIDDEN').val(data['COMPTE']);
|
||||
var debit = 0 ;
|
||||
var montant_valeur = 0;
|
||||
var montant = parseFloat(data['PUTTC'])
|
||||
var d = new Date();
|
||||
var datestring = ("0" + d.getDate()).slice(-2) + "/" + ("0"+(d.getMonth()+1)).slice(-2) + "/" +d.getFullYear()
|
||||
if(data['FAM'] === 'F'){
|
||||
montant_valeur = 0
|
||||
$('#DATE').val(datestring)
|
||||
$('#DATE_VALEUR').val(datestring)
|
||||
}
|
||||
else if(data['FAM'] === 'S'){
|
||||
montant_valeur = 0
|
||||
$('#DATE').val('')
|
||||
$('#DATE_VALEUR').val('')
|
||||
}
|
||||
else{
|
||||
$('#DATE').val(datestring)
|
||||
$('#DATE_VALEUR').val(datestring)
|
||||
montant_valeur = montant;
|
||||
if(data['FAM'] === 'H'){
|
||||
$('#STATUT').val(1);
|
||||
}
|
||||
}
|
||||
$('#MTVAL').val(montant_valeur);
|
||||
$('#MTVAL_HIDDEN').val(montant_valeur);
|
||||
$('#DATE_VALEUR_HIDDEN').val($('#DATE').val());
|
||||
$('#DEBIT').val(montant);
|
||||
});
|
||||
|
||||
$('#change-eleve-details-form').formValidation({
|
||||
fields: {
|
||||
/*DATE: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Date invalidé',
|
||||
callback: function(input) {
|
||||
return compareDate(input)
|
||||
}
|
||||
}
|
||||
}
|
||||
},*/
|
||||
HEURE : {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Heure invalidé',
|
||||
callback: function(input) {
|
||||
return validateHhMm(input)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
$('#INTITULE').autocomplete({
|
||||
source: function (request, response) {
|
||||
console.log(request);
|
||||
$.ajax({
|
||||
url:'/ajax_libelle_regl',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 1,
|
||||
});
|
||||
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
119
aem_gestion/templates/eleves/eleve_doc_prefecture.pt
Normal file
119
aem_gestion/templates/eleves/eleve_doc_prefecture.pt
Normal file
@@ -0,0 +1,119 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<form id="change-eleve-details-form" class="form-horizontal" action="${url}" method="post" tal:condition="eleve"
|
||||
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" id="matricule-form">
|
||||
<label class="col-xs-4 control-label">No immatriculation</label>
|
||||
<div class="col-xs-4" id="matricule-field">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" name="DOSSIER_NO" id="DOSSIER_NO"
|
||||
value="${eleve.DOSSIER_NO}"
|
||||
placeholder="NO."
|
||||
data-fv-integer="true"
|
||||
data-fv-integer-message="Ce nombre n'est pas vailde" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="save_date_form">
|
||||
<label class="col-xs-4 control-label">Enregistré le </label>
|
||||
<div class="col-xs-4" id="save_date_field">
|
||||
<div class="input-group" >
|
||||
<input class="form-control" type="text" name="DOSSIER_DATE" id="DOSSIER_DATE"
|
||||
value="${dossier_date}"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD/MM/YYYY"
|
||||
data-fv-date-message="La date n'est pas valide (JJ/MM/AAAA)"
|
||||
placeholder="JJ/MM/AAAA" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" tal:condition="code >= 6">
|
||||
<label class="control-label col-xs-4" for="AGENCE">Agence</label>
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control" id="AGENCE" name="AGENCE">
|
||||
<div tal:repeat="item agences">
|
||||
<option value="${item.CODE}" tal:attributes="selected eleve.AGENCE == item.CODE and 'selected' or None">${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" tal:condition="code >= 6">
|
||||
<label class="control-label col-xs-4" for="STATUT">Statut</label>
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control" id="STATUT" name="STATUT">
|
||||
<div tal:repeat="item status">
|
||||
<option value="${item.CODE}" tal:attributes="selected eleve.STATUT == item.CODE and 'selected' or None">${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-4 col-xs-5">
|
||||
<a class="btn btn-default" href="${request.application_url}/fiche_eleve/${eleve.CD_CLI}">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
const notEmptyValidator = {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Date d\'immatriculation obligatoire',
|
||||
enable : true
|
||||
},
|
||||
date: {
|
||||
format: 'DD/MM/YYYY',
|
||||
message: 'La date d\'immatriculation n\'est pas valide (JJ/MM/AAAA)',
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$("#DOSSIER_NO").on('change input',function(){
|
||||
var no_matricul = $("#DOSSIER_NO").val().trim();
|
||||
if(no_matricul != ''){
|
||||
$("#DOSSIER_DATE").prop("disabled", false);
|
||||
fv.formValidation.addField('DOSSIER_DATE',notEmptyValidator);
|
||||
}
|
||||
else{
|
||||
|
||||
fv.formValidation.removeField('DOSSIER_DATE').resetField('DOSSIER_DATE');
|
||||
$('#save_date_form').removeClass('has-feedback').removeClass('has-success').removeClass('has-error')
|
||||
$('#save_date_field').html("<div class=\"input-group\" > <input class=\"form-control\" type=\"text\" id=\"DOSSIER_DATE\" name=\"DOSSIER_DATE\"\n" +
|
||||
"value=\"\" placeholder=\"JJ/MM/AAAA\"/></div>");
|
||||
$("#DOSSIER_DATE").prop("disabled", true);
|
||||
}
|
||||
});
|
||||
var fv = $('#change-eleve-details-form').formValidation().data();
|
||||
var date_matric = $('#DOSSIER_DATE').val().trim();
|
||||
if (date_matric == ""){
|
||||
$("#DOSSIER_DATE").prop("disabled", true);
|
||||
}
|
||||
var no_matricul = $("#DOSSIER_NO").val().trim();
|
||||
if(no_matricul != ''){
|
||||
fv.formValidation.removeField('DOSSIER_DATE').resetField('DOSSIER_DATE');
|
||||
fv.formValidation.addField('DOSSIER_DATE',notEmptyValidator);
|
||||
}
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
532
aem_gestion/templates/eleves/eleve_edit.pt
Normal file
532
aem_gestion/templates/eleves/eleve_edit.pt
Normal file
@@ -0,0 +1,532 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<form id="change-eleve-details-form" class="form-horizontal" action="${url}" method="post" tal:condition="eleve"
|
||||
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-4" for="CIVILITE">Civilité</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control CIVILITE" name="CIVILITE" id="CIVILITE">
|
||||
<option value="M." tal:attributes="selected eleve.CIVILITE == 'M.' and 'selected' or None">M.</option>
|
||||
<option value="Mme" tal:attributes="selected eleve.CIVILITE == 'Mme' and 'selected' or None">Mme</option>
|
||||
<option value="Mlle" tal:attributes="selected eleve.CIVILITE == 'Mlle' and 'selected' or None">Mlle</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="NOM">Nom</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="NOM" name="NOM" value="${eleve.NOM}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le nom 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-4" for="PRENOM">Prénom</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="PRENOM" name="PRENOM" value="${eleve.PRENOM}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le prénom est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="37"
|
||||
data-fv-stringlength-message="37 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="nom_jf_form">
|
||||
<label class="col-xs-4 control-label">Nom de naissance</label>
|
||||
<div class="col-xs-5" id="nom_jf_field">
|
||||
<input class="form-control" type="text" name="NOM_JF"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="30"
|
||||
data-fv-stringlength-message="30 caractères maximum"
|
||||
value="${eleve.NOM_JF}" placeholder="Nom de naissance"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="CODEPOST">Code postal</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="CODEPOST" name="CODEPOST" value="${code_postal}"
|
||||
placeholder="5 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le code postal est obligatoire" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="adresse_no_voie">Numéro d'adresse</label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="adresse_no_voie" name="adresse_no_voie" value="${eleve.adresse_no_voie}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="4"
|
||||
data-fv-stringlength-message="4 caractères maximum" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-xs-2" for="adresse_extension">Extension</label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-stringlength-message="10 caractères maximum"
|
||||
id="adresse_extension" name="adresse_extension" value="${eleve.adresse_extension}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-xs-4" for="adresse_type_voie">Type de voie</label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum"
|
||||
id="adresse_type_voie" name="adresse_type_voie" value="${eleve.adresse_type_voie}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-xs-2" for="adresse_nom_voie">Nom de voie</label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="adresse_nom_voie" name="adresse_nom_voie" value="${eleve.adresse_nom_voie}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Nom de voie obligatoire" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="TEL">Téléphone fixe</label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="TEL" name="TEL" value="${eleve.TEL}"
|
||||
data-fv-phone="true"
|
||||
data-fv-phone-country="FR"
|
||||
data-fv-phone-message="Numéro de téléphone non valide" />
|
||||
<span class="input-group-addon" tal:condition="eleve.TEL">
|
||||
<a href="tel:${eleve.TEL}"><span class="glyphicon glyphicon-earphone"></span></a></span>
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-xs-2" for="TEL2">mobile</label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="TEL2" name="TEL2" value="${eleve.TEL2}"
|
||||
data-fv-phone="true"
|
||||
data-fv-phone-country="FR"
|
||||
data-fv-phone-message="Numéro de téléphone non valide" />
|
||||
<span class="input-group-addon" tal:condition="eleve.TEL2">
|
||||
<a href="tel:${eleve.TEL2}"><span class="glyphicon glyphicon-earphone"></span></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="TEL3">Téléphone père</label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="TEL3" name="TEL3" value="${eleve.TEL3}"
|
||||
data-fv-phone="true"
|
||||
data-fv-phone-country="FR"
|
||||
data-fv-phone-message="Numéro de téléphone non valide" />
|
||||
<span class="input-group-addon" tal:condition="eleve.TEL3">
|
||||
<a href="tel:${eleve.TEL3}"><span class="glyphicon glyphicon-earphone"></span></a></span>
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-xs-2" for="TEL4">mère</label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="TEL4" name="TEL4" value="${eleve.TEL4}"
|
||||
data-fv-phone="true"
|
||||
data-fv-phone-country="FR"
|
||||
data-fv-phone-message="Numéro de téléphone non valide" />
|
||||
<span class="input-group-addon" tal:condition="eleve.TEL4">
|
||||
<a href="tel:${eleve.TEL4}"><span class="glyphicon glyphicon-earphone"></span></a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Adresse email élève</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" name="email"
|
||||
value="${eleve.email}" placeholder="50 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="50"
|
||||
data-fv-stringlength-message="50 caractères maximum"
|
||||
data-fv-notempty-message="L'adresse email est obligatoire"
|
||||
data-fv-emailaddress="true"
|
||||
data-fv-emailaddress-message="L'adresse email n'est pas valide" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label" for="PROFESSION">Profession</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" name="PROFESSION" id="PROFESSION"
|
||||
value="${eleve.PROFESSION}" placeholder="20 caractères maximum"
|
||||
data-fv-notempty="false"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum"
|
||||
data-fv-notempty-message="La profession est obligatoire" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="TYPE_ENTREPRISE">Type élève</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control TYPE_ENTREPRISE" name="TYPE_ENTREPRISE" id="TYPE_ENTREPRISE">
|
||||
<option value="P" tal:attributes="selected eleve.TYPE_ENTREPRISE == 'P' and 'selected' or None">Particulier</option>
|
||||
<option value="E" tal:attributes="selected eleve.TYPE_ENTREPRISE == 'E' and 'selected' or None">Entreprise</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label" for="NATION">Nationalité</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control NATION" name="NATION" >
|
||||
<option tal:repeat="item nations" value="${item.pays}" tal:attributes="selected eleve.NATION == item.pays or item.pays == 'FRANCE' and 'selected' or None">${item.pays}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label" for="DATE_NAIS">Date de naissance</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="DATE_NAIS" name="DATE_NAIS" value="${date_nais}" placeholder="JJ/MM/AAAA"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La date de naissance est obligatoire"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD/MM/YYYY"
|
||||
data-fv-date-message="La date de naissance n'est pas valide (JJ/MM/AAAA)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label" for="LIEU_NAIS">Lieu de naissance</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIEU_NAIS" name="LIEU_NAIS" value="${eleve.LIEU_NAIS}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le lieu de naissance est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="26"
|
||||
data-fv-stringlength-message="26 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label" for="DEPT_NAIS">Département ou pays de naissance</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control DEPT_NAIS" name="DEPT_NAIS" >
|
||||
<option tal:repeat="item dept_nais" value="${item.code}" tal:attributes="selected eleve.DEPT_NAIS == item.code and 'selected' or None">${item.code}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="PERMIS_DEMANDE">Permis demandé</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="PERMIS_DEMANDE" name="PERMIS_DEMANDE" tal:attributes="disabled not can_change_permis and 'disabled' or None" >
|
||||
<div tal:repeat="item permis">
|
||||
<option value="${item.CAT}" tal:attributes="selected eleve.PERMIS_DEMANDE==item.CAT and 'selected' or None">${item.CAT}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="FORMULE">Formule</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" name="FORMULE" id="FORMULE">
|
||||
<option value="">---NR---</option>
|
||||
<div tal:repeat="item formules">
|
||||
<option value="${item.FORMULE}" tal:attributes="selected eleve.FORMULE == item.FORMULE and 'selected' or None">${item.FORMULE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="NePasSpammer"></label>
|
||||
<div class="col-xs-6">
|
||||
<input type="checkbox" name="NePasSpammer" value="oui" id="NePasSpammer"
|
||||
tal:attributes="checked eleve.NePasSpammer == 1 and 'checked' or None">
|
||||
Ne pas spammer (CNIL)</input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--? entreprise infos for student type E -->
|
||||
|
||||
<div class="entreprise_infos hidden" id="entreprise_infos" >
|
||||
<div class="form-group text-center">
|
||||
<h4 class="text-primary"><b>INFORMATION SUPPLEMENTAIRE</b></h4>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="NOM_ENTREPRISE">Nom de l'entreprise</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="NOM_ENTREPRISE" name="NOM_ENTREPRISE" value="${eleve.NOM_ENTREPRISE}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le nom de l'entreprise est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="25"
|
||||
data-fv-stringlength-message="25 caractères maximum"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="no_facture">No facture</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="facture_no" name="facture_no" value="${eleve.facture_no}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-stringlength-message="10 caractères maximum"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-xs-4" for="encours_societe">Encours autorisé</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" tal:attributes="disabled code != 9 and 'disabled' or None" type="text" id="encours_societe" name="encours_societe" value="${eleve.encours_societe}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-thousands-separator=''
|
||||
data-fv-numeric-decimal-separator='.'
|
||||
data-fv-numeric-message = "Entrer un montant validé"
|
||||
data-fv-notempty-message="Encours autorisé est obligatoire"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="NePasRelancer">Ne pas relancer si compte < 0</label>
|
||||
<div class="col-xs-6">
|
||||
<input type="checkbox" name="NePasRelancer" value="oui" id="NePasRelancer"
|
||||
tal:attributes="checked eleve.NePasRelancer == 1 and 'checked' or None">
|
||||
</input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-4 col-xs-5">
|
||||
<a class="btn btn-default" tal:condition="eleve.CD_CLI != 0" href="${request.application_url}/fiche_eleve/${eleve.CD_CLI}">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<a class="btn btn-default" tal:condition="eleve.CD_CLI == 0" href="${request.application_url}/eleves">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
const notEmptyValidator = {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Entrer le nom de naissance',
|
||||
enable : true
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$("#PERMIS_DEMANDE").change(function (){
|
||||
$("#FORMULE").empty()
|
||||
var permis = $(this).find("option:selected").val()
|
||||
$.ajax({
|
||||
url:'/ajax_valid_formules',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
permis: permis,
|
||||
},
|
||||
success: function (data) {
|
||||
$('#FORMULE').append($('<option>', {
|
||||
value: '',
|
||||
text: '---NR---'
|
||||
}))
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
$('#FORMULE').append($('<option>', {
|
||||
value: data[i].value,
|
||||
text: data[i].data
|
||||
}))
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function loadDefaultCivility(){
|
||||
var selVal = $( ".CIVILITE option:selected" ).val();
|
||||
if(selVal === "Mme"){
|
||||
fv.formValidation.addField('NOM_JF',notEmptyValidator)
|
||||
}
|
||||
else{
|
||||
fv.formValidation.removeField('NOM_JF').resetField('NOM_JF')
|
||||
$('#nom_jf_form').removeClass('has-feedback').removeClass('has-success').removeClass('has-error')
|
||||
$('#nom_jf_field').html("<input class=\"form-control\" type=\"text\" name=\"NOM_JF\"\n" +
|
||||
"value=\"${eleve.NOM_JF}\" placeholder=\"Nom de naissance\"/>")
|
||||
}
|
||||
}
|
||||
|
||||
function loadDefaultEntrepriseType(){
|
||||
// For unique choice
|
||||
var selVal = $( ".TYPE_ENTREPRISE option:selected" ).val();
|
||||
if(selVal === "E"){
|
||||
$('#entreprise_infos').show().removeClass('hidden')
|
||||
}
|
||||
else{
|
||||
$('#entreprise_infos').hide()
|
||||
}
|
||||
}
|
||||
|
||||
function compareDate(input){
|
||||
var today = new Date();
|
||||
var replaced = input.replaceAll('/','-')
|
||||
var mm = moment(replaced,'DD-MM-YYYY',true)
|
||||
if(mm.isValid()){
|
||||
var birthDate = mm.toDate();
|
||||
var age = today.getFullYear() - birthDate.getFullYear();
|
||||
if(age < 18){
|
||||
$('#representant_infos').show().removeClass('hidden')
|
||||
}
|
||||
else{
|
||||
$('#representant_infos').hide()
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
$('#representant_infos').hide()
|
||||
return false
|
||||
}
|
||||
}
|
||||
var valDateNaiss = $('#DATE_NAIS').val()
|
||||
if(valDateNaiss){
|
||||
compareDate(valDateNaiss);
|
||||
}
|
||||
var fv = $('#change-eleve-details-form').formValidation({
|
||||
fields: {
|
||||
DATE_NAIS: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: ' ',
|
||||
callback: function(input) {
|
||||
return compareDate(input)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}).data();
|
||||
|
||||
loadDefaultCivility();
|
||||
loadDefaultEntrepriseType();
|
||||
|
||||
$("#CIVILITE" ).on('change',function() {
|
||||
loadDefaultCivility();
|
||||
});
|
||||
|
||||
$("#TYPE_ENTREPRISE").on('change',function() {
|
||||
loadDefaultEntrepriseType();
|
||||
});
|
||||
|
||||
$('#CODEPOST').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_codepostal',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 1,
|
||||
});
|
||||
|
||||
$('#representant_cp').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_codepostal',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 1,
|
||||
});
|
||||
|
||||
$('#formule').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_formules',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response(data);
|
||||
},
|
||||
|
||||
});
|
||||
},
|
||||
minLength: 1,
|
||||
});
|
||||
|
||||
$('#DEPT_NAIS').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_dept_nais',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 2,
|
||||
});
|
||||
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
54
aem_gestion/templates/eleves/eleve_email.pt
Normal file
54
aem_gestion/templates/eleves/eleve_email.pt
Normal file
@@ -0,0 +1,54 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<form id="change-eleve-details-form" class="form-horizontal" action="${url}" method="post" tal:condition="eleve"
|
||||
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">Destinataire</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static">${destinataires}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Sujet</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static">${sujet}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Corps du message</label>
|
||||
<div class="col-xs-7 form-control-static">
|
||||
<div tal:replace="structure corps">
|
||||
Page text goes here.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-3 col-xs-7">
|
||||
<a class="btn btn-default" href="${request.application_url}/fiche_eleve/${eleve.CD_CLI}">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-send"></span> Envoyer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#change-eleve-details-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
110
aem_gestion/templates/eleves/eleve_entreprise.pt
Normal file
110
aem_gestion/templates/eleves/eleve_entreprise.pt
Normal file
@@ -0,0 +1,110 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<form id="change-eleve-details-form" class="form-horizontal" action="${url}" method="post" tal:condition="eleve"
|
||||
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">
|
||||
|
||||
|
||||
<!--? entreprise infos for student type E -->
|
||||
|
||||
<div class="entreprise_infos">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="NOM_ENTREPRISE">Nom de l'entreprise</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="NOM_ENTREPRISE" name="NOM_ENTREPRISE" value="${eleve.NOM_ENTREPRISE}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le nom de l'entreprise est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="25"
|
||||
data-fv-stringlength-message="25 caractères maximum"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="no_facture">No facture</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="facture_no" name="facture_no" value="${eleve.facture_no}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-stringlength-message="10 caractères maximum"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-xs-4" for="encours_societe">Encours autorisé</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" tal:attributes="disabled code != 9 and 'disabled' or None" type="text" id="encours_societe" name="encours_societe" value="${eleve.encours_societe}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-thousands-separator=''
|
||||
data-fv-numeric-decimal-separator='.'
|
||||
data-fv-numeric-message = "Entrer un montant validé"
|
||||
data-fv-notempty-message="Encours autorisé est obligatoire"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-visite_med_le">
|
||||
<label class="col-xs-4 control-label" for="visite_med_le">Visite médicale le</label>
|
||||
<div class="col-xs-6" id="field-visite_med_le">
|
||||
<input class="form-control" type="text" id="visite_med_le" name="visite_med_le" value="${visite_med_le}" placeholder="JJ/MM/AAAA"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD/MM/YYYY"
|
||||
data-fv-date-message="La date du visite medicale n'est pas valide (JJ/MM/AAAA)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-visite_med_fin_le">
|
||||
<label class="col-xs-4 control-label" for="visite_med_fin_le">Fin le</label>
|
||||
<div class="col-xs-6" id="field-visite_med_fin_le">
|
||||
<input class="form-control" type="text" id="visite_med_fin_le" name="visite_med_fin_le" value="${visite_med_fin_le}" placeholder="JJ/MM/AAAA"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD/MM/YYYY"
|
||||
data-fv-date-message="La date fin de la visite medicale n'est pas valide (JJ/MM/AAAA)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="NePasRelancer"></label>
|
||||
<div class="col-xs-6">
|
||||
<input type="checkbox" name="NePasRelancer" value="oui" id="NePasRelancer"
|
||||
tal:attributes="checked eleve.NePasRelancer == 1 and 'checked' or None"> Ne pas relancer si compte < 0</input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--? end representant infos-->
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-4 col-xs-5">
|
||||
<a class="btn btn-default" tal:condition="eleve.CD_CLI != 0" href="${request.application_url}/fiche_eleve/${eleve.CD_CLI}">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<a class="btn btn-default" tal:condition="eleve.CD_CLI == 0" href="${request.application_url}/eleves">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
<br />
|
||||
<br />
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var fv = $('#change-eleve-details-form').formValidation().data();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</metal:block>
|
||||
78
aem_gestion/templates/eleves/eleve_filiere_niveau.pt
Normal file
78
aem_gestion/templates/eleves/eleve_filiere_niveau.pt
Normal file
@@ -0,0 +1,78 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<form id="change-eleve-details-form" class="form-horizontal" action="${url}" method="post" tal:condition="eleve"
|
||||
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-4" for="niveau">Niveau</label>
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control" id="niveau" name="niveau">
|
||||
<div tal:repeat="item niveaux">
|
||||
<option value="${item}" tal:attributes="selected eleve.niveau==item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="filiere">Filière</label>
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control" id="filiere" name="filiere">
|
||||
<div tal:repeat="item filieres">
|
||||
<option value="${item.code}" tal:attributes="selected eleve.filiere==item.code and 'selected' or None">${item.code}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Estimées à l'évaluation</label>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" name="heures_estimees"
|
||||
value="${eleve.heures_estimees}"
|
||||
data-fv-integer="true"
|
||||
data-fv-integer-message="Ce nombre n'est pas vailde" />
|
||||
<span class="input-group-addon">heure(s)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Revues après le stage</label>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" name="heures_revues"
|
||||
value="${eleve.heures_revues}"
|
||||
data-fv-integer="true"
|
||||
data-fv-integer-message="Ce nombre n'est pas vailde" />
|
||||
<span class="input-group-addon">heure(s)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-4 col-xs-5">
|
||||
<a class="btn btn-default" href="${request.application_url}/fiche_eleve/${eleve.CD_CLI}">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#change-eleve-details-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
178
aem_gestion/templates/eleves/eleve_lettrer.pt
Normal file
178
aem_gestion/templates/eleves/eleve_lettrer.pt
Normal file
@@ -0,0 +1,178 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<style>
|
||||
|
||||
.form-group input[type="checkbox"] + .btn-group > label span {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.form-group input[type="checkbox"] + .btn-group > label span:first-child {
|
||||
display: none;
|
||||
}
|
||||
.form-group input[type="checkbox"] + .btn-group > label span:last-child {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.form-group input[type="checkbox"]:checked + .btn-group > label span:first-child {
|
||||
display: inline-block;
|
||||
}
|
||||
.form-group input[type="checkbox"]:checked + .btn-group > label span:last-child {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<form id="lettrer-form" role="form" action="${url}" method="post">
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-5">
|
||||
|
||||
<button class="btn btn-danger" type="submit" id="btn-lettrer" name="form.lettrer" disabled="disabled">
|
||||
<span class="glyphicon"></span> Lettrer</button>
|
||||
<button class="btn btn-default" class="btn btn-default" type="submit" disabled="disabled" id="btn-delettrer" name="form.delettrer" >
|
||||
<span class=""></span> Delettrer</button>
|
||||
<button class="btn btn-default" type="submit" id="btn-auto-lettrer" name="form.auto-lettrer">
|
||||
<span class="glyphicon"></span> Lettrer auto</button>
|
||||
<input type="checkbox" class="hidden" name="fancy-checkbox-default" id="fancy-checkbox-default" autocomplete="off" />
|
||||
<div class="btn-group">
|
||||
<label for="fancy-checkbox-default" class="btn btn-default">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
<span> </span>
|
||||
</label>
|
||||
<label for="fancy-checkbox-default" class="btn btn-default active">
|
||||
Afficher tout
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6" id="solde-select">Solde selection : 0.0 €</label>
|
||||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
<div class="form-group" id="table-form-lettrer">
|
||||
<div class="col-md-12">
|
||||
<table id="table-lettrer" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<th>
|
||||
<th>Date</th>
|
||||
<th>Designation</th>
|
||||
<th class="text-center">Montant du</th>
|
||||
<th>Versement</th>
|
||||
<th>Mode</th>
|
||||
<th class="text-center">Date Val</th>
|
||||
<th class="text-center">Mt Valeur</th>
|
||||
<th class="text-center">Lettre</th>
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
<input type="hidden" name="solde" id="solde" value="0" />
|
||||
<div class="form-group">
|
||||
<div class="col-md-5">
|
||||
<a class="btn btn-default" tal:condition="eleve.CD_CLI != 0" href="${request.application_url}/fiche_eleve/${eleve.CD_CLI}#compte">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- row -->
|
||||
<br />
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var dataCompte = ${dt_compte};
|
||||
var solde = parseFloat(0.0 );
|
||||
var nbselection = 0 ;
|
||||
var filterdataCompte = dataCompte.filter(d => d[8] === 0);
|
||||
|
||||
function parseValue(elementvalue){
|
||||
//parse string
|
||||
var stringparse = elementvalue.replaceAll(',','.').replaceAll('€','').replaceAll( /\s+/g, '')
|
||||
var value = parseFloat(stringparse).toFixed(2)
|
||||
return value ;
|
||||
}
|
||||
|
||||
|
||||
$('#table-form-lettrer').on('change', ':checkbox', function () {
|
||||
var obj = JSON.stringify($(this).val(), null, 4)
|
||||
var stringobj = JSON.parse(obj).replaceAll("'",'"')
|
||||
var jsonobj = JSON.parse(stringobj)
|
||||
if(jsonobj[5] === null){
|
||||
var montant = -parseFloat(parseValue(jsonobj[3]))
|
||||
}
|
||||
else{
|
||||
var montant =parseFloat(parseValue(jsonobj[4]))
|
||||
}
|
||||
if ($(this).is(':checked')) {
|
||||
solde = solde + montant ;
|
||||
nbselection += 1 ;
|
||||
} else {
|
||||
solde = solde - montant ;
|
||||
nbselection -= 1 ;
|
||||
}
|
||||
$('#solde').val(solde)
|
||||
$('#solde-select').text('Solde selection : '+solde.toFixed(2)+' €')
|
||||
if(parseFloat(solde) === 0 && nbselection > 0 ){
|
||||
$('#btn-lettrer').prop("disabled", false);
|
||||
}
|
||||
else{
|
||||
$('#btn-lettrer').prop("disabled", true);
|
||||
}
|
||||
if(nbselection === 1 && jsonobj[8] != 0){
|
||||
$('#btn-delettrer').prop("disabled", false);
|
||||
}
|
||||
else{
|
||||
$('#btn-delettrer').prop("disabled", true);
|
||||
}
|
||||
});
|
||||
|
||||
var otable = $('#table-lettrer').DataTable({
|
||||
data: filterdataCompte,
|
||||
pageLength: 100,
|
||||
bFilter:false,
|
||||
bSort : true,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
'columnDefs': [
|
||||
{
|
||||
'targets': 0,
|
||||
'render': function(data, type, row, meta){
|
||||
if(type === 'display'){
|
||||
var elvalue = JSON.stringify({ ...row }).replaceAll('"',"'");
|
||||
data = '<div class="checkbox"><input type="checkbox" name="selected[]" value="'+elvalue+'" class="dt-checkboxes"><label></label></div>';
|
||||
}
|
||||
return data;
|
||||
},
|
||||
}
|
||||
],
|
||||
'select': 'multi',
|
||||
'order': [[1, 'asc']],
|
||||
})
|
||||
|
||||
$('#fancy-checkbox-default').on('change',function(){
|
||||
if(!this.checked){
|
||||
var filterdataCompte = dataCompte.filter(d => d[8] === 0);
|
||||
otable.clear()
|
||||
otable.rows.add(filterdataCompte).draw()
|
||||
$('#btn-lettrer').show();
|
||||
}
|
||||
else{
|
||||
otable.clear()
|
||||
otable.rows.add(dataCompte).draw();
|
||||
$('#btn-lettrer').hide();
|
||||
}
|
||||
nbselection = 0 ;
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
99
aem_gestion/templates/eleves/eleve_pap.pt
Normal file
99
aem_gestion/templates/eleves/eleve_pap.pt
Normal file
@@ -0,0 +1,99 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<form id="change-eleve-details-form" class="form-horizontal" action="${url}" method="post" tal:condition="eleve"
|
||||
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-4 control-label" for="permis_delivre_le">Délivré (imprimé) le</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="permis_delivre_le" name="permis_delivre_le" value="${permis_delivre_le}"
|
||||
placeholder="JJ/MM/AAAA"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La date de délivrance du permis est obligatoire"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD/MM/YYYY"
|
||||
data-fv-date-message="La date de délivrance du permis n'est pas valide (JJ/MM/AAAA)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label" for="permis_delivre_par">Préfecture de délivrance</label>
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" id="permis_delivre_par" name="permis_delivre_par">
|
||||
<tal:block tal:repeat="item dept">
|
||||
<option value="${item.libelle}" tal:attributes="selected item.libelle == eleve.permis_delivre_par and 'selected' or None">
|
||||
${item.code} - ${item.libelle}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="cas_PAP">Cas de stage obligatoire</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="cas_PAP" name="cas_PAP">
|
||||
<div tal:repeat="item cas_pap">
|
||||
<option value="${item}" tal:attributes="selected eleve.cas_PAP == item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="infraction_lieu">Lieu de l'infraction</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="infraction_lieu" name="infraction_lieu" value="${eleve.infraction_lieu}"
|
||||
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-4" for="infraction_le">Date de l'infraction</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" id="infraction_le" name="infraction_le" value="${eleve.infraction_le}"
|
||||
placeholder="JJ/MM/AAAA"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD/MM/YYYY"
|
||||
data-fv-date-message="La date de l'infraction n'est pas valide (JJ/MM/AAAA)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="infraction_a">Heure de l'infraction</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" id="infraction_a" name="infraction_a" value="${infraction_a}"
|
||||
placeholder="00:00"
|
||||
data-fv-regexp="true"
|
||||
data-fv-regexp-regexp="^(2[0-3]|[01]?[0-9]):([0-5]?[0-9])$"
|
||||
data-fv-regexp-message="L'heure de l'infraction doit au format 00:00" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-4 col-xs-5">
|
||||
<a class="btn btn-default" href="${request.application_url}/fiche_eleve/${eleve.CD_CLI}">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#change-eleve-details-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
101
aem_gestion/templates/eleves/eleve_permis.pt
Normal file
101
aem_gestion/templates/eleves/eleve_permis.pt
Normal file
@@ -0,0 +1,101 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form id="permis_edit-form" action="${url}" method="post" class="form-horizontal">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="PERMIS">Catégorie de permis</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="PERMIS" name="PERMIS" value="${permis.PERMIS}"
|
||||
placeholder="5 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le type de devis est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="5"
|
||||
data-fv-stringlength-message="5 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="NUMERO">Numéro</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="NUMERO" name="NUMERO" value="${permis.NUMERO}"
|
||||
placeholder="20 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le NUMERO est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="OBTENU_LE">Obtenu le</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group date" id="OBTENU_LE">
|
||||
<input class="form-control" type="text" name="OBTENU_LE" value="${OBTENU_LE}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La date d'obtention est obligatoire"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD/MM/YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIEU">Lieu</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="LIEU" name="LIEU" value="${permis.LIEU}"
|
||||
placeholder="25 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le LIEU est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="25"
|
||||
data-fv-stringlength-message="25 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<a href="${request.application_url}/fiche_eleve/${cd_cli}" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-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="permis.PERMIS != '0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<!-- Bootstrap Datepicker plugin -->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#permis_edit-form').formValidation();
|
||||
$('#OBTENU_LE').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
allowInputToggle: true,
|
||||
})
|
||||
.on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#permis_edit-form').formValidation('revalidateField', 'OBTENU_LE');
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</metal:block>
|
||||
56
aem_gestion/templates/eleves/eleve_referent.pt
Normal file
56
aem_gestion/templates/eleves/eleve_referent.pt
Normal file
@@ -0,0 +1,56 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<form id="change-eleve-details-form" class="form-horizontal" action="${url}" method="post" tal:condition="eleve"
|
||||
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-4" for="CD_MON">Moniteur rérérent 1</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="CD_MON" name="CD_MON">
|
||||
<option value="">NR</option>
|
||||
<div tal:repeat="item referents">
|
||||
<option value="${item.CD_MON}" tal:attributes="selected eleve.CD_MON == item.CD_MON and 'selected' or None">${item.NOM} - ${item.CD_MON}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="cd_ref2">Moniteur rérérent 2</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="cd_ref2" name="cd_ref2">
|
||||
<option value="">NR</option>
|
||||
<div tal:repeat="item referents">
|
||||
<option value="${item.CD_MON}" tal:attributes="selected eleve.cd_ref2 == item.CD_MON and 'selected' or None">${item.NOM} - ${item.CD_MON}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-4 col-xs-5">
|
||||
<a class="btn btn-default" href="${request.application_url}/fiche_eleve/${eleve.CD_CLI}">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#change-eleve-details-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
186
aem_gestion/templates/eleves/eleve_representant.pt
Normal file
186
aem_gestion/templates/eleves/eleve_representant.pt
Normal file
@@ -0,0 +1,186 @@
|
||||
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<form id="change-eleve-details-form" class="form-horizontal" action="${url}" method="post" tal:condition="eleve"
|
||||
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="representant_infos " id="representant_infos">
|
||||
<div class="form-group text-center">
|
||||
<h4 class="text-primary"><b>Représentant légal</b></h4>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="representant_nom">Nom </label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="representant_nom" name="representant_nom" value="${eleve.representant_nom}"
|
||||
placeholder="45 caractères maximum"
|
||||
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-4" for="representant_prenom">Prénom</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="representant_prenom" name="representant_prenom" value="${eleve.representant_prenom}"
|
||||
placeholder="45 caractères maximum"
|
||||
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-4" for="representant_adresse">Adresse</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="representant_adresse" name="representant_adresse" value="${eleve.representant_adresse}"
|
||||
placeholder="45 caractères maximum"
|
||||
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-4" for="representant_cp">Code postal </label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="representant_cp" name="representant_cp" value="${representant_cp}"
|
||||
placeholder="5 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--? end representant infos-->
|
||||
<!--? Payeur infos -->
|
||||
<div class="payeur_infos " id="payeur_infos">
|
||||
<div class="form-group text-center">
|
||||
<h4 class="text-primary"><b>Information du payeur</b></h4>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="payeur_nom">Nom</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="payeur_nom" name="payeur_nom" value="${eleve.payeur_nom}"
|
||||
placeholder="45 caractères maximum"
|
||||
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-4" for="payeur_adresse">Adresse</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="payeur_adresse" name="payeur_adresse" value="${eleve.payeur_adresse}"
|
||||
placeholder="45 caractères maximum"
|
||||
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-4" for="payeur_cp">Code postal </label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="payeur_cp" name="payeur_cp" value="${payeur_cp}"
|
||||
placeholder="5 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="payeur_email">Email </label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="payeur_email" name="payeur_email" value="${eleve.payeur_email}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="50"
|
||||
data-fv-stringlength-message="50 caractères maximum"
|
||||
data-fv-emailaddress="true"
|
||||
data-fv-emailaddress-message="L'adresse email n'est pas valide"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="payeur_tel">Téléphone</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="payeur_tel" name="payeur_tel" value="${eleve.payeur_tel}"
|
||||
data-fv-phone="true"
|
||||
data-fv-phone-country="FR"
|
||||
data-fv-phone-message="Numéro de téléphone non valide"
|
||||
placeholder=""/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--? end payeur infos-->
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-4 col-xs-5">
|
||||
<a class="btn btn-default" tal:condition="eleve.CD_CLI != 0" href="${request.application_url}/fiche_eleve/${eleve.CD_CLI}">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<a class="btn btn-default" tal:condition="eleve.CD_CLI == 0" href="${request.application_url}/eleves">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#change-eleve-details-form').formValidation();
|
||||
// ajax for autocomple field codepost
|
||||
$('#payeur_cp').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_codepostal',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 1,
|
||||
});
|
||||
|
||||
// ajax for autocomple field representant_cp
|
||||
$('#representant_cp').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_codepostal',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 1,
|
||||
});
|
||||
|
||||
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
64
aem_gestion/templates/eleves/eleves.pt
Normal file
64
aem_gestion/templates/eleves/eleves.pt
Normal file
@@ -0,0 +1,64 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form id="member-search-form" role="form" action="${url}" method="post">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="name" value=""
|
||||
placeholder="Nom, Code ou No mobile" />
|
||||
<span class="input-group-btn">
|
||||
<button id="submitButton" class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-search"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<input type="checkbox" name="cb_tous" value="cb_tous"
|
||||
tal:attributes="checked cb_tous == 'oui' and 'checked' or None">
|
||||
Afficher les fiches cloturées</input>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- row -->
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="justify-content-end" tal:condition="code == 9">
|
||||
<a href="${request.application_url}/eleve_edit/0" class="btn btn-primary " role="button" style="margin-bottom:15px">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvel élève </a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div>
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Nom, Prénom</th>
|
||||
<th class="text-center">Permis</th>
|
||||
<th>Formule</th>
|
||||
<th>Inscrit</th>
|
||||
<th class="text-center">Statut</th>
|
||||
</tr>
|
||||
<tr tal:repeat="member eleves">
|
||||
<td>${member.cd_cli}</td>
|
||||
<td>
|
||||
<a href="/fiche_eleve/${member.cd_cli}" tal:condition="goto_url=='fiche_eleve'">${member.civilite} ${member.nompren}</a>
|
||||
<a href="${goto_url}${member.cd_cli}" tal:condition="goto_url!='fiche_eleve'">${member.civilite} ${member.nompren}</a>
|
||||
</td>
|
||||
<td class="text-center">${member.permis_demande}</td>
|
||||
<td>${member.formule}</td>
|
||||
<td>${member.cree_le.strftime('%d/%m/%Y')}</td>
|
||||
<td class="text-center">${member.statut}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
711
aem_gestion/templates/eleves/fiche_eleve.pt
Normal file
711
aem_gestion/templates/eleves/fiche_eleve.pt
Normal file
@@ -0,0 +1,711 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#inscription">FICHE</a></li>
|
||||
<li><a data-toggle="tab" href="#permis">PERMIS</a></li>
|
||||
<li><a data-toggle="tab" href="#examens">EXAMENS</a></li>
|
||||
<li><a data-toggle="tab" href="#compte">COMPTE</a></li>
|
||||
<li><a data-toggle="tab" href="#suivi">SUIVI ADM.</a></li>
|
||||
<li><a data-toggle="tab" href="#devis">DEVIS</a></li>
|
||||
<li><a data-toggle="tab" href="#cpf">CPF</a></li>
|
||||
<li><a data-toggle="tab" href="#justifs">JUSTIFS</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<!-- FICHE ELEVE -->
|
||||
<div id="inscription" class="tab-pane fade in active">
|
||||
<h3>
|
||||
FICHE ELEVE
|
||||
<!-- SUIVI PEDAGOGIQUE -->
|
||||
<a href="${request.application_url}/show_iframe/suivi-peda-${eleve.CD_CLI}" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-ok"></span> Suivi pédagogique</a>
|
||||
</h3>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td width="200">
|
||||
Fiche No : <b>${eleve.CD_CLI}</b>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
Tél. portable - fixe<br />
|
||||
Tél. du père - la mère<br />
|
||||
Email élève<br />
|
||||
</td>
|
||||
<td width="300">
|
||||
${eleve.CIVILITE} ${eleve.NOMPREN}<br />
|
||||
${eleve.NOM_JF}<br />
|
||||
${eleve.ADRESSE}<br />
|
||||
${eleve.ADRESSE2}<br />
|
||||
${eleve.CODEPOST} ${eleve.VILLE}<br />
|
||||
<br />
|
||||
<a href="tel:${eleve.TEL2}">${eleve.TEL2}</a> - ${eleve.TEL}<br />
|
||||
${eleve.TEL3} - ${eleve.TEL4}<br />
|
||||
${eleve.email}<br />
|
||||
</td>
|
||||
<td>
|
||||
<a href="${request.application_url}/eleve_edit/${eleve.CD_CLI}" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-pencil"></span> Modifier</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Profession<br />
|
||||
Nationalité<br />
|
||||
Age<br />
|
||||
Date et lieu naissance<br />
|
||||
Pays naissance<br />
|
||||
</td>
|
||||
<td>
|
||||
${eleve.PROFESSION} <br />
|
||||
${eleve.NATION}<br />
|
||||
${age}<br />
|
||||
${eleve.DATE_NAIS.strftime('%d-%m-%Y')} à ${eleve.LIEU_NAIS}<br />
|
||||
${eleve.PAYS_NAIS}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Représentant légal :</b><br />
|
||||
Nom - Prenom<br />
|
||||
Date naissance<br />
|
||||
Adresse<br />
|
||||
</td>
|
||||
<td>
|
||||
<br />
|
||||
${eleve.representant_nom} - ${eleve.representant_prenom}<br />
|
||||
${eleve.representant_dnaiss}<br />
|
||||
${eleve.representant_adresse}<br />
|
||||
${eleve.representant_cp} ${eleve.representant_ville}
|
||||
</td>
|
||||
<td>
|
||||
<a href="${request.application_url}/eleve_representant/${eleve.CD_CLI}" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-user"></span> Rep. légal</a><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Nom du payeur</b><br />
|
||||
Adresse<br />
|
||||
<br />
|
||||
Téléphone<br />
|
||||
Email<br />
|
||||
</td>
|
||||
<td>
|
||||
${eleve.payeur_nom}<br />
|
||||
${eleve.payeur_adresse}<br />
|
||||
${eleve.payeur_cp} ${eleve.payeur_ville}<br />
|
||||
${eleve.payeur_tel}<br />
|
||||
${eleve.payeur_email}<br />
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Permis - Formule<br />
|
||||
Fin contrat initial<br />
|
||||
Fin forfait code le<br />
|
||||
Code périmé le <br />
|
||||
Dates de stage<br />
|
||||
Rendez-vous préalable
|
||||
</td>
|
||||
<td>
|
||||
${eleve.PERMIS_DEMANDE} - ${eleve.FORMULE}<br />
|
||||
${eleve.fin_contrat_le.strftime('%d-%m-%Y')}<br />
|
||||
<span tal:condition="eleve.fin_forfait_code_le">${eleve.fin_forfait_code_le.strftime('%d-%m-%Y')}</span><br />
|
||||
<span tal:condition="eleve.PERIME_LE">${eleve.PERIME_LE.strftime('%d-%m-%Y')}</span><br />
|
||||
${dates_stage}<br />
|
||||
<span tal:condition="eleve.rdv_prealable_le">${eleve.rdv_prealable_le.strftime('%d-%m-%Y')}</span><br />
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Moniteur référent 1<br />
|
||||
Moniteur référent 2<br />
|
||||
Moniteur stage<br />
|
||||
Moniteur circuit<br />
|
||||
Filière<br />
|
||||
Niveau<br />
|
||||
Estimées à l'évaluation<br />
|
||||
Revues après le stage<br />
|
||||
</td>
|
||||
<td>
|
||||
${referent1_nom}<br />
|
||||
${referent2_nom}<br />
|
||||
${stage_nom}<br />
|
||||
${circuit_nom}<br />
|
||||
${eleve.filiere}<br />
|
||||
${eleve.niveau}<br />
|
||||
${eleve.heures_estimees} heures<br />
|
||||
${eleve.heures_revues} heures<br />
|
||||
</td>
|
||||
<td>
|
||||
<a href="${request.application_url}/eleve_referent/${eleve.CD_CLI}" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-pencil"></span> Référents</a>
|
||||
<a href="${request.application_url}/eleve_filiere_niveau/${eleve.CD_CLI}" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-pencil"></span> Filière-Niveau</a> <br><br>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<!-- ELEVE ENTREPRISE -->
|
||||
<tr>
|
||||
<td>
|
||||
Nom Entreprise<br />
|
||||
No de facture<br />
|
||||
En-cours autorisé<br />
|
||||
Ne pas relancer si débiteur<br />
|
||||
Ne pas spammer (CNIL)<br />
|
||||
<span tal:condition = "eleve.visite_med_le or eleve.visite_med_fin_le">Visite médicale le<br /></span>
|
||||
Complet le<br />
|
||||
</td>
|
||||
<td>
|
||||
${eleve.NOM_ENTREPRISE}<br />
|
||||
${eleve.No_Facture}<br />
|
||||
${layout.to_euro(eleve.encours_societe)}<br />
|
||||
<span tal:condition = "eleve.NePasRelancer != 0">OUI</span><br />
|
||||
<span tal:condition = "eleve.NePasSpammer != 0">OUI</span><br />
|
||||
<span tal:condition = "eleve.visite_med_le">${visite_med_le} fin ${visite_med_fin_le}<br /></span>
|
||||
<span tal:condition = "eleve.COMPLET_LE">${complet_le}</span><br />
|
||||
</td>
|
||||
<td>
|
||||
<a href="${request.application_url}/eleve_entreprise/${eleve.CD_CLI}" class="btn btn-primary" role="button" tal:condition="eleve.TYPE_ENTREPRISE == 'E'">
|
||||
<span class="glyphicon glyphicon-pencil"></span> Modifier</a> <br><br>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Agence de rattachem.<br />
|
||||
Inscrit le<br />
|
||||
Demande NEPH<br />
|
||||
Inscription OK<br />
|
||||
Enregistré le<br />
|
||||
No d'immatriculation<br />
|
||||
|
||||
</td>
|
||||
<td>
|
||||
${eleve.AGENCE} - ${agence.LIBELLE}<br />
|
||||
${eleve.cree_le.strftime('%d-%m-%Y')}<br />
|
||||
<span tal:condition = "eleve.demande_NEPH">${eleve.demande_NEPH.strftime('%d-%m-%Y')}</span><br />
|
||||
<span tal:condition = "eleve.inscription_OK">${eleve.inscription_OK.strftime('%d-%m-%Y')}</span><br />
|
||||
<span tal:condition = "eleve.DOSSIER_DATE"><b>${eleve.DOSSIER_DATE.strftime('%d-%m-%Y')}</b></span><br />
|
||||
<b>${eleve.DOSSIER_NO}</b><br />
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<a href="${request.application_url}/eleve_doc_prefecture/${eleve.CD_CLI}" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-folder-open"></span> Dos. préfecture</a><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Dernière modif le<br />
|
||||
</td>
|
||||
<td>
|
||||
<span tal:condition = "eleve.modif_le">${eleve.modif_le.strftime('%d/%m/%Y %H:%M')}</span> par ${eleve.CD_UTI}<br />
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div> <!-- onglet inscription -->
|
||||
|
||||
<!-- ONGLET PERMIS -->
|
||||
<div id="permis" class="tab-pane fade">
|
||||
<h3>PERMIS OBTENU(S)</h3>
|
||||
<p>
|
||||
<a href="${request.application_url}/eleve_permis/${eleve.CD_CLI}/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau permis</a>
|
||||
</p>
|
||||
<table class="table table-striped table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Catégorie</th>
|
||||
<th>Numéro</th>
|
||||
<th>Date</th>
|
||||
<th>Lieu d'obtention</th>
|
||||
<th>Par</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:repeat="cat permis">
|
||||
<td>${cat.PERMIS}</td>
|
||||
<td><a href="/eleve_permis/${eleve.CD_CLI}/${cat.no_ligne}">${cat.NUMERO}</a></td>
|
||||
<td><span tal:condition="cat.OBTENU_LE">${cat.OBTENU_LE.strftime('%d-%m-%Y')}</span></td>
|
||||
<td>${cat.LIEU}</td>
|
||||
<td>${cat.CD_UTI}, le ${cat.modif_le.strftime('%d-%m-%Y')}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p tal:condition="eleve.PERM_PO1">
|
||||
<b>Pour Cerfa 02 : </b><br />
|
||||
Dernier permis obtenu : <b>${eleve.PERM_PO1}</b>, No <b>${eleve.NO_PO1}</b> obtenu le <b tal:condition="eleve.DATE_PO1">${eleve.DATE_PO1.strftime('%d-%m-%Y')}</b> à <b>${eleve.LIEU_PO1}</b>
|
||||
</p>
|
||||
<br />
|
||||
<h3>PERMIS A POINT</h3>
|
||||
<table class="table" tal:condition="eleve.FORMULE=='POINT'">
|
||||
<tr>
|
||||
<td width="300">
|
||||
Type de stage obligatoire<br />
|
||||
<br />
|
||||
Date de délivrance du permis<br />
|
||||
Préfecture de délivrance<br />
|
||||
Date de l'infraction<br />
|
||||
Lieu de l'infraction<br />
|
||||
</td>
|
||||
<td width="300">
|
||||
${eleve.cas_PAP}<br />
|
||||
<br />
|
||||
${permis_delivre_le}<br />
|
||||
${eleve.permis_delivre_par}<br />
|
||||
<span tal:condition="eleve.infraction_le">${eleve.infraction_le.strftime('%d-%m-%Y')} à ${eleve.infraction_a}</span><br />
|
||||
${eleve.infraction_lieu}<br />
|
||||
</td>
|
||||
<td>
|
||||
<a href="${request.application_url}/eleve_pap/${eleve.CD_CLI}" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-pencil"></span> Modifier</a>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
</div> <!-- onglet permis -->
|
||||
|
||||
<!-- EXAMENS -->
|
||||
<div id="examens" class="tab-pane fade">
|
||||
<h3>EXAMENS</h3>
|
||||
|
||||
<p class="text-center text-primary"><b>RESUME EXAMENS</b></p>
|
||||
<table class="table table-striped table-bordered" cellspacing="0" width="70%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>Nb de passages</th>
|
||||
<th>Dernier passage le</th>
|
||||
<th>Date d'obtention</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<th>Examens théoriques</th>
|
||||
<td>${eleve.TR_T_NB}</td>
|
||||
<td tal:condition="eleve.TR_T_DATE">${eleve.TR_T_DATE.strftime('%d-%m-%Y')}</td>
|
||||
<td tal:condition="eleve.TR_T_OK">${eleve.TR_T_OK.strftime('%d-%m-%Y')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Examens pratiques</th>
|
||||
<td>${eleve.TR_P_NB}</td>
|
||||
<td tal:condition="eleve.TR_P_DATE">${eleve.TR_P_DATE.strftime('%d-%m-%Y')}</td>
|
||||
<td tal:condition="eleve.TR_P_OK">${eleve.TR_P_OK.strftime('%d-%m-%Y')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Examens circulation</th>
|
||||
<td>${eleve.TR_R_NB}</td>
|
||||
<td tal:condition="eleve.TR_R_DATE">${eleve.TR_R_DATE.strftime('%d-%m-%Y')}</td>
|
||||
<td tal:condition="eleve.TR_R_OK">${eleve.TR_R_OK.strftime('%d-%m-%Y')}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<p class="text-center text-primary"><b>HISTORIQUE EXAMENS</b></p>
|
||||
<table class="table table-striped table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date heure</th>
|
||||
<th>Cat.</th>
|
||||
<th>Lieu</th>
|
||||
<th>Résultat</th>
|
||||
<th>No</th>
|
||||
<th>Unité</th>
|
||||
<th>Indice</th>
|
||||
<th>Agence</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:repeat="exam examens">
|
||||
<td>${exam.date_heure}</td>
|
||||
<td>${exam.PERMIS}</td>
|
||||
<td>${exam.lieu}</td>
|
||||
<td>${exam.libelle}</td>
|
||||
<td>${exam.NO_EXA}</td>
|
||||
<td>${exam.UNITE}</td>
|
||||
<td>${exam.INDICE}</td>
|
||||
<td>${exam.AGENCE} - ${exam.CD_UTI}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
</div> <!-- onglet examens -->
|
||||
|
||||
<!-- COMPTE -->
|
||||
<div id="compte" class="tab-pane fade">
|
||||
<h3>COMPTE</h3>
|
||||
<table class="table table-condensed table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Heures prises / prév. / route</th>
|
||||
<th>Dern. opération</th>
|
||||
<th>Type - Nom entrepr. - Encours aut.</th>
|
||||
<th class="text-right">Total débit</th>
|
||||
<th class="text-right">Total Mt valeur</th>
|
||||
<th class="text-right">Solde</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td class="text-center">${eleve.heures_prises} h / ${eleve.heures_prevues} h / ${eleve.hroute_prises} h</td>
|
||||
<td> <span tal:condition="eleve.DERN_OPE_LE">${eleve.DERN_OPE_LE.strftime('%d-%m-%Y')}</span></td>
|
||||
<td>${eleve.TYPE_ENTREPRISE} - ${eleve.NOM_ENTREPRISE} - ${layout.to_euro(eleve.encours_societe)}</td>
|
||||
<td class="text-right">${layout.to_euro(eleve.DEBIT)}</td>
|
||||
<td class="text-right text-success" tal:condition="solde >= 0"><b>${layout.to_euro(solde)}</b></td>
|
||||
<td class="text-right text-success" tal:condition="solde >= 0"><b>${layout.to_euro(mtvaltotal)}</b></td>
|
||||
<td class="text-right text-danger" tal:condition="solde < 0"><b>${layout.to_euro(solde)}</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<a href="${url_contrat}" class="btn btn-primary" role="button"><span class="glyphicon glyphicon-list-alt"></span> Gérer les CONTRATS</a>
|
||||
<a href="${request.application_url}/eleve_credit/${eleve.CD_CLI}/0" class="btn btn-success" role="button"><span class="glyphicon glyphicon-plus"></span> Crédit</a>
|
||||
<a href="${request.application_url}/eleve_debit/${eleve.CD_CLI}/0" tal:condition="code >= 6" class="btn btn-success" role="button"><span class="glyphicon glyphicon-plus"></span> Débit</a>
|
||||
<a href="${request.application_url}/eleve_lettrer/${eleve.CD_CLI}" class="btn btn-default" role="button"><span class="glyphicon glyphicon-plus"></span> Lettrer</a>
|
||||
</p>
|
||||
<table id="compte-eleve" class="table table-condensed table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Mon</th>
|
||||
<th>Désignation</th>
|
||||
<th>Qté</th>
|
||||
<th>Débit</th>
|
||||
<th>Crédit</th>
|
||||
<th>Mode</th>
|
||||
<th>Date valeur</th>
|
||||
<th>Mt valeur</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div> <!-- onglet compte -->
|
||||
<!-- SUIVI -->
|
||||
<div id="suivi" class="tab-pane fade">
|
||||
<h3>SUIVI ADMINISTRATIF
|
||||
<a href="${request.application_url}/suivi_edit/${eleve.CD_CLI}/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau</a>
|
||||
</h3>
|
||||
<table class="table table-striped table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20%">Date</th>
|
||||
<th>Type</th>
|
||||
<th>Moyen</th>
|
||||
<th>Résultat</th>
|
||||
<th>Uti.</th>
|
||||
<th>No</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:repeat="item suivis">
|
||||
<td><span tal:condition="item.cree_le">${item.cree_le.strftime('%d/%m/%Y - %H:%M')}</span></td>
|
||||
<td>${item.TYPE_REL}</td>
|
||||
<td>${item.MOYEN_REL}</td>
|
||||
<td><a href="/suivi_edit/${item.CD_CLI}/${item.no_ligne}">${item.RESULTAT}</a></td>
|
||||
<td>${item.CD_UTI}</td>
|
||||
<td>${item.no_ligne}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3 class="text-primary">RENDEZ-VOUS DU PROSPECT</h3>
|
||||
<table class="table table-striped table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20%">Date</th>
|
||||
<th>Statut</th>
|
||||
<th>Résultat</th>
|
||||
<th>Notes</th>
|
||||
<th>Uti.</th>
|
||||
<th width="20%">Créé le</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:repeat="item rdvs">
|
||||
<td><a href="/agenda_edit/${item.no_ligne}"><span tal:condition="item.debut_rdv">${item.debut_rdv.strftime('%d/%m/%Y - %H:%M')}</span></a></td>
|
||||
<td>${item.statut}</td>
|
||||
<td>${item.resultat}</td>
|
||||
<td>${item.notes}</td>
|
||||
<td>${item.cd_uti}</td>
|
||||
<td><span tal:condition="item.cree_le">${item.cree_le.strftime('%d/%m/%Y - %H:%M')}</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- ONGLET DEVIS -->
|
||||
<div id="devis" class="tab-pane fade">
|
||||
<h3><a href="${request.application_url}/devis_frm/0/E${eleve.CD_CLI}" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau devis</a></h3>
|
||||
|
||||
<table class="table table-condensed table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No devis</th>
|
||||
<th>Créé le</th>
|
||||
<th>Organisme</th>
|
||||
<th>Type devis</th>
|
||||
<th class="text-center">Clôturé le</th>
|
||||
<th class="text-center">Util.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:repeat="item devis">
|
||||
<td>
|
||||
<a href="${request.application_url}/devis_frm/${item.no_devis}/E${eleve.CD_CLI}">${item.no_devis}</a>
|
||||
</td>
|
||||
<td>${item.cree_le.strftime('%d-%m-%Y')}</td>
|
||||
<td>${item.organisme}</td>
|
||||
<td>${item.type_devis}</td>
|
||||
<td class="text-center" tal:condition="item.cloture_le">${item.cloture_le.strftime('%d-%m-%Y')} (${item.statut})</td>
|
||||
<td tal:condition="not item.cloture_le"></td>
|
||||
<td class="text-center">${item.cd_uti}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div> <!-- onglet devis -->
|
||||
|
||||
<!-- ONGLET DEVIS CPF -->
|
||||
<div id="cpf" class="tab-pane fade">
|
||||
<h3><a href="${request.application_url}/devis_cpf_frm/0/E${eleve.CD_CLI}" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau CPF</a></h3>
|
||||
|
||||
<table class="table table-condensed table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No devis</th>
|
||||
<th>Créé le</th>
|
||||
<th>Type devis</th>
|
||||
<th>Montant - Heures</th>
|
||||
<th>No dossier</th>
|
||||
<th>Demandé le</th>
|
||||
<th class="text-center">Début le</th>
|
||||
<th class="text-center">Fin le</th>
|
||||
<th class="text-center">Clôturé le</th>
|
||||
<th class="text-center">Util.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:repeat="item devis_cpf">
|
||||
<td>
|
||||
<a href="${request.application_url}/devis_cpf_frm/${item.no_devis}/E${eleve.CD_CLI}">${item.no_devis}</a>
|
||||
</td>
|
||||
<td>${item.cree_le.strftime('%d-%m-%Y')}</td>
|
||||
<td>${item.type_devis}</td>
|
||||
<td>${layout.to_euro(item.montant_pec)} - ${item.nb_heures_pec} h</td>
|
||||
<td>${item.no_dossier}</td>
|
||||
<td tal:condition="item.demande_le">${item.demande_le.strftime('%d-%m-%Y')}</td>
|
||||
<td tal:condition="not item.demande_le"> </td>
|
||||
<td tal:condition="item.formation_debut_le">${item.formation_debut_le.strftime('%d-%m-%Y')}</td>
|
||||
<td tal:condition="not item.formation_debut_le"> </td>
|
||||
<td tal:condition="item.formation_fin_le">${item.formation_fin_le.strftime('%d-%m-%Y')}</td>
|
||||
<td tal:condition="not item.formation_fin_le"> </td>
|
||||
<td tal:condition="item.cloture_le" class="text-success text-center"><b>${item.cloture_le.strftime('%d-%m-%Y')} (${item.statut})</b></td>
|
||||
<td tal:condition="not item.cloture_le"> </td>
|
||||
<td class="text-center">${item.cd_uti}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div> <!-- onglet devis CPF -->
|
||||
|
||||
<!-- JUSTIFS -->
|
||||
<div id="justifs" class="tab-pane fade">
|
||||
<h3 class="text-center">JUSTIFiCATIFS</h3>
|
||||
<p>
|
||||
<a href="#" class="btn btn-success" role="button"
|
||||
data-toggle="modal" data-target="#CreateJustif"><span class="glyphicon glyphicon-plus"></span> Nouveau justificatif</a>
|
||||
<span tal:condition="eleve.COMPLET_LE">
|
||||
|
||||
Dossier complet le <b>${eleve.COMPLET_LE.strftime('%d-%m-%Y')}</b></span>
|
||||
<span tal:condition="not eleve.COMPLET_LE" class="text-danger">
|
||||
<a href="${request.application_url}/eleve_email/${eleve.CD_CLI}" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-send"></span> Email Elève</a>
|
||||
|
||||
<b>Dossier INCOMPLET</b>
|
||||
</span>
|
||||
</p>
|
||||
<table class="table table-condensed table-bordered" cellspacing="0" width="100%" tal:condition="justifs">
|
||||
<tr tal:repeat="justif justifs">
|
||||
<td class="text-center">${justif.no_tri}</td>
|
||||
<td tal:condition="justif.valide==0">${justif.libelle}</td>
|
||||
<td tal:condition="justif.valide!=0" class="success">${justif.libelle}</td>
|
||||
<td tal:condition="justif.libelle_fic">${justif.libelle_fic}</td>
|
||||
<td tal:condition="not justif.libelle_fic">
|
||||
<a tal:condition="justif.nom_fic" href="${docs_url}/${justif.nom_fic}"
|
||||
target="popup"
|
||||
onclick="window.open('${docs_url}/${justif.nom_fic},'popup','width=900,height=768'); return false;">
|
||||
${justif.nom_fic}
|
||||
</a>
|
||||
<a tal:condition="not justif.nom_fic" href="${request.application_url}/doc_upload/${justif.no_ligne}/${justif.cd_cli}"> Télécharger</a>
|
||||
</td>
|
||||
<td>${justif.taille_fic} Ko</td>
|
||||
<td>${justif.cd_uti}</td>
|
||||
<td>
|
||||
<a href="${request.application_url}/doc_edit/${justif.no_ligne}/${justif.cd_cli}">Modifier</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3 class="text-center">DOCUMENTS</h3>
|
||||
<p>
|
||||
<a href="#" class="btn btn-success" role="button"
|
||||
data-toggle="modal" data-target="#CreateDoc"><span class="glyphicon glyphicon-plus"></span> Nouveau document</a>
|
||||
</p>
|
||||
<table class="table table-condensed table-bordered" cellspacing="0" width="100%" tal:condition="docs">
|
||||
<tr tal:repeat="justif docs">
|
||||
<td>${justif.libelle}</td>
|
||||
<td tal:condition="justif.nom_fic">
|
||||
<!-- a href="/pdfviewer/${justif.nom_fic}">${justif.nom_fic}</a -->
|
||||
<a href="${docs_url}/${justif.nom_fic}"
|
||||
target="popup"
|
||||
onclick="window.open('${docs_url}/${justif.nom_fic},'popup','width=900,height=768'); return false;">
|
||||
${justif.nom_fic}
|
||||
</a>
|
||||
</td>
|
||||
<td tal:condition="not justif.nom_fic">
|
||||
<a href="${request.application_url}/doc_upload/${justif.no_ligne}/${justif.cd_cli}"> Télécharger</a>
|
||||
</td>
|
||||
<td>${justif.taille_fic} Ko</td>
|
||||
<td>${justif.cd_uti}</td>
|
||||
<td>
|
||||
<a href="${request.application_url}/doc_edit/${justif.no_ligne}/${justif.cd_cli}">Modifier</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Modal : Confirmation CREATION JUSTIF -->
|
||||
<div class="modal fade" id="CreateJustif" role="dialog" aria-labelledby="confirmCreateLabel" 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">Ajouter un justificatif</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="add_justif-form" class="form-horizontal" action="${url}#justifs" 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-3">Ajouter</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control static" name="code_add">
|
||||
<tal:block tal:repeat="item justifs_manquant">
|
||||
<option value="${item.CODE}" tal:attributes="selected code_add==item.CODE and 'selected' or None">${item.LIBELLE}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="submit" class="btn btn-danger" name="form.justif_added">Ajouter</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal : Confirmation CREATION DOC -->
|
||||
<div class="modal fade" id="CreateDoc" role="dialog" aria-labelledby="confirmCreateLabel" 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">Ajouter un document</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="add_justif-form" class="form-horizontal" action="${url}#justifs" 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-3">Ajouter</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control static" name="doc_add">
|
||||
<tal:block tal:repeat="item docs_manquant">
|
||||
<option value="${item.CODE}" tal:attributes="selected doc_add==item.CODE and 'selected' or None">${item.LIBELLE}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="submit" class="btn btn-danger" name="form.doc_added">Ajouter</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- tab-content -->
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataCompte = ${dt_compte};
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#compte-eleve').DataTable({
|
||||
data: dataCompte,
|
||||
pageLength: 100,
|
||||
bFilter:false,
|
||||
bLengthChange: false,
|
||||
bSort : false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{
|
||||
"targets":[2],
|
||||
render: function (data, type, row, meta) {
|
||||
if(parseInt(row[10]) === 0){
|
||||
return '<a href="${request.application_url}/eleve_debit/${eleve.CD_CLI}/'+row[9]+'">'+data+'</a>'
|
||||
}
|
||||
else{
|
||||
return '<a href="${request.application_url}/eleve_credit/${eleve.CD_CLI}/'+row[9]+'">'+data+'</a>'
|
||||
}
|
||||
}
|
||||
},
|
||||
{ className: "text-center", "targets": [1, 3, 6]},
|
||||
{ className: "text-right", "targets": [4, 5, 8] },
|
||||
],
|
||||
createdRow: function( row, data, dataIndex ) {
|
||||
if ( data[7] != "" ) {
|
||||
// $( row ).css( "background-color", "LIGHTGREEN" );
|
||||
// $( row ).addClass( "success" );
|
||||
// $('td', row).eq(0).addClass("success");
|
||||
}
|
||||
if ( dataIndex == 3 ) {
|
||||
// $( row ).css( "background-color", "LIGHTGREEN" );
|
||||
// $( row ).addClass( "success" );
|
||||
$('td', row).eq(0).addClass("success");
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
// Javascript to enable link to tab
|
||||
var hash = document.location.hash;
|
||||
if (hash) {
|
||||
console.log(hash);
|
||||
$('.nav-tabs a[href="'+hash+'"]').tab('show');
|
||||
}
|
||||
|
||||
// Change hash for page-reload
|
||||
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
|
||||
window.location.hash = e.target.hash;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<br />
|
||||
<br />
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
59
aem_gestion/templates/eleves/suivi_edit.pt
Normal file
59
aem_gestion/templates/eleves/suivi_edit.pt
Normal file
@@ -0,0 +1,59 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form id="suiv_edit-form" action="${url}" method="post" class="form-horizontal">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="RESULTAT">Texte</label>
|
||||
<div class="col-xs-8">
|
||||
<textarea class="form-control" rows="20" cols="40" id="RESULTAT" name="RESULTAT">${item.RESULTAT}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<a href="${request.application_url}/fiche_eleve/${item.CD_CLI}#suivi" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-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">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#suiv_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: {
|
||||
RESULTAT: {
|
||||
validators: {
|
||||
stringLength: {
|
||||
max: 10000,
|
||||
message: '10000 caractères maximum'
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
64
aem_gestion/templates/examens/examen_list.pt
Normal file
64
aem_gestion/templates/examens/examen_list.pt
Normal file
@@ -0,0 +1,64 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="col-md-2">Permis : <b>${permis}</b></div>
|
||||
<div class="col-md-2">Total unités : <b>${total_unites}</b></div>
|
||||
<div class="col-md-3">Accompagnateur : <b>${accompgntr}</b></div>
|
||||
<div class="col-md-5">Lieu : <b>${lieu_exa}</b></div>
|
||||
|
||||
<table id="examens_list" class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Agence</th>
|
||||
<th>Prénom Nom</th>
|
||||
<th>Nom JF</th>
|
||||
<th>Filière</th>
|
||||
<th>Moniteur</th>
|
||||
<th>Téléphone</th>
|
||||
<th>ETG OK</th>
|
||||
<th>Indice</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
$('#examens_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ "targets": 1,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/fiche_eleve/' + data.substr(0, 6) + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
],
|
||||
createdRow: function( row, data, dataIndex ) {
|
||||
if ( data[1].slice(0,1) == "0" ) {
|
||||
if ( data[1].slice(0,6) == "000080") {
|
||||
$('td', row).eq(0).css('background-color', 'Gold');
|
||||
} else {
|
||||
$('td', row).eq(0).css('background-color', 'OrangeRed');
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
70
aem_gestion/templates/examens/examens_schd.pt
Normal file
70
aem_gestion/templates/examens/examens_schd.pt
Normal file
@@ -0,0 +1,70 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">Type d'examen : </label>
|
||||
<div class="col-sm-3">
|
||||
<select class="form-control" id="permis" name="permis" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="item types_permis">
|
||||
<option value="${item}" tal:attributes="selected permis==item and 'selected' or None">${item}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<a href="${request.application_url}/results_import" tal:condition="layout.isAdmin()"
|
||||
class="btn btn-success" role="button" >
|
||||
<span class="glyphicon glyphicon-import"></span> Import résultats</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="calendar"></div>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
</div><!-- content -->
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<!-- Bootstrap Fullcalendar plugin -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar-scheduler/1.9.4/scheduler.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/locale/fr.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var datePlan = '${datePlan}';
|
||||
|
||||
$('#calendar').fullCalendar({
|
||||
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
|
||||
locale: 'fr',
|
||||
header: {
|
||||
left: 'agendaWeek month listWeek',
|
||||
center: 'prev title next',
|
||||
right: 'today'
|
||||
},
|
||||
allDaySlot: false,
|
||||
defaultView: 'month',
|
||||
defaultDate: moment(datePlan),
|
||||
hiddenDays: [0], // hide sunday
|
||||
height: 'auto',
|
||||
minTime: "07:00:00",
|
||||
maxTime: "21:00:00",
|
||||
displayEventTime: true,
|
||||
timeFormat: 'H:mm',
|
||||
events:${calendar_events},
|
||||
eventRender: function(event, element){
|
||||
element.find('.fc-title').append("<br/>" + event.description);
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
|
||||
45
aem_gestion/templates/examens/result_del.pt
Normal file
45
aem_gestion/templates/examens/result_del.pt
Normal file
@@ -0,0 +1,45 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form id="result_del-form" action="${url}" method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<p class="form-control-static">Voulez-vous supprimer le message ?</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<button class="btn btn-warning" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-trash"></span> Supprimer</button>
|
||||
<a href="${request.application_url}/results_import" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#result_del-form').formValidation({
|
||||
framework: 'bootstrap',
|
||||
message: 'This value is not valid',
|
||||
icon: {
|
||||
valid: 'glyphicon glyphicon-ok',
|
||||
invalid: 'glyphicon glyphicon-remove',
|
||||
validating: 'glyphicon glyphicon-refresh'
|
||||
},
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
71
aem_gestion/templates/examens/results_import.pt
Normal file
71
aem_gestion/templates/examens/results_import.pt
Normal file
@@ -0,0 +1,71 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<table class="table table-striped table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Expéditeur</th>
|
||||
<th>Objet</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:repeat="item emails">
|
||||
<td>${item.email_date.strftime('%d %b, %H:%M')}</td>
|
||||
<td>${item.email_from}</td>
|
||||
<td>${item.email_subject}</td>
|
||||
<td class="text-center">
|
||||
<a href="${request.application_url}/result_del/${item.email_uid}"
|
||||
class="btn btn-warning btn-sm"><i class="glyphicon glyphicon-trash"></i> (${item.email_uid})</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<form id="motos_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">
|
||||
<div class="col-xs-8">
|
||||
<a href="${request.application_url}/examens_schd/today/B" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
|
||||
<button class="btn btn-success" type="submit" name="form.import" tal:condition="emails">
|
||||
<span class="glyphicon glyphicon-import"></span> Import resultats (${len(emails)})</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h2>Résultats d'examen mis à jour</h2>
|
||||
<table class="table table-striped table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date exa</th>
|
||||
<th>Code - Nom élève</th>
|
||||
<th>Permis</th>
|
||||
<th>Résultat</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr tal:repeat="item examens_maj">
|
||||
<td>${item.DATE.strftime('%d %b')}</td>
|
||||
<td><a href="${request.application_url}/fiche_eleve/${item.CD_CLI}">${item.CD_CLI} - ${item.NOM}</a></td>
|
||||
<td>${item.PERMIS}</td>
|
||||
<td>${item.libelle}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#generateButton').on('click', function(){
|
||||
$('i.gly-spin').removeClass('gly-spin');
|
||||
$('i').addClass('gly-spin');
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
115
aem_gestion/templates/global_layout.pt
Normal file
115
aem_gestion/templates/global_layout.pt
Normal file
@@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="https://www.w3.org/1999/xhtml"
|
||||
xmlns:metal="http://xml.zope.org/namespaces/metal"
|
||||
xmlns:tal="http://xml.zope.org/namespaces/tal"
|
||||
lang="fr">
|
||||
<head>
|
||||
<title>${page_title}</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="Espace Moniteurs">
|
||||
<link rel="apple-touch-icon" href="${request.static_url('aem_gestion:static/favicon.png')}">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<link rel="manifest" href="${request.static_url('aem_gestion:static/manifest.json')}">
|
||||
<!-- Bootstrap core + Plug-ins CSS -->
|
||||
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet">
|
||||
<link href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
|
||||
<link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.css" rel="stylesheet">
|
||||
<link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar-scheduler/1.9.4/scheduler.min.css" rel="stylesheet">
|
||||
<link href="//cdnjs.cloudflare.com/ajax/libs/datatables/1.10.18/css/dataTables.bootstrap.min.css" rel="stylesheet" media="all">
|
||||
<link href="//gyrocode.github.io/jquery-datatables-checkboxes/1.2.11/css/dataTables.checkboxes.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="${request.static_url('aem_gestion:static/dist/formvalidation/css/formValidation.min.css')}">
|
||||
<!-- Custom CSS -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.css" rel="stylesheet">
|
||||
<link href="${request.static_url('aem_gestion:static/css/style.less')}" type="text/css" rel="stylesheet/less">
|
||||
|
||||
|
||||
<!-- Bootstrap + jQuery JavaScript plugins) -->
|
||||
<style>
|
||||
.ui-autocomplete { overflow-y: scroll; max-height:200px}
|
||||
|
||||
</style>
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js" ></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- Moment plugin -->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/locale/fr.js"></script>
|
||||
<!-- Datatable + moment -->
|
||||
<script src="//cdn.datatables.net/1.10.18/js/jquery.dataTables.min.js"></script>
|
||||
<script src="//cdn.datatables.net/1.10.18/js/dataTables.bootstrap.min.js"></script>
|
||||
<script src="//cdn.datatables.net/plug-ins/1.10.19/sorting/datetime-moment.js"></script>
|
||||
<!-- FormValidation plugin -->
|
||||
<script src="${request.static_url('aem_gestion:static/dist/formvalidation/js/formValidation.min.js')}"></script>
|
||||
<script src="${request.static_url('aem_gestion:static/dist/formvalidation/js/framework/bootstrap.min.js')}"></script>
|
||||
<script src="${request.static_url('aem_gestion:static/dist/formvalidation/js/language/fr_FR.js')}" type="text/javascript"></script>
|
||||
<!-- Less -->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.3/less.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- HEADER -->
|
||||
<nav id="mainnav" class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a href="${request.application_url}" alt="Accueil">
|
||||
<img src="${request.static_url('aem_gestion:static/img/logo.png')}" class="logo" />
|
||||
</a>
|
||||
<b>Espace MONITEURS</b>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="myNavbar" tal:condition="not layout.isAnonymous()">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="${request.application_url}/monplanning/codeMon/today"><span class="glyphicon glyphicon-calendar"></span>Planning</a></li>
|
||||
<li><a href="${request.application_url}/eleves"><span class="glyphicon glyphicon-search"></span>Recherche</a></li>
|
||||
<li tal:condition="layout.isAdmin()">
|
||||
<a href="${request.application_url}/parametres"><span class="glyphicon glyphicon-cog"></span>Paramètres</a></li>
|
||||
${panel('dropdown_menu_panel')}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<div class="container">
|
||||
<h1 tal:condition="page_title">${page_title}</h1>
|
||||
<div id="messages"
|
||||
tal:attributes="class request.is_xhr and 'ajax-replace' or None">
|
||||
<div tal:repeat="queue ('', 'info', 'success', 'warning', 'danger')" tal:omit-tag="">
|
||||
<div class="alert alert-${queue or 'info'}"
|
||||
tal:define="messages request.session.pop_flash(queue)"
|
||||
tal:condition="messages"
|
||||
tal:repeat="message messages">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
${structure:message}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div metal:define-slot="content" />
|
||||
</div>
|
||||
<br />
|
||||
<footer class="footer text-center">
|
||||
<p>© 2017 <a href="https://www.marietton.com" >Auto-école Marietton</a></p>
|
||||
</footer>
|
||||
|
||||
<div metal:define-slot="additional_scripts" />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
aem_gestion/templates/panels/dropdown_menu_panel.pt
Normal file
17
aem_gestion/templates/panels/dropdown_menu_panel.pt
Normal file
@@ -0,0 +1,17 @@
|
||||
<li class="dropdown" tal:condition="logged_in">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">${logged_in_name}<b class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
<li class="dropdown-header">
|
||||
Code utilisateur : ${logged_in}<br />
|
||||
Niveau d'accès : ${logged_in_access}<br />
|
||||
Agence : ${logged_in_agence}<br />
|
||||
${logged_in_email}
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li><a href="${request.application_url}/change_agency">Changer mon agence</a></li>
|
||||
<li><a href="${request.application_url}/changer_mot_de_passe">Changer mon mot de passe</a></li>
|
||||
<li><a href="${request.application_url}/logout">Se déconnecter</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
126
aem_gestion/templates/parametres/activite_edit.pt
Normal file
126
aem_gestion/templates/parametres/activite_edit.pt
Normal file
@@ -0,0 +1,126 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" ></div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<form id="activity_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="individu"
|
||||
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" for="CD_CLI">Code</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="CD_CLI" name="CD_CLI" value="${individu.CD_CLI}"
|
||||
placeholder="3 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le code est obligatoire"
|
||||
data-fv-integer="true"
|
||||
data-fv-integer-message="Le code non validé"
|
||||
data-fv-between="true"
|
||||
data-fv-between-message="Le code doit inferieur à 100000"
|
||||
data-fv-between-max="100000"
|
||||
data-fv-between-min="1" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="NOM">Nom</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="NOM" name="NOM" value="${individu.NOM}"
|
||||
placeholder="30 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le nom est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="25"
|
||||
data-fv-stringlength-message="25 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="PRENOM">Prénom</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="PRENOM" name="PRENOM" value="${individu.PRENOM}"
|
||||
placeholder="25 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="25"
|
||||
data-fv-stringlength-message="25 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2">Catégorie</label>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" id="PERMIS_DEMANDE" name="PERMIS_DEMANDE">
|
||||
<tal:block tal:repeat="item permis">
|
||||
<option value="${item.CAT}" tal:attributes="selected individu.PERMIS_DEMANDE==item.CAT and 'selected' or None">${item.CAT}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-7 checkbox">
|
||||
<label><input type="checkbox" name="TR_P_OK" value="${individu.TR_P_OK}" id="TR_P_OK"
|
||||
tal:attributes="checked individu.TR_P_OK != None and 'checked' or None">Examen circulation
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-7 checkbox">
|
||||
<label><input type="checkbox" name="NePasRelancer" value="${individu.NePasRelancer}" id="NePasRelancer"
|
||||
tal:attributes="checked individu.NePasRelancer != 0 and 'checked' or None">Activité non imputable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/activites">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted" tal:condition="code == 9">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<button class="btn btn-warning" type="button" data-toggle="modal" data-target="#deleteItem"
|
||||
tal:condition="individu.CD_CLI != '' and code == 9 ">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modal -->
|
||||
<div class="modal fade" id="deleteItem" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Suppression</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Confirmez-vous la suppression de cette activité/ éleve provisoire ?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted" >Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
$('#activity_edit-form').formValidation()
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
73
aem_gestion/templates/parametres/activites.pt
Normal file
73
aem_gestion/templates/parametres/activites.pt
Normal file
@@ -0,0 +1,73 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<style>
|
||||
.redClass{
|
||||
background-color : #E6E6E6;
|
||||
color : #9C9C9C !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>
|
||||
<a href="${request.application_url}/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="${request.application_url}/activite_edit/0" class="btn btn-success" role="button" tal:condition="code == 9">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau </a>
|
||||
</p>
|
||||
|
||||
<table id="activites_lists" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Catégorie</th>
|
||||
<th>Code</th>
|
||||
<th>Nom</th>
|
||||
<th>Sté</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#activites_lists').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 10,
|
||||
bLengthChange: false,
|
||||
order: [[ 0, 'desc' ]],
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
createdRow: function( row, data, dataIndex){
|
||||
if( dataIndex === 4 ){
|
||||
$(row).addClass('hidden');
|
||||
}
|
||||
},
|
||||
columnDefs: [
|
||||
{
|
||||
targets: 2,
|
||||
render: function (data, type, full, meta) {
|
||||
return '<a href="/activite_edit/' + full[1] + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
{
|
||||
targets: 0,
|
||||
render: function (data, type, full, meta) {
|
||||
if(type === "sort"){
|
||||
return full[4]
|
||||
}
|
||||
return data;
|
||||
},
|
||||
}
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
189
aem_gestion/templates/parametres/agence_edit.pt
Normal file
189
aem_gestion/templates/parametres/agence_edit.pt
Normal file
@@ -0,0 +1,189 @@
|
||||
<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="user_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-3" for="CODE">Code</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" id="CODE" name="CODE" value="${item.CODE}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="LIBELLE">Nom</label>
|
||||
<div class="col-xs-9">
|
||||
<input class="form-control" type="text" id="LIBELLE" name="LIBELLE" value="${item.LIBELLE}"
|
||||
placeholder="25 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le LIBELLE est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="25"
|
||||
data-fv-stringlength-message="25 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="adresse">Adresse</label>
|
||||
<div class="col-xs-9">
|
||||
<input class="form-control" type="text" id="adresse" name="adresse" value="${item.adresse}"
|
||||
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" for="codepostal">Code postal - Ville</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" id="codepostal" name="codepostal" value="${item.codepostal}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="5"
|
||||
data-fv-stringlength-message="5 caractères maximum" />
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="ville" name="ville" value="${item.ville}"
|
||||
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="col-xs-3 control-label">Email</label>
|
||||
<div class="col-xs-9">
|
||||
<input class="form-control" type="text" name="email"
|
||||
value="${item.email}" placeholder="55 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="L'adresse email est obligatoire"
|
||||
data-fv-emailaddress="true"
|
||||
data-fv-emailaddress-message="L'adresse email n'est pas valide" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="TELEPHONE">Téléphone</label>
|
||||
<div class="col-xs-9">
|
||||
<input class="form-control" type="text" id="TELEPHONE" name="TELEPHONE" value="${item.TELEPHONE}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="google_maps">Google Maps</label>
|
||||
<div class="col-xs-9">
|
||||
<input class="form-control" type="text" id="google_maps" name="google_maps" value="${item.google_maps}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="text-primary">Comptabilité</h4>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="JNL_BNQ">Journal - Compte BNQ</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" id="JNL_BNQ" name="JNL_BNQ" value="${item.JNL_BNQ}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="3"
|
||||
data-fv-stringlength-message="3 caractères maximum" />
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="CPT_BNQ" name="CPT_BNQ" value="${item.CPT_BNQ}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le compte est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="CENTRE">Centre analytique</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" id="CENTRE" name="CENTRE" value="${item.CENTRE}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="3"
|
||||
data-fv-stringlength-message="3 caractères maximum" />
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<p class="form-control-static"><b>Dernière exportation : </b> ${item.DERN_EXPORT.strftime('%d/%m/%Y')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- VAUGNERAY -->
|
||||
<div tal:condition="item.CODE==6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="access">Dernière validation</label>
|
||||
<div class="col-xs-9">
|
||||
<p class="form-control-static">${item.DERN_VALIDATION.strftime('%d/%m/%Y')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Délai d'annulation</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="DELAI_ANNUL" name="DELAI_ANNUL" value="${item.DELAI_ANNUL}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">Jours</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Max leçons / semaine</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="MaxLeconASemaine" name="MaxLeconASemaine" value="${item.MaxLeconASemaine}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">Si 0, ajout leçon A interdit</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Max leçons / mois</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="MaxLeconAMois" name="MaxLeconAMois" value="${item.MaxLeconAMois}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">Leçon A</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Nb jours dérogation</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="MaxJoursDerogation" name="MaxJoursDerogation" value="${item.MaxJoursDerogation}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">Jours sans blocage leçon A</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-3 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/agences">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#user_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
34
aem_gestion/templates/parametres/agences.pt
Normal file
34
aem_gestion/templates/parametres/agences.pt
Normal file
@@ -0,0 +1,34 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<p>
|
||||
<a href="${request.application_url}/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
</p>
|
||||
|
||||
<table id="agences_list" class="table table-condensed table-striped table-bordered">
|
||||
<tr>
|
||||
<th class="text-center">Code</th>
|
||||
<th>Nom</th>
|
||||
<th class="text-center">Centre</th>
|
||||
<th>Téléphone</th>
|
||||
<th>Email</th>
|
||||
<th>Dern. validation</th>
|
||||
</tr>
|
||||
<tr tal:repeat="item items">
|
||||
<td class="text-center">${item.CODE}</td>
|
||||
<td><a href="/agence_edit/${item.CODE}">${item.LIBELLE}</a></td>
|
||||
<td class="text-center">${item.CENTRE}</td>
|
||||
<td>${item.TELEPHONE}</td>
|
||||
<td>${item.email}</td>
|
||||
<td>${item.DERN_VALIDATION.strftime('%d-%m-%Y')}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
43
aem_gestion/templates/parametres/ants_demandes.pt
Normal file
43
aem_gestion/templates/parametres/ants_demandes.pt
Normal file
@@ -0,0 +1,43 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<table id="ants_demandes" class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Identifiant</th>
|
||||
<th>Numéro</th>
|
||||
<th>Nom Prénom</th>
|
||||
<th>Type</th>
|
||||
<th>Statut</th>
|
||||
<th>Crée le</th>
|
||||
<th>Maj le</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD/MM/YYYY - HH:mm');
|
||||
$('#ants_demandes').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
70
aem_gestion/templates/parametres/ants_tables.pt
Normal file
70
aem_gestion/templates/parametres/ants_tables.pt
Normal file
@@ -0,0 +1,70 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-1">Table</label>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" id="table" name="table" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="item tables">
|
||||
<option value="${item}" tal:attributes="selected table==item and 'selected' or None">${item}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<table class="table table-striped table-bordered table-condensed" tal:condition="table=='DEPARTEMENTS' or table=='AUTORITES'">
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Nom</th>
|
||||
</tr>
|
||||
<tr tal:repeat="item items">
|
||||
<td>${item.code}</td>
|
||||
<td>${item.nom}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="table table-striped table-bordered table-condensed" tal:condition="table=='PAYS'">
|
||||
<tr>
|
||||
<th>Pays</th>
|
||||
</tr>
|
||||
<tr tal:repeat="item items">
|
||||
<td>${item}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<form id="table-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" tal:condition="items and logged_in=='CAO'">
|
||||
<div class="col-md-offset-1 col-md-8">
|
||||
<p class="text-danger">Attention : Ne pas importer pendant les heures d'ouverture des agences !</p>
|
||||
<div class="form-group" tal:condition="table=='PAYS'">
|
||||
<button class="btn btn-primary" type="submit" name="import.pays">
|
||||
<span class="glyphicon glyphicon-import"></span> Importer dans WS_PAYS</button>
|
||||
</div>
|
||||
<div class="form-group" tal:condition="table=='DEPARTEMENTS'">
|
||||
<button class="btn btn-primary" type="submit" name="import.dept">
|
||||
<span class="glyphicon glyphicon-import"></span> Importer dans WS_DEPARTEMENTS</button>
|
||||
<button class="btn btn-primary" type="submit" name="import.communes">
|
||||
<span class="glyphicon glyphicon-import"></span> Importer dans WS_COMMUNES</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
91
aem_gestion/templates/parametres/dashboard.pt
Normal file
91
aem_gestion/templates/parametres/dashboard.pt
Normal file
@@ -0,0 +1,91 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<h2>Derniers paiements</h2>
|
||||
<div class="col-md-6">
|
||||
<!-- graphique paiements -->
|
||||
<div id="chart_payments" style="width: 100%; height: 400px;"></div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<table class="table table-condensed table-bordered">
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Elève</th>
|
||||
<th style="text-align: right;">Montant</th>
|
||||
<th>Référence</th>
|
||||
<th>Err (*)</th>
|
||||
</tr>
|
||||
<tr tal:repeat="item payments">
|
||||
<td>${item.date.strftime('%d %b, %H:%M')}</td>
|
||||
<td><a href="/fiche_eleve/${item.cd_cli}">${item.cd_cli} - ${item.nom}</a></td>
|
||||
<td align="right">${item.montant}</td>
|
||||
<td>${item.ref_commande}</td>
|
||||
<td>${item.erreur[-2:]}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
(*) <a href="http://www1.paybox.com/espace-integrateur-documentation/dictionnaire-des-donnees/codes-reponses/#reseau-cb">
|
||||
Codes réponses de PAYBOX</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h2>Dernières connexions</h2>
|
||||
<div class="col-md-6">
|
||||
<!-- graphique connexions -->
|
||||
<div id="chart_connections" style="width: 100%; height: 400px;"></div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<table class="table table-condensed table-bordered">
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Elève</th>
|
||||
<th>Appareil</th>
|
||||
</tr>
|
||||
<tr tal:repeat="item connections">
|
||||
<td>${item.dern_cnx_le.strftime('%d %b, %H:%M')}</td>
|
||||
<td><a href="/fiche_eleve/${item.CD_CLI}">${item.CD_CLI} - ${item.CIVILITE} ${item.NOM} (${item.PERMIS_DEMANDE})</a></td>
|
||||
<td>${item.device_used}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h2>Derniers traitements différés</h2>
|
||||
<p><a href="/last_emailing">[ Consulter les derniers envois de mail ]</a></p>
|
||||
<table class="table table-condensed">
|
||||
<tr tal:repeat="item log_nuit">
|
||||
<td>${item.date.strftime('%d %b, %H:%M')}</td>
|
||||
<td>${item.proc}</td>
|
||||
<td>${item.msg}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
||||
<script type="text/javascript">
|
||||
google.charts.load("current", {packages:["corechart", 'bar']});
|
||||
google.charts.setOnLoadCallback(drawChart);
|
||||
var dataSet_paiements = ${courbe_paiements};
|
||||
var dataSet_connections = ${courbe_connections};
|
||||
|
||||
function drawChart() {
|
||||
var data_paiements = google.visualization.arrayToDataTable(dataSet_paiements);
|
||||
var data_connections = google.visualization.arrayToDataTable(dataSet_connections);
|
||||
|
||||
var options_connections = {
|
||||
title: 'sur les 10 derniers jours',
|
||||
};
|
||||
|
||||
var chart = new google.visualization.ColumnChart(document.getElementById('chart_payments'));
|
||||
chart.draw(data_paiements, options_connections);
|
||||
var chart = new google.visualization.ColumnChart(document.getElementById('chart_connections'));
|
||||
chart.draw(data_connections, options_connections);
|
||||
}
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
87
aem_gestion/templates/parametres/faq_edit.pt
Normal file
87
aem_gestion/templates/parametres/faq_edit.pt
Normal file
@@ -0,0 +1,87 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form id="faq_edit-form" action="${url}" method="post" class="form-horizontal">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="intitule">Intitulé</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="intitule" name="intitule" value="${intitule}"
|
||||
placeholder="40 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="L'intitule est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="texte">Texte</label>
|
||||
<div class="col-xs-8">
|
||||
<textarea class="form-control monospace-font" rows="15" cols="40" id="texte" name="texte">${texte}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="theme">Thème</label>
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control" id="theme" name="theme">
|
||||
<div tal:repeat="item themes">
|
||||
<option value="${item}" tal:attributes="selected theme==item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<a href="${request.application_url}/faq_view/${faq_id}" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" tal:condition="faq_id != '0'">
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<button class="btn btn-warning" type="submit" name="form.deleted">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#faq_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: {
|
||||
texte: {
|
||||
validators: {
|
||||
stringLength: {
|
||||
max: 30000,
|
||||
message: '30000 caractères maximum'
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
31
aem_gestion/templates/parametres/faq_list.pt
Normal file
31
aem_gestion/templates/parametres/faq_list.pt
Normal file
@@ -0,0 +1,31 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<p>
|
||||
<a href="faq_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
Créér une nouvelle FAQ</a>
|
||||
</p>
|
||||
<table class="table table-condensed table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Intitule</th>
|
||||
<th>Thème</th>
|
||||
<th>Dernière mise à jour</th>
|
||||
</tr>
|
||||
|
||||
<tr tal:repeat="ligne faqs">
|
||||
<td><a href="faq_view/${ligne.faq_id}">${ligne.intitule}</a></td>
|
||||
<td>${ligne.theme}</td>
|
||||
<td><span tal:content="ligne.modif_le.strftime('%d/%m/%Y %H:%M')" /></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
</metal:block>
|
||||
|
||||
21
aem_gestion/templates/parametres/faq_view.pt
Normal file
21
aem_gestion/templates/parametres/faq_view.pt
Normal file
@@ -0,0 +1,21 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<br />
|
||||
<a href="${request.application_url}/faq_edit/${faq_id}" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-pencil"></span> Modifier</a>
|
||||
<a href="${request.application_url}/faq_list" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Fermer</a>
|
||||
<br />
|
||||
<hr>
|
||||
<div tal:replace="structure texte">
|
||||
Page text goes here.
|
||||
</div>
|
||||
<hr>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
561
aem_gestion/templates/parametres/formule_edit.pt
Normal file
561
aem_gestion/templates/parametres/formule_edit.pt
Normal file
@@ -0,0 +1,561 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
|
||||
<form id="formule_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="control-label col-xs-4" for="FORMULE">Formule</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="FORMULE" name="FORMULE" value="${item.FORMULE}"
|
||||
placeholder="5 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La formule est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-stringlength-message=" caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="LIBELLE">Libellé</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="LIBELLE" name="LIBELLE" value="${item.LIBELLE}"
|
||||
placeholder="30 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le libellé 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">
|
||||
<div class="col-xs-offset-4 col-xs-3 checkbox">
|
||||
<label><input type="checkbox" name="STAGE" value="item.STAGE" id="STAGE"
|
||||
tal:attributes="checked item.STAGE != 0 and 'checked' or None">Formule stage
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-xs-5 checkbox">
|
||||
<label><input type="checkbox" name="forfait_code" value="item.forfait_code" id="forfait_code"
|
||||
tal:attributes="checked item.forfait_code != 0 and 'checked' or None">avec forfait code
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4">Type examen</label>
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" id="type_examen" name="type_examen">
|
||||
<tal:block tal:repeat="type_exa types_exa">
|
||||
<option value="${type_exa}" tal:attributes="selected type_exa==item.type_examen and 'selected' or None">${type_exa}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4">Filière</label>
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" id="FILIERE" name="FILIERE">
|
||||
<tal:block tal:repeat="fil filieres">
|
||||
<option value="${fil.code}" tal:attributes="selected fil.code==item.FILIERE and 'selected' or None">${fil.libelle}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Validité du code</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Jours</span>
|
||||
<input class="form-control" type="text" id="DUREE_CODE" name="DUREE_CODE" value="${item.DUREE_CODE}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">0 = pas de limite.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Validité conduite</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Jours</span>
|
||||
<input class="form-control" type="text" id="DUREE_COND" name="DUREE_COND" value="${item.DUREE_COND}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">0 = pas de limite.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="DateDeb">Date début validité</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group date" id="DateDeb">
|
||||
<input class="form-control" type="text" name="DateDeb" value="${item.DateDeb.strftime('%d-%m-%Y')}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La date de début est obligatoire"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="DateFin">Date fin validité</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group date" id="DateFin">
|
||||
<input class="form-control" type="text" name="DateFin" value="${item.DateFin.strftime('%d-%m-%Y')}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La date de fin est obligatoire"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY"
|
||||
data-fv-date-message="La date n'est pas valide" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="text-primary">Ce forfait comprend :</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Présentation théorique</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" id="NBPTGRATUIT" name="NBPTGRATUIT" value="${item.NBPTGRATUIT}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
</div>
|
||||
<label class="col-xs-2 control-label">Pratique</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" id="NBPPGRATUIT" name="NBPPGRATUIT" value="${item.NBPPGRATUIT}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Heure de conduite</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" id="NBHCGRATUIT" name="NBHCGRATUIT" value="${item.NBHCGRATUIT}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
</div>
|
||||
<label class="col-xs-2 control-label">valorisée à </label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="VAL_HCG" name="VAL_HCG" value="${item.VAL_HCG}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Séance de circuit</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" id="NBCCGRATUIT" name="NBCCGRATUIT" value="${item.NBCCGRATUIT}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
</div>
|
||||
<label class="col-xs-2 control-label">valorisée à </label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="VAL_CCG" name="VAL_CCG" value="${item.VAL_CCG}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Examen blanc</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" id="NBTAGRATUIT" name="NBTAGRATUIT" value="${item.NBTAGRATUIT}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
</div>
|
||||
<label class="col-xs-2 control-label">valorisée à </label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="VAL_TAG" name="VAL_TAG" value="${item.VAL_TAG}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">RDV pédagogique</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" id="NBRPGRATUIT" name="NBRPGRATUIT" value="${item.NBRPGRATUIT}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
</div>
|
||||
<label class="col-xs-2 control-label">valorisée à </label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="VAL_RPG" name="VAL_RPG" value="${item.VAL_RPG}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Heure de route</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" id="NBHRGRATUIT" name="NBHRGRATUIT" value="${item.NBHRGRATUIT}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
</div>
|
||||
<label class="col-xs-2 control-label">valorisée à </label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="VAL_HRG" name="VAL_HRG" value="${item.VAL_HRG}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Nb heure(s) par séance</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="HSeance" name="HSeance" value="${item.HSeance}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="text-primary">Produits à débiter à l'instription</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Réf. 1</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="INS1" name="INS1" value="${item.INS1}" />
|
||||
</div>
|
||||
<label class="col-xs-2 control-label">valorisée à </label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="MTVAL1" name="MTVAL1" value="${item.MTVAL1}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Réf. 2</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="INS2" name="INS2" value="${item.INS2}" />
|
||||
</div>
|
||||
<label class="col-xs-2 control-label">valorisée à </label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="MTVAL2" name="MTVAL2" value="${item.MTVAL2}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Réf. 3</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="INS3" name="INS3" value="${item.INS3}" />
|
||||
</div>
|
||||
<label class="col-xs-2 control-label">valorisée à </label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="MTVAL3" name="MTVAL3" value="${item.MTVAL3}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Réf. 4</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="INS4" name="INS4" value="${item.INS4}" />
|
||||
</div>
|
||||
<label class="col-xs-2 control-label">valorisée à </label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="MTVAL4" name="MTVAL4" value="${item.MTVAL4}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-3 control-label">Réf. 5</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="INS5" name="INS5" value="${item.INS5}" />
|
||||
</div>
|
||||
<label class="col-xs-2 control-label">valorisée à </label>
|
||||
<div class="col-xs-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="MTVAL5" name="MTVAL5" value="${item.MTVAL5}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="text-primary">Produits à débiter pour :</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Examen blanc</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="TFISC" name="TFISC" value="${item.TFISC}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Présentation théorique</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="P_THEOS" name="P_THEOS" value="${item.P_THEOS}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">1ère présentation pratique</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="P_PRATS1" name="P_PRATS1" value="${item.P_PRATS1}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Présentation pratique suivante</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="P_PRATS" name="P_PRATS" value="${item.P_PRATS}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Heure de conduite</label>
|
||||
<div class="col-xs-4">
|
||||
<input class="form-control" type="text" id="HCONDUIT" name="HCONDUIT" value="${item.HCONDUIT}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label">Document formant le contrat</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="CONTRAT1" name="CONTRAT1" value="${item.CONTRAT1}" readonly />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="access">Dernière modif.</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static" tal:condition="item.FORMULE != '0'">${item.modif_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/formules">
|
||||
<span class="glyphicon glyphicon-chevron-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="item.FORMULE != '0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<!-- Bootstrap Datepicker plugin -->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#formule_edit-form').formValidation();
|
||||
$('#DateDeb').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
})
|
||||
.on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#formule_edit-form').formValidation('revalidateField', 'DateDeb');
|
||||
});
|
||||
$('#DateFin').datetimepicker({
|
||||
format: 'DD-MM-YYYY',
|
||||
allowInputToggle: true,
|
||||
})
|
||||
.on('dp.change', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#formule_edit-form').formValidation('revalidateField', 'DateFin');
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
$('#INS1').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_tarifs',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 2,
|
||||
});
|
||||
$('#INS2').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_tarifs',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 2,
|
||||
});
|
||||
$('#INS3').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_tarifs',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 2,
|
||||
});
|
||||
$('#INS4').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_tarifs',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 2,
|
||||
});
|
||||
$('#INS5').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_tarifs',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 2,
|
||||
});
|
||||
$('#TFISC').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_tarifs',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 2,
|
||||
});
|
||||
$('#P_THEOS').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_tarifs',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 2,
|
||||
});
|
||||
$('#P_PRATS1').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_tarifs',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 2,
|
||||
});
|
||||
$('#P_PRATS').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_tarifs',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 2,
|
||||
});
|
||||
$('#HCONDUIT').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_tarifs',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 2,
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
68
aem_gestion/templates/parametres/formules.pt
Normal file
68
aem_gestion/templates/parametres/formules.pt
Normal file
@@ -0,0 +1,68 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-1">Validité</label>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" id="validite" name="validite" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="item validites">
|
||||
<option value="${item}" tal:attributes="selected validite==item and 'selected' or None">${item}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<p>
|
||||
<a href="${request.application_url}/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="${request.application_url}/formule_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvelle formule</a>
|
||||
</p>
|
||||
|
||||
<table id="formules_list" class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Formule</th>
|
||||
<th>Libellé</th>
|
||||
<th class="text-center">Stage</th>
|
||||
<th>Fin validité</th>
|
||||
<th class="text-center">Filière</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm');
|
||||
$('#formules_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
searching: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: "text-center", "targets": [2,4] },
|
||||
{ targets: 0,
|
||||
render: function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/formule_edit/' + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
74
aem_gestion/templates/parametres/inscriptions.pt
Normal file
74
aem_gestion/templates/parametres/inscriptions.pt
Normal file
@@ -0,0 +1,74 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-1">Inscriptions</label>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" id="table" name="table" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="item tables">
|
||||
<option value="${item}" tal:attributes="selected table==item and 'selected' or None">${item}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<table id="inscriptions" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Début stage</th>
|
||||
<th>Nom et prénom</th>
|
||||
<th>Solde</th>
|
||||
<th>Créé le</th>
|
||||
<th>Par</th>
|
||||
<th>Fin réservation</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm');
|
||||
$('#inscriptions').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: "text-center", "targets": [3,5] },
|
||||
{ className: "text-right", "targets": [2] },
|
||||
{ "targets": 1,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/fiche_eleve/' + data.substring(0, 6) + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
],
|
||||
createdRow: function( row, data, dataIndex ) {
|
||||
if ( data[2].substring(0, 1) == "-" ) {
|
||||
// $( row ).css( "background-color", "LIGHTGREEN" );
|
||||
// $( row ).addClass( "success" );
|
||||
$('td', row).eq(2).addClass("text-danger");
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
</metal:block>
|
||||
|
||||
83
aem_gestion/templates/parametres/justif_edit.pt
Normal file
83
aem_gestion/templates/parametres/justif_edit.pt
Normal file
@@ -0,0 +1,83 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form id="justif_edit-form" action="${url}" method="post" class="form-horizontal">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="CODE">Code document</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="CODE" name="CODE" value="${justif.CODE}"
|
||||
placeholder="10 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le type de devis est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-stringlength-message="10 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="TYPE">Type doc</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="TYPE" name="TYPE">
|
||||
<div tal:repeat="item types">
|
||||
<option value="${item}" tal:attributes="selected str(justif.TYPE)==item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBELLE">Intitulé</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="LIBELLE" name="LIBELLE" value="${justif.LIBELLE}"
|
||||
placeholder="30 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="L'intitule 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="conditions">Conditions</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="conditions" name="conditions" value="${justif.conditions}"
|
||||
placeholder="100 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="100"
|
||||
data-fv-stringlength-message="100 caractères maximum" />
|
||||
<p>(Si pas de condition, le justificatif est obligatoire)</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<a href="${request.application_url}/justifs_list" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-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="justif.CODE != '0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#justif_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
41
aem_gestion/templates/parametres/justifs_list.pt
Normal file
41
aem_gestion/templates/parametres/justifs_list.pt
Normal file
@@ -0,0 +1,41 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-1">Type : </label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" id="type" name="type" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="item types">
|
||||
<option value="${item}" tal:attributes="selected type==item and 'selected' or None">${item}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<a href="justif_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau document</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<table class="table table-condensed table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Intitulé</th>
|
||||
<th>Conditions</th>
|
||||
</tr>
|
||||
|
||||
<tr tal:repeat="ligne justifs">
|
||||
<td><a href="justif_edit/${ligne.CODE}">${ligne.CODE}</a></td>
|
||||
<td>${ligne.LIBELLE}</td>
|
||||
<td>${ligne.conditions}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
</metal:block>
|
||||
|
||||
76
aem_gestion/templates/parametres/last_emailing.pt
Normal file
76
aem_gestion/templates/parametres/last_emailing.pt
Normal file
@@ -0,0 +1,76 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">Notifications</label>
|
||||
<div class="col-sm-3">
|
||||
<select class="form-control" id="table" name="table" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="item tables">
|
||||
<option value="${item}" tal:attributes="selected table==item and 'selected' or None">${item}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-7" tal:condition="table=='RAPPELS RDV'">
|
||||
<button class="btn btn-success" type="submit" name="form.generate">
|
||||
<span class="glyphicon glyphicon-flash"></span> Générer les rappels</button>
|
||||
<button class="btn btn-primary" type="submit" name="form.email_rappels">
|
||||
<span class="glyphicon glyphicon-send"></span> Envoyer les rappels (${nbRappels})</button>
|
||||
</div>
|
||||
<div class="col-sm-7" tal:condition="table=='RESERVATIONS'">
|
||||
<button class="btn btn-success" type="submit" name="form.confirm">
|
||||
<span class="glyphicon glyphicon-flash"></span> Confirmer les résa</button>
|
||||
<button class="btn btn-primary" type="submit" name="form.email_resa">
|
||||
<span class="glyphicon glyphicon-send"></span> Envoyer les confirmations (${nbRappels})</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<table id="last_emailing" class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Réf.</th>
|
||||
<th>Date éch.</th>
|
||||
<th>Nom</th>
|
||||
<th>Email</th>
|
||||
<th>Statut</th>
|
||||
<th>Envoyé le</th>
|
||||
<th>Créé le</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm');
|
||||
$('#last_emailing').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ "targets": 2,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/fiche_eleve/' + data.substring(0, 6) + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
],
|
||||
order: [[5, 'des']],
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
257
aem_gestion/templates/parametres/moniteur_aff_edit.pt
Normal file
257
aem_gestion/templates/parametres/moniteur_aff_edit.pt
Normal file
@@ -0,0 +1,257 @@
|
||||
<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" style="margin:20px;">
|
||||
<form id="moniteur-aff-edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="individu"
|
||||
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-md-2" for="CD_MON">Moniteur</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" id="CD_MON" name="CD_MON" value="${individu.CD_MON}"
|
||||
placeholder="10 caractères maximum" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="AGENCE">Agence</label>
|
||||
<div class="col-md-6">
|
||||
<select class="form-control" id="AGENCE" name="AGENCE">
|
||||
<div tal:repeat="item agences">
|
||||
<option value="${item.CODE}" tal:attributes="selected individu.AGENCE==item.CODE and 'selected' or None">${item.CODE} | ${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="DATED"> A partir de </label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group date" id='datepicker1'>
|
||||
<input class="form-control " type="text" id="DATED" name="DATED" value="${DATED}"
|
||||
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 (JJ/MM/AAAA)" />
|
||||
<!-- <span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="DATEF"> Jusqu'au</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group date" id='datepicker2'>
|
||||
<input class="form-control " type="text" id="DATEF" name="DATEF" value="${DATEF}"
|
||||
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 (JJ/MM/AAAA)" />
|
||||
<!-- <span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6">Horaires </label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="DMATIN">Matin</label>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control " type="text" id="DMATIN" name="DMATIN" value="${individu.DMATIN}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-integer="true"
|
||||
data-fv-integer-message = "Seulement nombre"
|
||||
data-fv-notempty-message="Heure est obligatoire" />
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-md-2" for="FMATIN">à</label>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control " type="text" id="FMATIN" name="FMATIN" value="${individu.FMATIN}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-integer="true"
|
||||
data-fv-integer-message = "Seulement nombre"
|
||||
data-fv-notempty-message="Heure est obligatoire"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2" for="DSOIR">Après-midi</label>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control " type="text" id="DSOIR" name="DSOIR" value="${individu.DSOIR}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-integer="true"
|
||||
data-fv-integer-message = "Seulement nombre"
|
||||
data-fv-notempty-message="Heure est obligatoire" />
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-md-2" for="FSOIR">à</label>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control " type="text" id="FSOIR" name="FSOIR" value="${individu.FSOIR}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-integer="true"
|
||||
data-fv-integer-message = "Seulement nombre"
|
||||
data-fv-notempty-message="Heure est obligatoire" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-6">Jours de repos </label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-2 checkbox">
|
||||
<label><input type="checkbox" name="REPOS1" value="individu.REPOS1" id="REPOS1"
|
||||
tal:attributes="checked individu.REPOS1 == 1 and 'checked' or None">Lundi
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-offset-2 col-md-2 checkbox">
|
||||
<label><input type="checkbox" name="REPOS2" value="individu.REPOS2" id="REPOS2"
|
||||
tal:attributes="checked individu.REPOS2 == 1 and 'checked' or None">Mardi
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-offset-2 col-md-2 checkbox">
|
||||
<label><input type="checkbox" name="REPOS3" value="individu.REPOS3" id="REPOS3"
|
||||
tal:attributes="checked individu.REPOS1 == 1 and 'checked' or None">Mercredi
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-2 checkbox">
|
||||
<label><input type="checkbox" name="REPOS4" value="individu.REPOS4" id="REPOS4"
|
||||
tal:attributes="checked individu.REPOS4 != 0 and 'checked' or None">Jeudi
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-offset-2 col-md-2 checkbox">
|
||||
<label><input type="checkbox" name="REPOS5" value="individu.REPOS5" id="REPOS5"
|
||||
tal:attributes="checked individu.REPOS5 != 0 and 'checked' or None">Vendredi
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-offset-2 col-md-2 checkbox">
|
||||
<label><input type="checkbox" name="REPOS6" value="individu.REPOS6" id="REPOS6"
|
||||
tal:attributes="checked individu.REPOS6 != 0 and 'checked' or None">Samedi
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access"></label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static" tal:condition="individu.no_ligne != '0'"> <b>Crée le</b> ${cree_le} , <b>modifié le</b> ${modif_le} par ${individu.cd_uti}</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/${redirect}">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-warning" type="button" data-toggle="modal" data-target="#deleteMoniteurAff"
|
||||
tal:condition="individu.no_ligne != '0' and code==9">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted" tal:condition="code==9">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modal -->
|
||||
<div class="modal fade" id="deleteMoniteurAff" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Suppression</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Confirmez-vous la suppression de cette affectation ?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted" >Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#moniteur-aff-edit-form').formValidation({
|
||||
fields : {
|
||||
DMATIN : {
|
||||
validators: {
|
||||
between: {
|
||||
min: 1,
|
||||
max: 14,
|
||||
message: 'L\'heure devrait entre 1h - 14 h'
|
||||
}
|
||||
}
|
||||
},
|
||||
FMATIN : {
|
||||
validators: {
|
||||
between: {
|
||||
min: 1,
|
||||
max: 14,
|
||||
message: 'L\'heure devrait entre 1h - 14 h'
|
||||
}
|
||||
}
|
||||
},
|
||||
DSOIR : {
|
||||
validators: {
|
||||
between: {
|
||||
min: 12,
|
||||
max: 23,
|
||||
message: 'L\'heure devrait entre 12h - 23h'
|
||||
}
|
||||
}
|
||||
},
|
||||
FSOIR : {
|
||||
validators: {
|
||||
between: {
|
||||
min: 12,
|
||||
max: 23,
|
||||
message: 'L\'heure devrait entre 12h - 23 h'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
|
||||
$('#DATED').datetimepicker({
|
||||
format: 'DD/MM/YYYY'
|
||||
});
|
||||
$('#DATEF').datetimepicker({
|
||||
useCurrent: false ,
|
||||
format: 'DD/MM/YYYY'
|
||||
});
|
||||
$("#DATED").on("dp.change", function (e) {
|
||||
$('#DATEF').data("DateTimePicker").minDate(e.date);
|
||||
});
|
||||
$("#DATEF").on("dp.change", function (e) {
|
||||
$('#DATED').data("DateTimePicker").maxDate(e.date);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
173
aem_gestion/templates/parametres/moniteur_edit.pt
Normal file
173
aem_gestion/templates/parametres/moniteur_edit.pt
Normal file
@@ -0,0 +1,173 @@
|
||||
<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="user_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="individu"
|
||||
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" for="CD_MON">Code</label>
|
||||
<div class="col-xs-2">
|
||||
<input class="form-control" type="text" id="CD_MON" name="CD_MON" value="${individu.CD_MON}"
|
||||
placeholder="3 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le code est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="3"
|
||||
data-fv-stringlength-message="3 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="NOM">Prénom</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="NOM" name="NOM" value="${individu.NOM}"
|
||||
placeholder="30 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le nom est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="25"
|
||||
data-fv-stringlength-message="25 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2">Ordre Planning</label>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" id="PLANNING" name="PLANNING">
|
||||
<tal:block tal:repeat="item plannings">
|
||||
<option value="${item}" tal:attributes="selected individu.PLANNING==item and 'selected' or None">${item}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="no_autorisation">No autorisation</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="no_autorisation" name="no_autorisation" value="${individu.no_autorisation}"
|
||||
placeholder="25 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="25"
|
||||
data-fv-stringlength-message="25 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-7 checkbox">
|
||||
<label><input type="checkbox" name="obsolete" value="individu.obsolete" id="obsolete"
|
||||
tal:attributes="checked individu.obsolete == -1 and 'checked' or None">Moniteur obsolete
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access"></label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static" tal:condition="code != '0'"> <b>Crée le</b> ${cree_le} , <b>modifié le</b> ${modif_le} par ${individu.cd_uti}</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/moniteurs">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-warning" type="button" data-toggle="modal" data-target="#deleteMoniteur"
|
||||
tal:condition="individu.CD_MON != '0' and codeu == 9">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted" tal:condition="codeu == 9">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modal -->
|
||||
<div class="modal fade" id="deleteMoniteur" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Suppression</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Confirmez-vous la suppression de ce moniteur ?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted" >Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
<div class="row" tal:condition="show_aff">
|
||||
<h2 style="margin-bottom:20px;">Affectation du moniteur</h2>
|
||||
<p>
|
||||
<!-- <a href="${request.application_url}/moniteurs" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a> -->
|
||||
<a href="${request.application_url}/moniteur_aff_edit/${individu.CD_MON}/0" class="btn btn-success" role="button" tal:condition="codeu==9">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau</a>
|
||||
</p>
|
||||
|
||||
<table id="moniteurs_aff_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No Ligne</th>
|
||||
<th>Agence</th>
|
||||
<th>Début</th>
|
||||
<th>Fin</th>
|
||||
<th>Matin</th>
|
||||
<th>Aprés-Midi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
|
||||
});
|
||||
var dataSet = ${dt_data};
|
||||
$(document).ready(function() {
|
||||
var table = $('#moniteurs_aff_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 10,
|
||||
bLengthChange: false,
|
||||
bFilter: true,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ targets: 0,
|
||||
render: function (data, type, full, meta) {
|
||||
return '<a href="/moniteur_aff_edit/'+full[6]+'/'+data+'">'+data+ '</a>'
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
$('#moniteurs_aff_list tbody').on('click','tr', function(){
|
||||
var data = table.row(this).data()
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
69
aem_gestion/templates/parametres/moniteurs.pt
Normal file
69
aem_gestion/templates/parametres/moniteurs.pt
Normal file
@@ -0,0 +1,69 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<style>
|
||||
.redClass{
|
||||
background-color : #E6E6E6;
|
||||
color : #9C9C9C !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>
|
||||
<a href="${request.application_url}/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="${request.application_url}/moniteurs_agence" class="btn btn-info" role="button">
|
||||
<span class="glyphicon glyphicon-list"></span> Liste moniteurs par agence</a>
|
||||
<a href="${request.application_url}/moniteur_edit/0" class="btn btn-success" role="button" tal:condition="code == 9">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau</a>
|
||||
</p>
|
||||
|
||||
<table id="moniteurs_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>CD_MON</th>
|
||||
<th>Prénom Nom</th>
|
||||
<th>Planning</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#moniteurs_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 10,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
createdRow: function( row, data, dataIndex){
|
||||
console.log(data);
|
||||
if( parseInt(data[3]) === -1 ){
|
||||
$(row).addClass('redClass');
|
||||
}
|
||||
},
|
||||
columnDefs: [
|
||||
{ targets: 1,
|
||||
render: function (data, type, full, meta) {
|
||||
if(parseInt(full[3]) === -1){
|
||||
return data;
|
||||
}
|
||||
else{
|
||||
return '<a href="/moniteur_edit/' + full[0] + '">' + data + '</a>';
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
142
aem_gestion/templates/parametres/moniteurs_agence.pt
Normal file
142
aem_gestion/templates/parametres/moniteurs_agence.pt
Normal file
@@ -0,0 +1,142 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<style>
|
||||
.redClass{
|
||||
background-color : #E6E6E6;
|
||||
color : #9C9C9C !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>
|
||||
<a href="${request.application_url}/moniteurs" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
</p>
|
||||
<div class="row" style="margin:20px;">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-1" for="agencefilter">Agence</label>
|
||||
<div class="col-md-4">
|
||||
<select class="form-control" id="agencefilter" >
|
||||
<div tal:repeat="item agences">
|
||||
<option value="${item.CODE}" tal:attributes="selected agencefilter==item.CODE and 'selected' or None">${item.CODE} | ${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
<label class="control-label col-md-1" for="datefilter"> Date </label>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group date">
|
||||
<input class="form-control" type="text" id="datefilter" name="datefilter" value="${datefilter}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="moniteurs_agence_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Prénom Nom</th>
|
||||
<th >Début</th>
|
||||
<th >Fin</th>
|
||||
<th>Matin</th>
|
||||
<th>Aprés-midi</th>
|
||||
<th>Agence</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function( settings, data, dataIndex ) {
|
||||
var currentagence = $('#agencefilter').val();
|
||||
var date = $('#datefilter').val();
|
||||
var dated = data[2].substring(8);
|
||||
var datef = data[3].substring(8);
|
||||
var agence = data[6];
|
||||
if(parseInt(agence) === parseInt(currentagence)){
|
||||
var currentdate = moment(date.replaceAll('/','-'),'DD-MM-YYYY',true);
|
||||
var ddate = moment(dated.replaceAll('/','-'),'DD-MM-YYYY',true);
|
||||
var fdate = moment(datef.replaceAll('/','-'),'DD-MM-YYYY',true);
|
||||
if(currentdate.isValid() && ddate.isValid() && fdate.isValid()){
|
||||
var timesf = fdate.toDate().getTime() - currentdate.toDate().getTime();
|
||||
var timesd = ddate.toDate().getTime() - currentdate.toDate().getTime();
|
||||
var daysf = Math.round(timesf /(1000 * 3600 * 24));
|
||||
var daysd = Math.round(timesd /(1000 * 3600 * 24));
|
||||
if(daysf >= 0 && daysd <= 0){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else{
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
return false
|
||||
}
|
||||
return true;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
var table = $('#moniteurs_agence_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 10,
|
||||
bLengthChange: false,
|
||||
bInfo: true,
|
||||
sDom: 'frtlip',
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
|
||||
{ targets: 1,
|
||||
render: function (data, type, full, meta) {
|
||||
return '<a href="/moniteur_aff_edit/' + full[0] +'/'+ full[7] + '?origin=1">' + data + '</a>';
|
||||
}
|
||||
},
|
||||
{ targets: 2,
|
||||
render: function (data, type, full, meta) {
|
||||
return '<span style="display:none" >'+parseInt(full[8])+'</span>'+data;
|
||||
}
|
||||
},
|
||||
{ targets: 3,
|
||||
render: function (data, type, full, meta) {
|
||||
return '<span style="display:none" >'+parseInt(full[9])+'</span>'+data;
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
$('#datefilter').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
}).on('dp.change',function (e) {
|
||||
table.draw();
|
||||
});;
|
||||
|
||||
$('#datefilter').on('input change', function(){
|
||||
var date = moment(this.value.replaceAll('/','-'),'DD-MM-YYYY',true);
|
||||
if(date.isValid()){
|
||||
console.log('valid');
|
||||
table.draw();
|
||||
}
|
||||
});
|
||||
$('#agencefilter').change(function(){
|
||||
table.draw();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
119
aem_gestion/templates/parametres/parametres.pt
Normal file
119
aem_gestion/templates/parametres/parametres.pt
Normal file
@@ -0,0 +1,119 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div id="jquery" class="container-fluid">
|
||||
<div class="row text-center">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/faq_list"><span class="glyphicon glyphicon-question-sign logo-primary"></span></a>
|
||||
<h4>FAQ</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/users"><span class="glyphicon glyphicon-user logo-primary"></span></a>
|
||||
<h4>UTILISATEURS</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/moniteurs"><span class="glyphicon glyphicon-user logo-primary"></span></a>
|
||||
<h4>MONITEURS</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/semaine_types"><span class="glyphicon glyphicon-calendar logo-primary"></span></a>
|
||||
<h4>SEMAINE-TYPE</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row text-center">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/types_devis"><span class="glyphicon glyphicon-list logo-primary"></span></a>
|
||||
<h4>TYPES de DEVIS</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/tarifs"><span class="glyphicon glyphicon-list logo-primary"></span></a>
|
||||
<h4>TARIFS</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/permis"><span class="glyphicon glyphicon-list logo-primary"></span></a>
|
||||
<h4>PERMIS</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/formules"><span class="glyphicon glyphicon-list logo-primary"></span></a>
|
||||
<h4>FORMULES</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row text-center">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/justifs_list"><span class="glyphicon glyphicon-list logo-primary"></span></a>
|
||||
<h4>JUSTIFICATIFS</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/agences"><span class="glyphicon glyphicon-list logo-primary"></span></a>
|
||||
<h4>AGENCES</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/activites"><span class="glyphicon glyphicon-sunglasses logo-primary"></span></a>
|
||||
<h4>ACTIVITES</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/pass_rousseau"><span class="glyphicon glyphicon-expand logo-primary"></span></a>
|
||||
<h4>PASS ROUSSEAU</h4>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<h2>Exploitation</h2>
|
||||
<div class="row text-center">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/dashboard"><span class="glyphicon glyphicon-dashboard logo-primary"></span></a>
|
||||
<h4>Tableau de bord</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/inscriptions"><span class="glyphicon glyphicon-edit logo-primary"></span></a>
|
||||
<h4>Inscriptions web</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/users_ua"><span class="glyphicon glyphicon-log-in logo-primary"></span></a>
|
||||
<h4>CONNEXIONS</h4>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<h2>Compta</h2>
|
||||
<div class="row text-center">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/recap_moniteur"><span class="glyphicon glyphicon-list-alt logo-primary"></span></a>
|
||||
<h4>RECAP HEURES MON.</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/export_cpta"><span class="glyphicon glyphicon-export logo-primary"></span></a>
|
||||
<h4>EXPORT COMPTA</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/solder_contrats"><span class="glyphicon glyphicon-check logo-primary"></span></a>
|
||||
<h4>SOLDER CONTRATS</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/balance_clients"><span class="glyphicon glyphicon-scale logo-primary"></span></a>
|
||||
<h4>BALANCE CLIENTS</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row text-center" tal:condition="logged_in=='cao'">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/stats_pay"><span class="glyphicon glyphicon-stats logo-primary"></span></a>
|
||||
<h4>STATS REGL.</h4>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<h2>ANTS</h2>
|
||||
<div class="row text-center" tal:condition="logged_in=='cao'">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/ants_demandes"><span class="glyphicon glyphicon-import logo-primary"></span></a>
|
||||
<h4>Demandes ANTS</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/ants_tables"><span class="glyphicon glyphicon-list logo-primary"></span></a>
|
||||
<h4>Tables ANTS</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
55
aem_gestion/templates/parametres/pass_rousseau.pt
Normal file
55
aem_gestion/templates/parametres/pass_rousseau.pt
Normal file
@@ -0,0 +1,55 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<p>
|
||||
<a href="${request.application_url}/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
</p>
|
||||
|
||||
<table id="pass_rousseau" class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Acheté le</th>
|
||||
<th>Identifiant</th>
|
||||
<th>Mot de passe</th>
|
||||
<th>Expire le</th>
|
||||
<th>Vendu le</th>
|
||||
<th>Vendu à</th>
|
||||
<th>Code postal</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
$('#pass_rousseau').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
order: [[ 0, "desc" ]],
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ targets: 5,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers la fiche élève
|
||||
return '<a href="/fiche_eleve/' + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
58
aem_gestion/templates/parametres/pdfviewer.pt
Normal file
58
aem_gestion/templates/parametres/pdfviewer.pt
Normal file
@@ -0,0 +1,58 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<canvas id="the-canvas"></canvas>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script src="//mozilla.github.io/pdf.js/build/pdf.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
var url = '${pdf_url}';
|
||||
|
||||
// Loaded via <script> tag, create shortcut to access PDF.js exports.
|
||||
var pdfjsLib = window['pdfjs-dist/build/pdf'];
|
||||
|
||||
// The workerSrc property shall be specified.
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js';
|
||||
|
||||
// Asynchronous download of PDF
|
||||
var loadingTask = pdfjsLib.getDocument(url);
|
||||
loadingTask.promise.then(function(pdf) {
|
||||
console.log('PDF loaded');
|
||||
|
||||
// Fetch the first page
|
||||
var pageNumber = 1;
|
||||
pdf.getPage(pageNumber).then(function(page) {
|
||||
console.log('Page loaded');
|
||||
|
||||
var scale = 1.5;
|
||||
var viewport = page.getViewport({scale: scale});
|
||||
|
||||
// Prepare canvas using PDF page dimensions
|
||||
var canvas = document.getElementById('the-canvas');
|
||||
var context = canvas.getContext('2d');
|
||||
canvas.height = viewport.height;
|
||||
canvas.width = viewport.width;
|
||||
|
||||
// Render PDF page into canvas context
|
||||
var renderContext = {
|
||||
canvasContext: context,
|
||||
viewport: viewport
|
||||
};
|
||||
var renderTask = page.render(renderContext);
|
||||
renderTask.promise.then(function () {
|
||||
console.log('Page rendered');
|
||||
});
|
||||
});
|
||||
}, function (reason) {
|
||||
// PDF loading error
|
||||
console.error(reason);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
56
aem_gestion/templates/parametres/permis.pt
Normal file
56
aem_gestion/templates/parametres/permis.pt
Normal file
@@ -0,0 +1,56 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<p>
|
||||
<a href="${request.application_url}/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="${request.application_url}/permis_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau permis</a>
|
||||
</p>
|
||||
|
||||
<table id="permis_list" class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Catégorie</th>
|
||||
<th>Libellé</th>
|
||||
<th>Examen</th>
|
||||
<th class="text-right">En-cours autorisé</th>
|
||||
<th class="text-right">Plafond résa</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm');
|
||||
$('#permis_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
searching: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: "text-right", "targets": [3,4] },
|
||||
{ targets: 0,
|
||||
render: function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/permis_edit/' + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
272
aem_gestion/templates/parametres/permis_edit.pt
Normal file
272
aem_gestion/templates/parametres/permis_edit.pt
Normal file
@@ -0,0 +1,272 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
<br />
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#permis"><h4>PERMIS</h4></a></li>
|
||||
<li tal:condition="item.CAT != '0'"><a data-toggle="tab" href="#justifs"><h4>JUSTIFICATIFS</h4></a></li>
|
||||
</ul>
|
||||
|
||||
<form id="permis_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="tab-content">
|
||||
<!-- FICHE PERMIS -->
|
||||
<div id="permis" class="tab-pane fade in active">
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="CAT">Catégorie</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="CAT" name="CAT" value="${item.CAT}"
|
||||
placeholder="5 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La catégorie est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="5"
|
||||
data-fv-stringlength-message="5 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIB">Libellé</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIB" name="LIB" value="${item.LIB}"
|
||||
placeholder="30 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le libellé 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">Type examen</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="type_examen" name="type_examen">
|
||||
<tal:block tal:repeat="type_exa types_exa">
|
||||
<option value="${type_exa}" tal:attributes="selected type_exa==item.type_examen and 'selected' or None">${type_exa}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">En-cours autorisé</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="EnCours" name="EnCours" value="${item.EnCours}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Plafond réservation</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="plafond_resa" name="plafond_resa" value="${item.plafond_resa}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="text-primary">Paramètres Code</h3>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Validité du Code</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Année</span>
|
||||
<input class="form-control" type="text" id="VCODE" name="VCODE" value="${item.VCODE}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Age minimum</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Année</span>
|
||||
<input class="form-control" type="text" id="AgeCode" name="AgeCode" value="${item.AgeCode}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">0 = pas de minimum.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Nb d'heures min.</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="HCODE" name="HCODE" value="${item.HCODE}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">0 = pas de minimum</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="text-primary">Paramètres Conduite</h3>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Age minimum</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Année</span>
|
||||
<input class="form-control" type="text" id="AgeCond" name="AgeCond" value="${item.AgeCond}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">0 = pas de minimum.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Age minimum AAC</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Année</span>
|
||||
<input class="form-control" type="text" id="AgeCondAAC" name="AgeCondAAC" value="${item.AgeCondAAC}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Nb d'heures min.</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="HCOND" name="HCOND" value="${item.HCOND}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">0 = pas de minimum</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Nb d'évaluation min.</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="HEVAL" name="HEVAL" value="${item.HEVAL}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">0 = pas de minimum</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Nb d'échecs pratique</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="NECHECP" name="NECHECP" value="${item.NECHECP}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">0 = pas de maximum</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Dernière modif.</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static" tal:condition="item.CAT != '0'">${item.modif_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div> <!-- onglet TARIF -->
|
||||
|
||||
<!-- JUSTIFICATIFS -->
|
||||
<div id="justifs" class="tab-pane fade">
|
||||
<br />
|
||||
<p>
|
||||
<a href="#" class="btn btn-success" role="button"
|
||||
data-toggle="modal" data-target="#confirmCreate"><span class="glyphicon glyphicon-plus"></span> Nouvel justif</a>
|
||||
</p>
|
||||
<table class="table table-condensed table-striped table-bordered">
|
||||
<tr>
|
||||
<th class="text-center">No</th>
|
||||
<th>Intitulé</th>
|
||||
<th>Conditions</th>
|
||||
<th>Modif le</th>
|
||||
</tr>
|
||||
|
||||
<tr tal:repeat="ligne justifs">
|
||||
<td class="text-center">${ligne.no_tri}</td>
|
||||
<td><a href="/permis_justif/${ligne.CAT}/${ligne.CODE}">${ligne.libelle}</a></td>
|
||||
<td>${ligne.conditions}</td>
|
||||
<td tal:condition="ligne.modif_le">${ligne.modif_le.strftime('%d/%m/%Y - %H:%M')}</td>
|
||||
<td tal:condition="not ligne.modif_le"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</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.application_url}/permis">
|
||||
<span class="glyphicon glyphicon-chevron-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="item.CAT != '0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Modal : Confirmation CREATION -->
|
||||
<div class="modal fade" id="confirmCreate" role="dialog" aria-labelledby="confirmCreateLabel" 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">Ajouter un justificatif</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="add_justif-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-3">Ajouter</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control static" name="code_add">
|
||||
<tal:block tal:repeat="item justifs_add">
|
||||
<option value="${item.CODE}" tal:attributes="selected code_add==item.CODE and 'selected' or None">${item.LIBELLE}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="submit" class="btn btn-danger" name="form.justif_added">Ajouter</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#permis_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
60
aem_gestion/templates/parametres/permis_justif.pt
Normal file
60
aem_gestion/templates/parametres/permis_justif.pt
Normal file
@@ -0,0 +1,60 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<form id="justif_edit-form" action="${url}" method="post" class="form-horizontal">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Code justif</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static">${item.CODE}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Libellé justif</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static">${item.libelle}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="no_tri">No de tri</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="no_tri" name="no_tri" value="${item.no_tri}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Dernière modif.</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static" tal:condition="item.modif_le">${item.modif_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<a href="${request.application_url}/permis_edit/${item.CAT}" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-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">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#justif_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
275
aem_gestion/templates/parametres/semaine_type_view.pt
Normal file
275
aem_gestion/templates/parametres/semaine_type_view.pt
Normal file
@@ -0,0 +1,275 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div class="container">
|
||||
<style>
|
||||
.ui-autocomplete {
|
||||
z-index:2147483647;
|
||||
}
|
||||
.modal {
|
||||
text-align: center;
|
||||
padding: 0!important;
|
||||
}
|
||||
|
||||
.modal:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 80vh;
|
||||
vertical-align: middle;
|
||||
margin-right: -4px;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<form id="semaine_type_view-form" action="${url}" method="post" tal:condition="semaine_type"
|
||||
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 row">
|
||||
<a class="btn btn-default" href="${request.application_url}/semaine_types">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<label class="control-label col-xs-2" for="LIBELLE">Libellé : </label>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="LIBELLE" name="LIBELLE" value="${semaine_type.LIBELLE}"
|
||||
placeholder="Libellé"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Libellé ne peut pas etre vide."/>
|
||||
<input type="hidden" value="${semaine_type.CODE_SEM}" name="CODE_SEM" />
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<button class="btn btn-success" type="submit" name="form.duplicated">
|
||||
<span class="glyphicon glyphicon-plus"></span> Dupliquer</button>
|
||||
<a class="btn btn-warning" data-toggle="modal" href="#deleteItem">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</a>
|
||||
</div>
|
||||
<!-- modal -->
|
||||
<div class="modal fade" id="deleteItem" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Suppression</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Confirmez-vous la suppression de cette semaine-type ?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted" >Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
<br />
|
||||
<div id="calendar"></div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<form id="semaine_type_activity-form" action="${url}" method="post" tal:condition="semaine_type"
|
||||
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">
|
||||
<!-- modal -->
|
||||
<div class="modal fade" id="addActivite" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Nouveau activité</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group row" style="margin-bottom:15px;">
|
||||
<label class="control-label col-xs-3" for="dh_debut">Date-heure</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="dh_debut" name="dh_debut" value="" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="ACTIVITE" id="ACTIVITE" />
|
||||
<input type="hidden" name="no_ligne" id="no_ligne" />
|
||||
<div class="form-group row" style="margin-bottom:15px;">
|
||||
<label class="control-label col-xs-3" for="AJAX">Activité</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="AJAX" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" style="margin-bottom:15px;">
|
||||
<label class="control-label col-xs-3" for="INTITULE"></label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="INTITULE" name="INTITULE"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le libelle est obligatoire" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row " style="margin-bottom:15px;">
|
||||
<label class="control-label col-xs-3" for="qte">Nb heures</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="number" id="qte" name="qte" value="1"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-danger" name="form.activity.deleted">Supprimer</button>
|
||||
<button type="submit" class="btn btn-success" name="form.activity.submitted"> Enregistrer</button>
|
||||
<a href="#" onclick="duplicateActivity(this)" name="" id="dup_activity" class="btn btn-primary" >Dupliquer</a>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"> Annuler</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- duplicate -->
|
||||
<div class="modal fade" id="duplicateACtivity" style="z-index:999999;" tabindex="-1" role="dialog" aria-labelledby="modalLabelActivity" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabelActivity">DUPLIQUER L'ACTIVITE</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-xs-1" for="qte_j">Sur</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="number" id="qte_j" name="qte_j" value="4"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le libelle est obligatoire"/>
|
||||
</div>
|
||||
<label class="control-label col-xs-9" for="qte_j">jours consécutifs</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-primary" name="form.activity.duplicated" >Dupliquer</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- content -->
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<!-- Bootstrap Fullcalendar plugin -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar-scheduler/1.9.4/scheduler.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/locale/fr.js"></script>
|
||||
<script>
|
||||
|
||||
function duplicateActivity(e){
|
||||
if(e.name != ""){
|
||||
var data = JSON.parse(e.name)
|
||||
$('#modalLabelActivity').text('DUPLIQUER L\'ACTIVITE '+data['INTITULE']);
|
||||
$('#activity_no_ligne').val(data['no_ligne']);
|
||||
}
|
||||
else{
|
||||
$('#modalLabelActivity').text('DUPLIQUER L\'ACTIVITE');
|
||||
}
|
||||
|
||||
//$('#addActivite').modal('hide')
|
||||
$('#duplicateACtivity').modal('show');
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#semaine_type_view-form').formValidation();
|
||||
var fv = $('#semaine_type_activity-form').formValidation().data();
|
||||
$('#AJAX').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_activity',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 1,
|
||||
select: function (event, data) {
|
||||
$('#ACTIVITE').val(data.item.data)
|
||||
$('#INTITULE').val(data.item.label)
|
||||
fv.formValidation.validateField($('#INTITULE'))
|
||||
fv.formValidation.updateStatus($('#INTITULE'),'VALID');
|
||||
return false;
|
||||
}
|
||||
})
|
||||
$('#calendar').fullCalendar({
|
||||
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
|
||||
locale: 'fr',
|
||||
header: {
|
||||
left: 'agendaWeek listWeek',
|
||||
center: 'prev title next',
|
||||
right: 'today'
|
||||
},
|
||||
allDaySlot: false,
|
||||
defaultView: 'agendaWeek',
|
||||
defaultDate: "05/06/2000",
|
||||
slotDuration: '00:60:00',
|
||||
hiddenDays: [0], // hide sunday
|
||||
height: 'auto',
|
||||
minTime: "07:00:00",
|
||||
maxTime: "23:00:00",
|
||||
displayEventTime: true,
|
||||
events:${calendar_events},
|
||||
eventClick: function(calEvent, jsEvent, view) {
|
||||
var data = JSON.parse(calEvent.data)
|
||||
$('#dh_debut').val(data.dh_debut);
|
||||
$('#ACTIVITE').val(data.ACTIVITE);
|
||||
$('#INTITULE').val(data.INTITULE);
|
||||
$('#no_ligne').val(data.no_ligne);
|
||||
$('#qte').val(data.qte);
|
||||
$('#dup_activity').removeClass('hidden');
|
||||
$('#dup_activity').attr('name',JSON.stringify(data));
|
||||
$('.modal-title').text('Modification activité');
|
||||
$("#dh_debut").attr("readonly", false);
|
||||
$("#addActivite").modal("show");
|
||||
},
|
||||
dayClick: function(date, jsEvent, view) {
|
||||
$('#dh_debut').val(moment(date).format('DD-MM-YYYY HH:mm'));
|
||||
$('#ACTIVITE').val('');
|
||||
$('#INTITULE').val('');
|
||||
$('#AJAX').val('');
|
||||
$('#qte').val('1');
|
||||
$('#no_ligne').val('');
|
||||
$('.modal-title').text('Nouveau activité')
|
||||
$('#dup_activity').removeClass('hidden');
|
||||
$('#dup_activity').attr('name',"");
|
||||
$("#dh_debut").attr("readonly", true);
|
||||
$("#addActivite").modal("show");
|
||||
}
|
||||
});
|
||||
$('#dh_debut').datetimepicker({
|
||||
format:'DD-MM-YYYY HH:mm',
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
|
||||
159
aem_gestion/templates/parametres/semaine_types.pt
Normal file
159
aem_gestion/templates/parametres/semaine_types.pt
Normal file
@@ -0,0 +1,159 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<style>
|
||||
.redClass{
|
||||
background-color : #E6E6E6;
|
||||
color : #9C9C9C !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>
|
||||
<a href="${request.application_url}/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="#" onclick="createSemaineType(this)" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau</a>
|
||||
</p>
|
||||
<div class="row" style="margin:20px;">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-1" for="planning">Planning</label>
|
||||
<div class="col-md-4">
|
||||
<select class="form-control" id="planning" >
|
||||
<div tal:repeat="item planning">
|
||||
<option value="${item}" tal:attributes="selected planning_default==item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="semaine_types_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Libellé</th>
|
||||
<th>Code</th>
|
||||
<th>Planning</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<!-- Modal : Creacreationte semaine type -->
|
||||
<div class="modal fade" id="createSemaineType" role="dialog" aria-labelledby="createSemaineType" 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">Ajouter une semaine-type</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="add_semainetype-form" class="form-horizontal" action="${request.application_url}/semaine_types" 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-3" for=" type_planning">Type planning</label>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control" id="type_planning" name="type_planning" >
|
||||
<div tal:repeat="item planning">
|
||||
<option value="${item}" tal:attributes="selected planning_default==item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="CODE_SEM" name="CODE_SEM"/>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="LIBELLE">Libelle</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="LIBELLE" name="LIBELLE" value=""
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le libelle est obligatoire"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-7">
|
||||
<button type="submit" class="btn btn-success" id="btnmodal" name="form.submitted">Ajouter</button>
|
||||
<a href="#" id="view_semaine_type" class="hidden btn btn-primary" >Voir</a>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function(settings, data, dataIndex ) {
|
||||
var planning = $('#planning').val();
|
||||
if(data[2] === planning){
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
function updateSemaineType(e,data){
|
||||
var semdata = data.split(',')
|
||||
$('#LIBELLE').val(semdata[0]);
|
||||
$('#CODE_SEM').val(semdata[1]);
|
||||
$('#type_planning option[value="'+semdata[2]+'"]').prop("selected", true);
|
||||
$('#btnmodal').text('Modifier');
|
||||
$('#view_semaine_type').removeClass('hidden').attr('href','${request.application_url}/semaine_type_view/'+semdata[1])
|
||||
$('#createSemaineType').modal();
|
||||
}
|
||||
|
||||
function createSemaineType(e){
|
||||
$('#LIBELLE').val('');
|
||||
$('#CODE_SEM').val('');
|
||||
$('#type_planning option[value="${planning_default}"]').prop("selected", true);
|
||||
$('#btnmodal').text('Ajouter');
|
||||
$('#view_semaine_type').addClass('hidden').attr('href','#');
|
||||
$('#createSemaineType').modal();
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#add_semainetype-form').formValidation()
|
||||
var table = $('#semaine_types_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 15,
|
||||
bLengthChange: false,
|
||||
bInfo: true,
|
||||
sDom: 'frtlip',
|
||||
order: [[ 0, 'asc' ]],
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
|
||||
{ targets: 0,
|
||||
render: function (data, type, full, meta) {
|
||||
return '<a href="#" onclick="updateSemaineType(this,\''+full+'\')" >'+data+'</a>';
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
});
|
||||
$('#planning').change(function(){
|
||||
table.draw();
|
||||
});
|
||||
|
||||
/*$('#semaine_types_list tbody').on('click','tr',function(){
|
||||
var data = table.row(this).data();
|
||||
updateSemaineType(this,data)
|
||||
})*/
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
56
aem_gestion/templates/parametres/stats_exam1.pt
Normal file
56
aem_gestion/templates/parametres/stats_exam1.pt
Normal file
@@ -0,0 +1,56 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<form id="exams_agence-form" action="${url}" method="POST">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-1">Agence</label>
|
||||
<div class="col-xs-11">
|
||||
<button class="btn btn-default" type="submit" name="form.ag1">VALMY</button>
|
||||
<button class="btn btn-default" type="submit" name="form.ag2">SAXE</button>
|
||||
<button class="btn btn-default" type="submit" name="form.ag3">CROIX ROUSSE</button>
|
||||
<button class="btn btn-default" type="submit" name="form.ag4">MONPLAISIR</button>
|
||||
<button class="btn btn-default" type="submit" name="form.ag5">CHARPENNES</button>
|
||||
<button class="btn btn-default" type="submit" name="form.ag6">VAUGNERAY</button>
|
||||
<button class="btn btn-default" type="submit" name="form.ag7">GENTIL</button>
|
||||
<button class="btn btn-default" type="submit" name="form.ag8">VITTON</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- graphique colonne année N -->
|
||||
<div id="barChart_annee" style="width: 100%; height: 500px;"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
||||
<script type="text/javascript">
|
||||
google.charts.load("current", {packages:["corechart", 'bar']});
|
||||
google.charts.setOnLoadCallback(drawChart);
|
||||
var dataSet_annee = ${barChart_annee};
|
||||
|
||||
function drawChart() {
|
||||
var data_annee = google.visualization.arrayToDataTable(dataSet_annee);
|
||||
console.log(data_annee);
|
||||
var options_annee = {
|
||||
title: '${title}',
|
||||
seriesType: 'bars',
|
||||
series: {1: {type: 'line'}},
|
||||
vAxis: {
|
||||
viewWindow: {
|
||||
min:0
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var chart_annee = new google.visualization.ComboChart(document.getElementById('barChart_annee'));
|
||||
chart_annee.draw(data_annee, options_annee);
|
||||
}
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
53
aem_gestion/templates/parametres/stats_exam2.pt
Normal file
53
aem_gestion/templates/parametres/stats_exam2.pt
Normal file
@@ -0,0 +1,53 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2">Moniteur</label>
|
||||
<div class="col-md-10">
|
||||
<select class="form-control" id="cd_mon" name="cd_mon" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="item moniteurs">
|
||||
<option value="${item.group2}" tal:attributes="selected cd_mon==item.group2 and 'selected' or None">${item.group2_lib} - ${item.group2}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- graphique colonne année N -->
|
||||
<div id="barChart_annee" style="width: 100%; height: 500px;"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
||||
<script type="text/javascript">
|
||||
google.charts.load("current", {packages:["corechart", 'bar']});
|
||||
google.charts.setOnLoadCallback(drawChart);
|
||||
var dataSet_annee = ${barChart_annee};
|
||||
|
||||
function drawChart() {
|
||||
var data_annee = google.visualization.arrayToDataTable(dataSet_annee);
|
||||
|
||||
var options_annee = {
|
||||
title: '${title}',
|
||||
seriesType: 'bars',
|
||||
series: {1: {type: 'line'}},
|
||||
vAxis: {
|
||||
viewWindow: {
|
||||
min:0
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var chart_annee = new google.visualization.ComboChart(document.getElementById('barChart_annee'));
|
||||
chart_annee.draw(data_annee, options_annee);
|
||||
}
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
47
aem_gestion/templates/parametres/stats_pay.pt
Normal file
47
aem_gestion/templates/parametres/stats_pay.pt
Normal file
@@ -0,0 +1,47 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<h2>Répartition des modes de règlement</h2>
|
||||
<div class="col-md-6">
|
||||
<!-- graphique donut année N-1 -->
|
||||
<div id="donutchart_annee_1" style="width: 100%; height: 500px;"></div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<!-- graphique donut année N -->
|
||||
<div id="donutchart_annee" style="width: 100%; height: 500px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
||||
<script type="text/javascript">
|
||||
google.charts.load("current", {packages:["corechart", 'bar']});
|
||||
google.charts.setOnLoadCallback(drawChart);
|
||||
var dataSet_annee_1 = ${donut_annee_1};
|
||||
var dataSet_annee = ${donut_annee};
|
||||
|
||||
function drawChart() {
|
||||
var data_annee_1 = google.visualization.arrayToDataTable(dataSet_annee_1);
|
||||
var data_annee = google.visualization.arrayToDataTable(dataSet_annee);
|
||||
|
||||
var options_annee_1 = {
|
||||
title: '${title_1}',
|
||||
pieHole: 0.4,
|
||||
};
|
||||
var options_annee = {
|
||||
title: '${title}',
|
||||
pieHole: 0.4,
|
||||
};
|
||||
|
||||
var chart_annee_1 = new google.visualization.PieChart(document.getElementById('donutchart_annee_1'));
|
||||
chart_annee_1.draw(data_annee_1, options_annee_1);
|
||||
var chart_annee = new google.visualization.PieChart(document.getElementById('donutchart_annee'));
|
||||
chart_annee.draw(data_annee, options_annee);
|
||||
}
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
220
aem_gestion/templates/parametres/tarif_edit.pt
Normal file
220
aem_gestion/templates/parametres/tarif_edit.pt
Normal file
@@ -0,0 +1,220 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
<br />
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#tarif"><h4>TARIF</h4></a></li>
|
||||
<li><a data-toggle="tab" href="#rappel"><h4>EMAIL DE RAPPEL</h4></a></li>
|
||||
<li><a data-toggle="tab" href="#confirmation"><h4>EMAIL DE CONFIRMATION</h4></a></li>
|
||||
</ul>
|
||||
|
||||
<form id="user_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="tab-content">
|
||||
<!-- FICHE TARIF -->
|
||||
<div id="tarif" class="tab-pane fade in active">
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="REF">Référence</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="REF" name="REF" value="${item.REF}"
|
||||
placeholder="10 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La référence est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-stringlength-message="10 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIB">Libellé</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIB" name="LIB" value="${item.LIB}"
|
||||
placeholder="30 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le libellé 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="col-xs-2 control-label">Prix TTC</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="PUTTC" name="PUTTC" value="${item.PUTTC}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Code TVA</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="CTVA" name="CTVA">
|
||||
<div tal:repeat="tva tvas">
|
||||
<option value="${tva.CODE}" tal:attributes="selected item.CTVA==tva.CODE and 'selected' or None">${tva.CODE} | ${tva.TAUX} %</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="agence">Compte</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="COMPTE" name="COMPTE">
|
||||
<div tal:repeat="cpt comptes">
|
||||
<option value="${cpt.CODE}" tal:attributes="selected cpt.CODE==item.COMPTE and 'selected' or None">${cpt.CODE} | ${cpt.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2">Famille</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="FAM" name="FAM">
|
||||
<tal:block tal:repeat="famille familles">
|
||||
<option value="${famille}" tal:attributes="selected famille[0]==item.FAM and 'selected' or None">${famille}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2">Type examen</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="type_examen" name="type_examen">
|
||||
<tal:block tal:repeat="type_exa types_exa">
|
||||
<option value="${type_exa}" tal:attributes="selected type_exa==item.type_examen and 'selected' or None">${type_exa}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Délai de réservation</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Jour</span>
|
||||
<input class="form-control" type="text" id="delai_reservation" name="delai_reservation" value="${item.delai_reservation}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">0 = pas de résa.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Délai de rappel</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Jour</span>
|
||||
<input class="form-control" type="text" id="delai_rappel" name="delai_rappel" value="${item.delai_rappel}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre est invalide" />
|
||||
<span class="input-group-addon">0 = pas de rappel</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-7 checkbox">
|
||||
<label><input type="checkbox" name="obsolete" value="item.obsolete" id="obsolete"
|
||||
tal:attributes="checked item.obsolete != 0 and 'checked' or None">Le tarif est obsolète
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Dernière modif.</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static" tal:condition="item.REF != '0'">${item.modif_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div> <!-- onglet TARIF -->
|
||||
|
||||
<!-- EMAIL DE RAPPEL -->
|
||||
<div id="rappel" class="tab-pane fade">
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-7">
|
||||
<label class="control-label">Message de rappel en <a href="https://cours-web.ch/divers/markdown/">Markdown</a></label>
|
||||
<br /><br />
|
||||
<textarea class="form-control monospace-font" rows="20" cols="40" id="rappel_md" name="rappel_md">${item.rappel_md}</textarea>
|
||||
<p>
|
||||
Les mots-variables :<br>
|
||||
<b>!civNomPrenom!</b> : Civilité-Nom-Prénom de l'élève<br>
|
||||
<b>!codeClient!</b> : Code élève<br>
|
||||
<b>!dateRDV!</b> : Date et heure du rendez-vous<br>
|
||||
<b>!statutRDV!</b> : Information spécifique au RDV<br>
|
||||
<b>!lieuRDV!</b> :Lieu du rendez-vous
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<label class="control-label">Traduction en HTML</label>
|
||||
<br /><hr>
|
||||
<div tal:replace="structure item.rappel_html">
|
||||
Page text goes here.
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- EMAIL DE CONFIRMATION -->
|
||||
<div id="confirmation" class="tab-pane fade">
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-7">
|
||||
<label class="control-label">Message de confirmation en <a href="https://cours-web.ch/divers/markdown/">Markdown</a></label>
|
||||
<br /><br />
|
||||
<textarea class="form-control monospace-font" rows="20" cols="40" id="confirmation_md" name="confirmation_md">${item.confirmation_md}</textarea>
|
||||
<p>
|
||||
Les mots-variables :<br>
|
||||
<b>!civNomPrenom!</b> : Civilité-Nom-Prénom de l'élève<br>
|
||||
<b>!codeClient!</b> : Code élève<br>
|
||||
<b>!dateRDV!</b> : Date et heure du rendez-vous<br>
|
||||
<b>!lieu1RDV!</b> :Lieu 1 du rendez-vous / Nom du moniteur<br>
|
||||
<b>!lieu2RDV!</b> :Lieu 2 du rendez-vous / Durée leçon
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<label class="control-label">Traduction en HTML</label>
|
||||
<br /><hr>
|
||||
<div tal:replace="structure confirmation_html">
|
||||
Page text goes here.
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- tab-content -->
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/tarifs">
|
||||
<span class="glyphicon glyphicon-chevron-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="item.REF != '0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#user_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
70
aem_gestion/templates/parametres/tarifs.pt
Normal file
70
aem_gestion/templates/parametres/tarifs.pt
Normal file
@@ -0,0 +1,70 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-1">Famille : </label>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" id="famille" name="famille" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="item familles">
|
||||
<option value="${item}" tal:attributes="selected famille==item and 'selected' or None">${item}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<p>
|
||||
<a href="${request.application_url}/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="${request.application_url}/tarif_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau tarif</a>
|
||||
</p>
|
||||
|
||||
<table id="tarifs_list" class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Référence</th>
|
||||
<th>Libellé</th>
|
||||
<th class="text-right">PUTTC</th>
|
||||
<th>Rappel</th>
|
||||
<th>Examen</th>
|
||||
<th>Etat</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm');
|
||||
$('#tarifs_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
searching: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: "text-center", "targets": [3,4] },
|
||||
{ className: "text-right", "targets": [2] },
|
||||
{ targets: 0,
|
||||
render: function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/tarif_edit/' + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
38
aem_gestion/templates/parametres/types_devis.pt
Normal file
38
aem_gestion/templates/parametres/types_devis.pt
Normal file
@@ -0,0 +1,38 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
<p>
|
||||
<a href="types_devis_frm/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
Créér un nouveau type</a>
|
||||
</p>
|
||||
<table class="table table-condensed table-striped table-bordered">
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Intitulé</th>
|
||||
<th class="text-right">Montant TTC</th>
|
||||
<th class="text-right">Montant HT</th>
|
||||
<th class="text-right">Nb heures</th>
|
||||
<th class="text-center">Dispo</th>
|
||||
</tr>
|
||||
|
||||
<tr tal:repeat="ligne types">
|
||||
<td><a href="types_devis_frm/${ligne.type_devis}">${ligne.type_devis}</a></td>
|
||||
<td>${ligne.libelle}</td>
|
||||
<td class="text-right">${layout.to_euro(ligne.montantTTC)}</td>
|
||||
<td class="text-right">${layout.to_euro(ligne.montantHT)}</td>
|
||||
<td class="text-right">${ligne.nb_heures}</td>
|
||||
<td class="text-center" tal:condition="ligne.dispo">Dispo</td>
|
||||
<td class="text-center" tal:condition="ligne.dispo==0">X</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
</metal:block>
|
||||
|
||||
98
aem_gestion/templates/parametres/types_devis_frm.pt
Normal file
98
aem_gestion/templates/parametres/types_devis_frm.pt
Normal file
@@ -0,0 +1,98 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form id="types_devis_frm-form" action="${url}" method="post" class="form-horizontal">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="type_devis">Type de devis</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="type_devis" name="type_devis" value="${types.type_devis}"
|
||||
placeholder="10 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le type de devis est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-stringlength-message="10 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="libelle">Intitulé</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="libelle" name="libelle" value="${types.libelle}"
|
||||
placeholder="40 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="L'intitule est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="40"
|
||||
data-fv-stringlength-message="40 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="montantTTC">Montant TTC</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="montantTTC" name="montantTTC" value="${types.montantTTC}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="montantHT">Montant HT</label>
|
||||
<div class="col-xs-8">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="montantHT" name="montantHT" value="${types.montantHT}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4" for="nb_heures">Nombre d'heures</label>
|
||||
<div class="col-xs-8">
|
||||
<input class="form-control" type="text" id="nb_heures" name="nb_heures" value="${types.nb_heures}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le nombre d'heures est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-4 col-xs-8 checkbox">
|
||||
<label><input type="checkbox" name="dispo" value="types.dispo" id="dispo"
|
||||
tal:attributes="checked types.dispo != 0 and 'checked' or None">La fiche est dispo
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-4 col-sm-8">
|
||||
<a href="${request.application_url}/types_devis" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-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="type_devis != '0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#types_devis_frm-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
148
aem_gestion/templates/parametres/user_edit.pt
Normal file
148
aem_gestion/templates/parametres/user_edit.pt
Normal file
@@ -0,0 +1,148 @@
|
||||
<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="user_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="individu"
|
||||
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" for="cd_uti">Identifiant</label>
|
||||
<div class="col-xs-2">
|
||||
<input class="form-control" type="text" id="cd_uti" name="cd_uti" value="${individu.cd_uti}"
|
||||
placeholder="10 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="L'identifiant est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="3"
|
||||
data-fv-stringlength-message="3 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="intitule">Prénom Nom</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="intitule" name="nom" value="${individu.nom}"
|
||||
placeholder="30 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le nom est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="25"
|
||||
data-fv-stringlength-message="25 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Email</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" name="email"
|
||||
value="${individu.email}" placeholder="55 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="L'adresse email est obligatoire"
|
||||
data-fv-emailaddress="true"
|
||||
data-fv-emailaddress-message="L'adresse email n'est pas valide" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="tel">Téléphone</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="tel" name="tel" value="${individu.tel}"
|
||||
placeholder="25 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="25"
|
||||
data-fv-stringlength-message="25 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Accès</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="secu" name="secu">
|
||||
<div tal:repeat="item access">
|
||||
<option value="${item}" tal:attributes="selected str(individu.secu)==item[0] and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2">Code Moniteur</label>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" id="cd_mon" name="cd_mon">
|
||||
<tal:block tal:repeat="item moniteurs">
|
||||
<option value="${item.CD_MON}" tal:attributes="selected individu.cd_mon==item.CD_MON and 'selected' or None">${item.NOM} - ${item.CD_MON}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2">Code Moniteur B78</label>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" id="cd_mon_B78" name="cd_mon_B78">
|
||||
<tal:block tal:repeat="item moniteurs">
|
||||
<option value="${item.CD_MON}" tal:attributes="selected individu.cd_mon_B78==item.CD_MON and 'selected' or None">${item.NOM} - ${item.CD_MON}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="agence">Agence par défaut</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="agence" name="agence">
|
||||
<div tal:repeat="item agences">
|
||||
<option value="${item.CODE}" tal:attributes="selected individu.agence==item.CODE and 'selected' or None">${item.CODE} | ${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-7 checkbox">
|
||||
<label><input type="checkbox" name="mobile" value="individu.mobile" id="mobile"
|
||||
tal:attributes="checked individu.mobile == 1 and 'checked' or None">Utilisateur est mobile
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-7 checkbox">
|
||||
<label><input type="checkbox" name="actif" value="individu.actif" id="actif"
|
||||
tal:attributes="checked individu.actif != 0 and 'checked' or None">La fiche est active
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Dernière modif.</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static" tal:condition="individu.cd_uti != '0'">${individu.modif_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/users">
|
||||
<span class="glyphicon glyphicon-chevron-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="individu.cd_uti != '0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#user_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
67
aem_gestion/templates/parametres/users.pt
Normal file
67
aem_gestion/templates/parametres/users.pt
Normal file
@@ -0,0 +1,67 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<p>
|
||||
<a href="${request.application_url}/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="${request.application_url}/user_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau utilisateur</a>
|
||||
</p>
|
||||
|
||||
<table id="users_list" class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Login</th>
|
||||
<th>Prénom Nom</th>
|
||||
<th></th>
|
||||
<th>Email</th>
|
||||
<th>Moniteur</th>
|
||||
<th>Rôle</th>
|
||||
<th>Dern cnx</th>
|
||||
<th>Etat</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm');
|
||||
$('#users_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ targets: 0,
|
||||
render: function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/user_edit/' + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
{ targets: 2,
|
||||
render: function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
if (type === 'display' && data != '')
|
||||
{ data = '<a href="tel:' + data + '"> <span class="glyphicon glyphicon-earphone"></span>' + '</a>'; }
|
||||
else
|
||||
{ date = ''; }
|
||||
return data;
|
||||
},
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
40
aem_gestion/templates/parametres/users_ua.pt
Normal file
40
aem_gestion/templates/parametres/users_ua.pt
Normal file
@@ -0,0 +1,40 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<table id="users_list_ua" class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Dernière cnx</th>
|
||||
<th>Login</th>
|
||||
<th>Prénom Nom</th>
|
||||
<th>Rôle</th>
|
||||
<th>Appareil utilisé</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm');
|
||||
$('#users_list_ua').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
"order": [[ 0, "desc" ]]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
103
aem_gestion/templates/planning/activ_edit.pt
Normal file
103
aem_gestion/templates/planning/activ_edit.pt
Normal file
@@ -0,0 +1,103 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-warning" tal:condition="message" tal:content="message" />
|
||||
|
||||
<form id="rdvb_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="rdvb"
|
||||
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">
|
||||
<div class="col-xs-offset-3 col-xs-8">
|
||||
<p class="text-danger">
|
||||
<b>${rdvb.CD_CLI} - ${rdvb.NOM}</b>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Nb d'heures</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control static" name="QTE">
|
||||
<tal:block tal:repeat="i [x for x in range(1,12)]">
|
||||
<option tal:attributes="selected i==rdvb.QTE and 'selected' or None">${i}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Intitulé</label>
|
||||
<div class="col-xs-9">
|
||||
<p class="form-control-static">${rdvb.INTITULE}</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-3">Lieu du rdv</label>
|
||||
<div class="col-xs-9">
|
||||
<p class="form-control-static">${rdvb.LIEU_RDV}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Commentaire</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" name="COMMENT"
|
||||
value="${rdvb.COMMENT}"
|
||||
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">Dern. modif le</label>
|
||||
<div class="col-xs-9">
|
||||
<p class="form-control-static">${rdvb.modif_le.strftime('%d-%m-%Y %H:%M')} par ${rdvb.CD_UTI}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-3 col-xs-8">
|
||||
<a href="${back}" 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>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#rdvb_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
275
aem_gestion/templates/planning/circuit_list.pt
Normal file
275
aem_gestion/templates/planning/circuit_list.pt
Normal file
@@ -0,0 +1,275 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-success" tal:condition="message" tal:content="message" />
|
||||
|
||||
<form id="frm-motos_list" action="${url}" method="POST" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5">
|
||||
<a href="${url_retour}" 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" tal:condition="len(button_title)">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span> ${button_title}</button>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control" id="cd_mon" name="cd_mon">
|
||||
<div tal:repeat="item moniteurs">
|
||||
<option value="${item.CD_MON}" tal:attributes="selected cd_mon == item.CD_MON and 'selected' or None">${item.NOM} - ${item.CD_MON}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<button class="btn btn-primary" type="submit" name="form.circuit">
|
||||
<span class="glyphicon glyphicon-pencil"></span> Mon. CIRCUIT</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
(Veuillez cocher un ou plusieurs élèves pour mettre à jour leur moniteur ou effectuer un suivi)
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<table id="motos_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Gr</th>
|
||||
<th>Nv</th>
|
||||
<th>Circ</th>
|
||||
<th>Nom, Prénom</th>
|
||||
<th>Solde</th>
|
||||
<th>ETG</th>
|
||||
<th>Fil.</th>
|
||||
<th>Comment.</th>
|
||||
<th>HCB</th>
|
||||
<th>St</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<br />
|
||||
<form id="frm-stageb_list" action="${url}" method="POST" class="form-horizontal">
|
||||
<div class="form-group" style="margin-left:10px;">
|
||||
<a class="btn btn-success" tal:condition="stage.VALIDE != 'O'" href="/motos_edit/${type}/${date}/${grp}/0"><span class="glyphicon glyphicon-user"></span> Ajouter éléve</a>
|
||||
<button class="btn btn-primary" type="button" tal:condition="code == 9 and stage.VALIDE != 'O' " data-toggle="modal" data-target="#editPlanning" name="form.seance"><span class="glyphicon glyphicon-pencil"></span> Modifier planning</button>
|
||||
<button class="btn btn-primary" type="button" tal:condition="code == 9 and stage.VALIDE != 'O' " data-toggle="modal" data-target="#validatePlanning"><span class="glyphicon glyphicon-check"></span> Valider planning</button>
|
||||
</div>
|
||||
</form>
|
||||
<!--edit stage -->
|
||||
<div class="modal fade" id="editPlanning" role="dialog" aria-labelledby="confirmCreateLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content ">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Planning ${type} du ${date}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="edit-planning-moto" class="form-horizontal" action="" 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-3">Groupe</label>
|
||||
<div class="col-sm-8 col-md-7">
|
||||
<select class="form-control" name="GROUPE" id="select-group" disabled>
|
||||
<tal:block tal:repeat="key [x for x in groupe.keys()]">
|
||||
<option tal:attributes="selected key==stage.GROUPE and 'selected' or None" value="${key}" >${groupe[key]}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-sm-3 control-label">Libellé </label>
|
||||
<div class="col-sm-8 col-md-7">
|
||||
<input type="text" class="form-control"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le libellé est obligatoire"
|
||||
id="LIBELLE" name="LIBELLE" value="${stage.LIBELLE}" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-md-3 col-sm-3 control-label" style="margin-top:8px">Total places Plateau : </label>
|
||||
<div class="col-sm-8 col-md-2" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="TOTAL" value="${stage.TOTAL}" name="TOTAL" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
<label class="col-sm-3 col-md-2 control-label" style="margin-top:8px" >Total plateau inscrits</label>
|
||||
<div class="col-sm-8 col-md-3" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="DISPO" value="${stage.TOTAL-stage.DISPO}" name="DISPO" disabled/>
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-md-3 col-sm-3 control-label" style="margin-top:8px">Total places Route : </label>
|
||||
<div class="col-sm-8 col-md-2" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="ROUTE" value="${stage.ROUTE}" name="ROUTE" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
<label class="col-sm-3 col-md-2 control-label" style="margin-top:8px" >Total Route inscrits</label>
|
||||
<div class="col-sm-8 col-md-3" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="ROUTE_DISPO" value="${stage.ROUTE-stage.ROUTE_DISPO}" name="ROUTE_DISPO" disabled/>
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-8 col-xs-offset-3">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" style="margin-top:8px">Annuler</button>
|
||||
<button type="button" id="deleteRdv" tal:condition="code == 9" class="btn btn-danger" data-dismiss="modal" data-toggle="modal" data-target="#deletePlanning" style="margin-top:8px">Supprimer</button>
|
||||
<button type="submit" id="submitRdv" class="btn btn-primary" name="form.updated" style="margin-top:8px">Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- validate -->
|
||||
<div class="modal fade" tal:condition="code == 9" id="validatePlanning" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form action="" method="post" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Validation</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Après la validation, aucune modification ne sera possible.
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.validated" >Confirmer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modal -->
|
||||
<div class="modal fade" id="deletePlanning" tal:condition="code == 9" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form action="" method="post" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Suppression</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Confirmez-vous la supression de ce planning ?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted" >Confirmer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div><!-- content -->
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<script src="//gyrocode.github.io/jquery-datatables-checkboxes/1.2.11/js/dataTables.checkboxes.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD/MM/YYYY');
|
||||
var table = $('#motos_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: "text-center", "targets": [0,1,2,6,10] },
|
||||
{ className: "text-right", "targets": [5] },
|
||||
{ 'targets': 0,
|
||||
'checkboxes': {
|
||||
'selectRow': true
|
||||
}
|
||||
},
|
||||
{ targets: 4,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers la fiche élève
|
||||
return '<a href="/fiche_eleve/' + data.substr(0, 6) + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
{ targets: 11,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/motos_edit/${type}/${date}/${grp}/' + full[0] +
|
||||
'" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-pencil"></span>' + '</a>';
|
||||
},
|
||||
},
|
||||
],
|
||||
select: {
|
||||
'style': 'multi'
|
||||
},
|
||||
order: [[1, 'asc']],
|
||||
createdRow: function( row, data, dataIndex ) {
|
||||
if ( data[5].slice(-1) == "E" ) {
|
||||
$('td', row).eq(5).css('background-color', 'Orange');
|
||||
}
|
||||
if ( data[9] == "VAL" ) {
|
||||
$('td', row).eq(9).css('background-color', 'LightGreen');
|
||||
}
|
||||
if ( data[10] > "1" ) {
|
||||
$('td', row).eq(10).css('background-color', 'Crimson').css('color', 'white');
|
||||
}
|
||||
},
|
||||
});
|
||||
// Handle form submission event
|
||||
$('#frm-motos_list').on('submit', function(e){
|
||||
var form = this;
|
||||
var rows_selected = table.column(0).checkboxes.selected();
|
||||
|
||||
// Iterate over all selected checkboxes
|
||||
$.each(rows_selected, function(index, rowId){
|
||||
// Create a hidden element
|
||||
$(form).append(
|
||||
$('<input>')
|
||||
.attr('type', 'hidden')
|
||||
.attr('name', 'id' + index)
|
||||
.val(rowId)
|
||||
);
|
||||
});
|
||||
});
|
||||
$('#edit-planning-moto').formValidation({
|
||||
fields: {
|
||||
TOTAL: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Total devrait superieur ou egalé à ce qui est inscrit',
|
||||
callback: function(input) {
|
||||
var dispo = parseInt(${stage.DISPO})
|
||||
return dispo <= parseInt(input)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ROUTE: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Total route devrait superieur ou egalé à ce qui est inscrit',
|
||||
callback: function(input) {
|
||||
var dispo = parseInt(${stage.ROUTE_DISPO})
|
||||
return dispo <= parseInt(input)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
|
||||
353
aem_gestion/templates/planning/monplanning.pt
Normal file
353
aem_gestion/templates/planning/monplanning.pt
Normal file
@@ -0,0 +1,353 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div class="container">
|
||||
|
||||
<div class="alert alert-warning" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form method="POST" id="frm" action="${url}" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">Moniteur</label>
|
||||
<div class="col-sm-3">
|
||||
<select class="form-control" id="cd_mon" name="cd_mon" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="moniteurC moniteurs">
|
||||
<tal:block tal:repeat="item moniteurC">
|
||||
<option value="${item.CD_MON}" tal:attributes="selected cd_mon==item.CD_MON and 'selected' or None">${item.NOM} - ${item.CD_MON}</option>
|
||||
</tal:block>
|
||||
<option tal:condition="moniteurC" disabled>--------------------------------</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<a href="${request.application_url}/planifier/${cd_mon}/6mois" tal:condition="layout.isAdmin()"
|
||||
class="btn btn-success" role="button" >
|
||||
<span class="glyphicon glyphicon-calendar"></span> Planifier activités de ${cd_mon}</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<br />
|
||||
<div tal:condition="not isSeulB78">
|
||||
<div id="calendar"></div>
|
||||
<br />
|
||||
<p>
|
||||
<span class="label" style="background-color:LightGreen; color:black;">Validée</span>
|
||||
<span class="label" style="background-color:LightBlue; color:black;">Activitée</span>
|
||||
<span class="label" style="background-color:LightPink; color:black;">Réservation</span>
|
||||
<span class="label" style="background-color:LightYellow; color:black;">Heure Conduite B</span>
|
||||
<span class="label" style="background-color:Gold; color:black;">Examen blanc</span>
|
||||
<span class="label" style="background-color:GoldenRod; color:black;">Avant permis</span>
|
||||
<span class="label" style="background-color:Plum; color:black;">RDV préalable</span>
|
||||
<span class="label" style="background-color:YellowGreen; color:black;">RDV pédag 1</span>
|
||||
<span class="label" style="background-color:LimeGreen; color:black;">RDV pédag 2</span>
|
||||
<span class="label" style="background-color:DeepSkyBlue; color:black;">1ères heures</span>
|
||||
<span class="label" style="background-color:DeepPink; color:black;">Absent Retard</span>
|
||||
</p>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<div tal:condition="cd_mon_B78">
|
||||
<h1 tal:condition="not isSeulB78">Planning B78 de ${cd_mon_B78} (agence ${agence}) </h1>
|
||||
<br />
|
||||
<div id="calendarb78"></div>
|
||||
<br />
|
||||
<p>
|
||||
<span class="label" style="background-color:LightGreen; color:black;">Validée</span>
|
||||
<span class="label" style="background-color:LightBlue; color:black;">Activitée</span>
|
||||
<span class="label" style="background-color:LightPink; color:black;">Réservation</span>
|
||||
<span class="label" style="background-color:LightYellow; color:black;">Heure Conduite B78</span>
|
||||
<span class="label" style="background-color:Gold; color:black;">Examen blanc</span>
|
||||
<span class="label" style="background-color:GoldenRod; color:black;">Avant permis</span>
|
||||
<span class="label" style="background-color:Plum; color:black;">RDV préalable</span>
|
||||
<span class="label" style="background-color:YellowGreen; color:black;">RDV pédag 1</span>
|
||||
<span class="label" style="background-color:LimeGreen; color:black;">RDV pédag 2</span>
|
||||
<span class="label" style="background-color:DeepSkyBlue; color:black;">1ères heures</span>
|
||||
<span class="label" style="background-color:DeepPink; color:black;">Absent Retard</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Modal : Confirmation CREATION -->
|
||||
<div class="modal fade" id="confirmCreate" role="dialog" aria-labelledby="confirmCreateLabel" 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">Créer un rendez-vous</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 pour : <br />
|
||||
</p>
|
||||
<div class="col-xs-offset-3 col-xs-9">
|
||||
<p><b>le <span id=dateheureRDV>date</span> h</b></p>
|
||||
<p>pour un élève ou une activité</p>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-xs-3 control-label">Nom ou Code</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="3 caractères minimum" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="dateRDV" id=dateRDV value="date">
|
||||
<input type="hidden" name="heureRDV" id=heureRDV value="heure">
|
||||
<input type="hidden" name="cd_mon" id="cd_mon" value="${cd_mon}" >
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Nb d'heures</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control static" name="QTE">
|
||||
<tal:block tal:repeat="i [x for x in range(1,12)]">
|
||||
<option tal:attributes="selected str(i)==QTE and 'selected' or None">${i}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="submit" id="submitRdv" 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>
|
||||
|
||||
<!-- Modal : Confirmation CREATION -->
|
||||
<div class="modal fade" id="confirmCreateB78" role="dialog" aria-labelledby="confirmCreateB78Label" 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">Créer un rendez-vous</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="create_rdv-form78" 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 pour : <br />
|
||||
</p>
|
||||
<div class="col-xs-offset-3 col-xs-9">
|
||||
<p><b>le <span id=dateheureRDVB78>date</span> h</b></p>
|
||||
<p>pour un élève ou une activité</p>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-xs-3 control-label">Nom ou Code</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="name78" name="name" placeholder="3 caractères minimum" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="dateRDV" id="dateRDVB78" value="date">
|
||||
<input type="hidden" name="heureRDV" id="heureRDVB78" value="heure">
|
||||
<input type="hidden" name="cd_mon_B78" id="cd_mon_B78" value="${cd_mon_B78}" >
|
||||
<input type="hidden" name="cd_mon" id="cd_mon" value="${cd_mon}" >
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Nb d'heures</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control static" name="QTE">
|
||||
<tal:block tal:repeat="i [x for x in range(1,12)]">
|
||||
<option tal:attributes="selected str(i)==QTE and 'selected' or None">${i}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="submit" id="submitRdv78" 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>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
</div><!-- content -->
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<!-- Bootstrap Fullcalendar plugin -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar-scheduler/1.9.4/scheduler.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/locale/fr.js"></script>
|
||||
<!-- autocomplete plugin -->
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var datePlan = '${datePlan}';
|
||||
|
||||
$('#calendar').fullCalendar({
|
||||
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
|
||||
locale: 'fr',
|
||||
header: {
|
||||
left: 'agendaWeek month listWeek',
|
||||
center: 'prev title next',
|
||||
right: 'today'
|
||||
},
|
||||
allDaySlot: true,
|
||||
allDayHtml: "Annulés",
|
||||
defaultView: 'agendaWeek',
|
||||
defaultDate: moment(datePlan),
|
||||
slotDuration: '00:60:00',
|
||||
hiddenDays: [0], // hide sunday
|
||||
height: 'auto',
|
||||
minTime: "07:00:00",
|
||||
maxTime: "21:00:00",
|
||||
displayEventTime: true,
|
||||
events:${calendar_events},
|
||||
eventRender: function(event, element){
|
||||
element.find('.fc-title').append("<br/>" + event.description);
|
||||
},
|
||||
dayClick: function(date, jsEvent, view) {
|
||||
// alert('Bientôt, la possibilité de créer un rdv pour le ' + date.format());
|
||||
$('#dateheureRDV').html(moment(date).format('dddd DD MMMM à HH'));
|
||||
$('#dateRDV').attr('value', moment(date).format('YYYY-MM-DD'));
|
||||
$('#heureRDV').attr('value', moment(date).format('HH'));
|
||||
$("#confirmCreate").modal("show");
|
||||
}
|
||||
});
|
||||
|
||||
$('#calendarb78').fullCalendar({
|
||||
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
|
||||
locale: 'fr',
|
||||
header: {
|
||||
left: 'agendaWeek month listWeek',
|
||||
center: 'prev title next',
|
||||
right: 'today'
|
||||
},
|
||||
allDaySlot: true,
|
||||
allDayHtml: "Annulés",
|
||||
defaultView: 'agendaWeek',
|
||||
defaultDate: moment(datePlan),
|
||||
slotDuration: '00:60:00',
|
||||
hiddenDays: [0], // hide sunday
|
||||
height: 'auto',
|
||||
minTime: "07:00:00",
|
||||
maxTime: "21:00:00",
|
||||
displayEventTime: true,
|
||||
events:${calendar_events_b78},
|
||||
eventRender: function(event, element){
|
||||
element.find('.fc-title').append("<br/>" + event.description);
|
||||
},
|
||||
dayClick: function(date, jsEvent, view) {
|
||||
// alert('Bientôt, la possibilité de créer un rdv pour le ' + date.format());
|
||||
$('#dateheureRDVB78').html(moment(date).format('dddd DD MMMM à HH'));
|
||||
$('#dateRDVB78').attr('value', moment(date).format('YYYY-MM-DD'));
|
||||
$('#heureRDVB78').attr('value', moment(date).format('HH'));
|
||||
$("#confirmCreateB78").modal("show");
|
||||
}
|
||||
});
|
||||
|
||||
$('#create_rdv-form').formValidation({
|
||||
framework: 'bootstrap',
|
||||
excluded: ':disabled',
|
||||
icon: {
|
||||
valid: 'glyphicon glyphicon-ok',
|
||||
invalid: 'glyphicon glyphicon-remove',
|
||||
validating: 'glyphicon glyphicon-refresh'
|
||||
},
|
||||
});
|
||||
|
||||
$('#name').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_lookup',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: 'E' + request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 3,
|
||||
appendTo: "#confirmCreate"
|
||||
});
|
||||
|
||||
$('#name78').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_lookupb78',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: 'E' + request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 3,
|
||||
appendTo: "#confirmCreateB78"
|
||||
});
|
||||
|
||||
$('#create_rdv-form').submit(function(ev){
|
||||
var actionurl = ev.currentTarget.action;
|
||||
console.log(actionurl)
|
||||
var array_code = $('#name').val().split(' | ');
|
||||
console.log(array_code);
|
||||
if(array_code.length == 2){
|
||||
$('#text-error-message').text('');
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
$('#form-code').addClass('has-feedback has-error');
|
||||
$('#submitRdv').addClass('disabled').attr("disabled", true);
|
||||
$('#text-error-message').text('Code non validé');
|
||||
ev.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('#name').on('change input',function(){
|
||||
$('#text-error-message').text('');
|
||||
$('#form-code').removeClass('has-feedback has-error');
|
||||
$('#submitRdv').removeClass('disabled').prop("disabled", false);;
|
||||
});
|
||||
|
||||
$('#create_rdv-form78').submit(function(ev){
|
||||
var actionurl = ev.currentTarget.action;
|
||||
console.log(actionurl)
|
||||
var array_code = $('#name78').val().split(' | ');
|
||||
console.log(array_code);
|
||||
if(array_code.length == 2){
|
||||
$('#text-error-message').text('');
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
$('#form-code').addClass('has-feedback has-error');
|
||||
$('#submitRdv78').addClass('disabled').attr("disabled", true);
|
||||
$('#text-error-message').text('Code non validé');
|
||||
ev.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('#name78').on('change input',function(){
|
||||
$('#text-error-message').text('');
|
||||
$('#form-code').removeClass('has-feedback has-error');
|
||||
$('#submitRdv78').removeClass('disabled').prop("disabled", false);;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div><!-- scripts -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
141
aem_gestion/templates/planning/motos_edit.pt
Normal file
141
aem_gestion/templates/planning/motos_edit.pt
Normal file
@@ -0,0 +1,141 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-success" tal:condition="message" tal:content="message" />
|
||||
|
||||
<form id="motos_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="rdvb"
|
||||
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-3">Nom</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" name="NOM" id="NOM"
|
||||
value="${eleve.NOM} ${eleve.PRENOM} | ${eleve.CD_CLI}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="50"
|
||||
data-fv-stringlength-message="50 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" tal:condition="not rdvb.CD_CLI == 0">
|
||||
<label class="control-label col-xs-3">Nb d'heures</label>
|
||||
<div class="col-md-1 col-sm-8">
|
||||
<p class="form-control-static">${rdvb.QTE}</p>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-8 ">
|
||||
<input type="checkbox" name="TR_P_OK" value="1" id="tr_p_OK" tal:attributes="checked eleve.TR_P_OK != None and 'checked' or None" disabled> Route</input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" tal:condition="not rdvb.CD_CLI == 0">
|
||||
<label class="control-label col-xs-3">Référence</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${rdvb.REF}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" >
|
||||
<label class="control-label col-xs-3">Lieu</label>
|
||||
<div class="col-sm-6 col-md-6">
|
||||
<select class="form-control static" name="LIEU" >
|
||||
<tal:block tal:repeat="l [x for x in lieux]">
|
||||
<option tal:attributes="selected l.LIEU==rdvb.LIEU and 'selected' or None">${l.LIEU}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Commentaire</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" name="COMMENT"
|
||||
value="${rdvb.COMMENT}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="50"
|
||||
data-fv-stringlength-message="50 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" tal:condition="eleve.TYPE_ENTREPRISE=='E'">
|
||||
<label class="control-label col-xs-3">Entreprise</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${eleve.NOM_ENTREPRISE}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="statut">Statut</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="statut" name="STATUT">
|
||||
<div tal:repeat="item statuts">
|
||||
<option value="${item.CODE}" tal:attributes="selected rdvb.STATUT==item.CODE and 'selected' or None">${item.CODE} - ${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">A confirmer avant le :</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${fin_reservation}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Ligne de compte :</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${rdvb['ligne_cpt']}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Créé le :</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${cree_le}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Modifié le : </label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${modif_le} par <b>${cd_uti}</b></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-3 col-xs-8">
|
||||
<a href="${url_retour}" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<button class="btn btn-danger" type="submit" name="form.deleted" tal:condition="delete">
|
||||
<span class="glyphicon glyphicon-trash"></span> Supprimer</button>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted" tal:condition="rdvb.VALIDE != 'O'">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<a class="btn btn-warning" role="button" href="/fiche_eleve/${rdvb.CD_CLI}" tal:condition="rdvb.CD_CLI > 100000">
|
||||
<span class="glyphicon glyphicon-user"></span> Fiche élève</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#motos_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
$('#NOM').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_lookup',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: "E"+request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
|
||||
});
|
||||
},
|
||||
select :function(el,data){
|
||||
console.log(data.item)
|
||||
},
|
||||
minLength: 3,
|
||||
appendTo: "#motos_edit-form"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
311
aem_gestion/templates/planning/motos_list.pt
Normal file
311
aem_gestion/templates/planning/motos_list.pt
Normal file
@@ -0,0 +1,311 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-success" tal:condition="message" tal:content="message" />
|
||||
|
||||
<form id="frm-motos_list" action="${url}" method="POST" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-1">Infos : </label>
|
||||
<div class="col-xs-6">
|
||||
<p class="form-control-static">${stage.infos}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5">
|
||||
<a href="${url_retour}" 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" tal:condition="len(button_title)">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span> ${button_title}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
(Veuillez cocher un ou plusieurs élèves pour mettre à jour leur moniteur ou effectuer un suivi)
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<table id="motos_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Gr</th>
|
||||
<th>Nv</th>
|
||||
<th>Mon.</th>
|
||||
<th>Nom, Prénom</th>
|
||||
<th>Solde</th>
|
||||
<th>ETG</th>
|
||||
<th>Fil.</th>
|
||||
<th>Comment.</th>
|
||||
<th>HCB</th>
|
||||
<th>St</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<br />
|
||||
<form id="frm-stageb_list" action="${url}" method="POST" class="form-horizontal">
|
||||
<div class="form-group" style="margin-left:10px;">
|
||||
<button type="button" data-toggle="modal" data-target="#deleteEleveStage" id="deleted_selected" class="btn btn-danger hide" >Supprimer la sélection</button>
|
||||
<a class="btn btn-success" tal:condition="stage.VALIDE != 'O'" href="/motos_edit/${type}/${date}/${grp}/0"><span class="glyphicon glyphicon-user"></span> Ajouter éléve</a>
|
||||
<button class="btn btn-primary" type="button" tal:condition="code == 9 and stage.VALIDE != 'O' " data-toggle="modal" data-target="#editPlanning" name="form.seance"><span class="glyphicon glyphicon-pencil"></span> Modifier planning</button>
|
||||
<button class="btn btn-primary" type="button" tal:condition="code == 9 and stage.VALIDE != 'O' " data-toggle="modal" data-target="#validatePlanning"><span class="glyphicon glyphicon-check"></span> Valider planning</button>
|
||||
</div>
|
||||
</form>
|
||||
<!--edit stage -->
|
||||
<div class="modal fade" id="editPlanning" role="dialog" aria-labelledby="confirmCreateLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content ">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Planning ${type} du ${date}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="edit-planning-moto" class="form-horizontal" action="" 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-3">Groupe</label>
|
||||
<div class="col-sm-8 col-md-7">
|
||||
<select class="form-control" name="GROUPE" id="select-group" disabled>
|
||||
<tal:block tal:repeat="key [x for x in groupe.keys()]">
|
||||
<option tal:attributes="selected key==stage.GROUPE and 'selected' or None" value="${key}" >${groupe[key]}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-sm-3 control-label">Libellé </label>
|
||||
<div class="col-sm-8 col-md-7">
|
||||
<input type="text" class="form-control"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le libellé est obligatoire"
|
||||
id="LIBELLE" name="LIBELLE" value="${stage.LIBELLE}" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-md-3 col-sm-3 control-label" style="margin-top:8px">Total places Plateau : </label>
|
||||
<div class="col-sm-8 col-md-2" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="TOTAL" value="${stage.TOTAL}" name="TOTAL" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
<label class="col-sm-3 col-md-2 control-label" style="margin-top:8px" >Total plateau inscrits</label>
|
||||
<div class="col-sm-8 col-md-3" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="DISPO" value="${stage.TOTAL-stage.DISPO}" name="DISPO" disabled/>
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-md-3 col-sm-3 control-label" style="margin-top:8px">Total places Route : </label>
|
||||
<div class="col-sm-8 col-md-2" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="ROUTE" value="${stage.ROUTE}" name="ROUTE" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
<label class="col-sm-3 col-md-2 control-label" style="margin-top:8px" >Total Route inscrits</label>
|
||||
<div class="col-sm-8 col-md-3" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="ROUTE_DISPO" value="${stage.ROUTE-stage.ROUTE_DISPO}" name="ROUTE_DISPO" disabled/>
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-8 col-xs-offset-3">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" style="margin-top:8px">Annuler</button>
|
||||
<button type="button" id="deleteRdv" tal:condition="code == 9" class="btn btn-danger" data-dismiss="modal" data-toggle="modal" data-target="#deletePlanning" style="margin-top:8px">Supprimer</button>
|
||||
<button type="submit" id="submitRdv" class="btn btn-primary" name="form.updated" style="margin-top:8px">Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- validate -->
|
||||
<div class="modal fade" tal:condition="code == 9" id="validatePlanning" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form action="" method="post" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Validation</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Après la validation, aucune modification ne sera possible.
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.validated" >Confirmer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modal -->
|
||||
<div class="modal fade" id="deletePlanning" tal:condition="code == 9" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form action="" method="post" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Suppression</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Confirmez-vous la supression de ce planning ?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted" >Confirmer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modal -->
|
||||
<div class="modal fade" id="deleteEleveStage" tal:condition="code == 9" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form action="${url}" method="post" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Suppression</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Confirmez-vous la supression de ces eleves dans ce stage?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<input type="hidden" value="" id="deleted_selected_inputs" name="deleted_selected_inputs" />
|
||||
<button type="submit" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted_selected" >Confirmer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div><!-- content -->
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<script src="//gyrocode.github.io/jquery-datatables-checkboxes/1.2.11/js/dataTables.checkboxes.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD/MM/YYYY');
|
||||
var table = $('#motos_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: "text-center", "targets": [0,1,2,6,10] },
|
||||
{ className: "text-right", "targets": [5] },
|
||||
{ 'targets': 0,
|
||||
'checkboxes': {
|
||||
'selectRow': true,
|
||||
'selectCallback': function(td, cellData, rowData, row, col) {
|
||||
getAlldata();
|
||||
},
|
||||
}
|
||||
},
|
||||
{ targets: 4,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers la fiche élève
|
||||
return '<a href="/fiche_eleve/' + data.substr(0, 6) + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
{ targets: 11,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/motos_edit/${type}/${date}/${grp}/' + full[0] +
|
||||
'" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-pencil"></span>' + '</a>';
|
||||
},
|
||||
},
|
||||
],
|
||||
select: {
|
||||
'style': 'multi'
|
||||
},
|
||||
order: [[1, 'asc']],
|
||||
createdRow: function( row, data, dataIndex ) {
|
||||
if ( data[5].slice(-1) == "E" ) {
|
||||
$('td', row).eq(5).css('background-color', 'Orange');
|
||||
}
|
||||
if ( data[9] == "VAL" ) {
|
||||
$('td', row).eq(9).css('background-color', 'LightGreen');
|
||||
}
|
||||
if ( data[10] > "1" ) {
|
||||
$('td', row).eq(10).css('background-color', 'Crimson').css('color', 'white');
|
||||
}
|
||||
},
|
||||
});
|
||||
// Handle form submission event
|
||||
$('#frm-motos_list').on('submit', function(e){
|
||||
var form = this;
|
||||
var rows_selected = table.column(0).checkboxes.selected();
|
||||
|
||||
// Iterate over all selected checkboxes
|
||||
$.each(rows_selected, function(index, rowId){
|
||||
// Create a hidden element
|
||||
$(form).append(
|
||||
$('<input>')
|
||||
.attr('type', 'hidden')
|
||||
.attr('name', 'id' + index)
|
||||
.val(rowId)
|
||||
);
|
||||
});
|
||||
});
|
||||
$('#edit-planning-moto').formValidation({
|
||||
fields: {
|
||||
TOTAL: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Total devrait superieur ou egalé à ce qui est inscrit',
|
||||
callback: function(input) {
|
||||
var dispo = parseInt(${stage.DISPO})
|
||||
return dispo <= parseInt(input)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ROUTE: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Total route devrait superieur ou egalé à ce qui est inscrit',
|
||||
callback: function(input) {
|
||||
var dispo = parseInt(${stage.ROUTE_DISPO})
|
||||
return dispo <= parseInt(input)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
function getAlldata(data){
|
||||
selecteds = table.data().toArray()
|
||||
var selectdIds = table.column(0).checkboxes.selected().toArray()
|
||||
var filtered = selecteds.filter(function(e){
|
||||
return e[12] === 'N' && selectdIds.includes(e[0])
|
||||
})
|
||||
if(selecteds.length === 0 || filtered.length > 0){
|
||||
$('#deleted_selected').removeClass('hide');
|
||||
}
|
||||
else{
|
||||
$('#deleted_selected').addClass('hide');
|
||||
}
|
||||
$('#deleted_selected_inputs').val(selectdIds.join('-'))
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
|
||||
266
aem_gestion/templates/planning/motos_schd.pt
Normal file
266
aem_gestion/templates/planning/motos_schd.pt
Normal file
@@ -0,0 +1,266 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div class="container">
|
||||
<div class="row" style="margin-left:1em;">
|
||||
<div class="col-sx-12">
|
||||
<button class="btn btn-primary" type="button" data-toggle="modal" data-target="#confirmDuplicate" >
|
||||
<span class="glyphicon glyphicon-plus"></span> Semaine Type</button>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="calendar"></div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<!-- Modal : Creation stage -->
|
||||
<div class="modal fade" id="confirmCreate" role="dialog" aria-labelledby="confirmCreateLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content ">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Planning A du</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="create-planning-moto" class="form-horizontal" action="" 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" id="form-code">
|
||||
<label class="col-sm-3 control-label" style="margin-top:8px">Type</label>
|
||||
<div class="col-sm-8 col-md-7" style="margin-top:8px">
|
||||
<input type="text" class="form-control" id="type" name="TYPE" placeholder="3 caractères minimum" value="${type}" readonly/>
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-sm-3 control-label" >Date </label>
|
||||
<div class="col-sm-8 col-md-7">
|
||||
<input type="text" class="form-control" id="DATE" name="DATE" placeholder="3 caractères minimum" readonly />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Groupe</label>
|
||||
<div class="col-sm-8 col-md-7">
|
||||
<select class="form-control" name="GROUPE" id="select-group">
|
||||
<tal:block tal:repeat="key [x for x in groupe.keys()]">
|
||||
<option value="${key}" >${groupe[key]}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-sm-3 control-label">Libellé </label>
|
||||
<div class="col-sm-8 col-md-7">
|
||||
<input type="text" class="form-control"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le libellé est obligatoire"
|
||||
id="LIBELLE" name="LIBELLE" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code" tal:condition="type != 'A' ">
|
||||
<label class="col-md-3 col-sm-3 control-label" style="margin-top:8px">Total places Plateau </label>
|
||||
<div class="col-sm-8 col-md-6" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="TOTAL" value="0" name="TOTAL" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code" tal:condition="type == 'A' ">
|
||||
<label class="col-md-3 col-sm-3 control-label" style="margin-top:8px">Total places Plateau </label>
|
||||
<div class="col-sm-8 col-md-2" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="TOTAL" value="0" name="TOTAL" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
<label class="col-sm-3 col-md-2 control-label" style="margin-top:8px">Total places Route</label>
|
||||
<div class="col-sm-8 col-md-3" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="ROUTE" value="0" name="ROUTE" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" style="margin-top:8px">Annuler</button>
|
||||
<button type="submit" id="submitRdv" class="btn btn-danger" name="form.submitted" style="margin-top:8px">Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- duplicate modale -->
|
||||
<div class="modal fade" id="confirmDuplicate" role="dialog" aria-labelledby="confirmCreateLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-md">
|
||||
<div class="modal-content ">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Duplication planning</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="duplicate-planning-moto" class="form-horizontal" action="" 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" id="form-code">
|
||||
<label class="col-sm-3 control-label" >De la semaine du </label>
|
||||
<div class="col-sm-8 col-md-7">
|
||||
<input type="text" class="form-control" id="DATE1" name="DATE1" placeholder="3 caractères minimum" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-sm-3 control-label" >Vers la semiane du </label>
|
||||
<div class="col-sm-8 col-md-7">
|
||||
<input type="text" class="form-control" id="DATE2" name="DATE2" placeholder="3 caractères minimum" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-md-3 col-sm-3 control-label" style="margin-top:8px">Sur</label>
|
||||
<div class="col-sm-8 col-md-3" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="NB" value="3" name="NB" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
<label class="col-md-3 col-sm-3 control-label" style="margin-top:8px">Semaines</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" style="margin-top:8px">Annuler</button>
|
||||
<button type="submit" id="submitRdv" class="btn btn-danger" name="form.duplicated" style="margin-top:8px">Dupliquer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
</div><!-- content -->
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<!-- Bootstrap Fullcalendar plugin -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar-scheduler/1.9.4/scheduler.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/locale/fr.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#calendar').fullCalendar({
|
||||
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
|
||||
locale: 'fr',
|
||||
header: {
|
||||
left: 'month listWeek',
|
||||
center: 'prev title next',
|
||||
right: 'today'
|
||||
},
|
||||
allDaySlot: false,
|
||||
defaultView: 'month',
|
||||
hiddenDays: [0], // hide sunday
|
||||
height: 'auto',
|
||||
minTime: "07:00:00",
|
||||
maxTime: "21:00:00",
|
||||
displayEventTime: false,
|
||||
events:${calendar_events},
|
||||
eventRender: function(event, element){
|
||||
element.find('.fc-title').append("<br/>" + event.description);
|
||||
},
|
||||
dayClick: function(date, jsEvent, view) {
|
||||
var string_date = date.format('DD-MM-YYYY');
|
||||
$('#DATE').val(string_date);
|
||||
$(".modal-title").html('Planning ${type} du '+string_date);
|
||||
$('#confirmCreate').modal("show");
|
||||
}
|
||||
});
|
||||
$('#create-planning-moto').formValidation({
|
||||
fields: {
|
||||
TOTAL: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Total devrait une valeur positive',
|
||||
callback: function(input) {
|
||||
var num = Number(input)
|
||||
return num >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ROUTE: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Route devrait une valeur positive',
|
||||
callback: function(input) {
|
||||
return input !== "" && parseInt(input) >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#DATE1').datetimepicker({
|
||||
format: 'DD/MM/YYYY'
|
||||
}).on('dp.change', function (ev) {
|
||||
fv.formValidation.revalidateField($('#DATE1'))
|
||||
});
|
||||
$('#DATE2').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
}).on('dp.change', function (ev) {
|
||||
fv.formValidation.revalidateField($('#DATE2'))
|
||||
});
|
||||
var fv = $('#duplicate-planning-moto').formValidation({
|
||||
fields: {
|
||||
DATE1: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'La date saisie doit être un lundi !',
|
||||
callback: function(input) {
|
||||
var dt = moment(input,'DD/MM/YYYY')
|
||||
return dt && dt.day() == 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
DATE2: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'La date saisie doit être un lundi !',
|
||||
callback: function(input) {
|
||||
var dt = moment(input,'DD/MM/YYYY')
|
||||
return dt && dt.day() == 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}).data();
|
||||
|
||||
$('#DATE1').on('input change',function(){
|
||||
// fv.formValidation.updateStatus($('#DATE1'),'INVALID').revalidateField($('#DATE1'));
|
||||
fv.formValidation.validateField($('#DATE1'))
|
||||
})
|
||||
$('#DATE2').on('input change',function(){
|
||||
// fv.formValidation.updateStatus($('#DATE2'),'INVALID').revalidateField($('#DATE1'));
|
||||
fv.formValidation.validateField($('#DATE2'))
|
||||
})
|
||||
|
||||
$('#TOTAL1').on('input change',function(){
|
||||
// fv.formValidation.updateStatus($('#TOTAL1'),'INVALID').revalidateField($('#TOTAL1'));
|
||||
fv.formValidation.validateField($('#TOTAL1'))
|
||||
})
|
||||
$('#TOTAL2').on('input change',function(){
|
||||
// fv.formValidation.updateStatus($('#TOTAL2'),'INVALID').revalidateField($('#TOTAL1'));
|
||||
fv.formValidation.validateField($('#TOTAL2'))
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
|
||||
171
aem_gestion/templates/planning/planifier.pt
Normal file
171
aem_gestion/templates/planning/planifier.pt
Normal file
@@ -0,0 +1,171 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div class="container">
|
||||
|
||||
<div class="alert alert-warning" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form method="POST" id="frm" action="${url}" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">Moniteur</label>
|
||||
<div class="col-sm-3">
|
||||
<select class="form-control" id="cd_mon" name="cd_mon" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="moniteurC moniteurs">
|
||||
<tal:block tal:repeat="item moniteurC">
|
||||
<option value="${item.CD_MON}" tal:attributes="selected cd_mon==item.CD_MON and 'selected' or None">${item.NOM} - ${item.CD_MON}</option>
|
||||
</tal:block>
|
||||
<option tal:condition="moniteurC" disabled>--------------------------------</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<div id="calendar"></div>
|
||||
<br />
|
||||
<p>
|
||||
<span class="label" style="background-color:LightGreen; color:black;">Validée</span>
|
||||
<span class="label" style="background-color:LightBlue; color:black;">Activitée</span>
|
||||
<span class="label" style="background-color:LightPink; color:black;">Réservation</span>
|
||||
<span class="label" style="background-color:LightYellow; color:black;">Heure Conduite B</span>
|
||||
<span class="label" style="background-color:Gold; color:black;">Examen blanc</span>
|
||||
<span class="label" style="background-color:GoldenRod; color:black;">Avant permis</span>
|
||||
<span class="label" style="background-color:Plum; color:black;">RDV préalable</span>
|
||||
<span class="label" style="background-color:YellowGreen; color:black;">RDV pédag 1</span>
|
||||
<span class="label" style="background-color:LimeGreen; color:black;">RDV pédag 2</span>
|
||||
<span class="label" style="background-color:DeepSkyBlue; color:black;">1ères heures</span>
|
||||
<span class="label" style="background-color:DeepPink; color:black;">Absent Retard</span>
|
||||
</p>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<!-- Modal : Confirmation CREATION -->
|
||||
<div class="modal fade" id="confirmCreate" role="dialog" aria-labelledby="confirmCreateLabel" 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">Créer une semaine type ${type_planning}</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 une semaine type : <br />
|
||||
</p>
|
||||
<div class="col-xs-offset-3 col-xs-9">
|
||||
<p><b>dans la semaine du <span id=dateheureRDV>date</span></b></p>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-xs-3 control-label">Semaine type</label>
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" id="semaine" name="semaine">
|
||||
<div tal:repeat="item p_semaines">
|
||||
<option value="${item.CODE_SEM}" tal:attributes="selected semaine == item.CODE_SEM and 'selected' or None">${item.LIBELLE} | ${item.CODE_SEM}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="dateRDV" id=dateRDV value="date">
|
||||
<input type="hidden" name="cd_mon" id="cd_mon" value="${cd_mon}" >
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Nb de semaine</label>
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control static" name="QTE">
|
||||
<tal:block tal:repeat="i [x for x in range(1,6)]">
|
||||
<option tal:attributes="selected str(i)==QTE and 'selected' or None">${i}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-3 col-xs-7 checkbox">
|
||||
<label><input type="checkbox" name="alterne" value="alterne" id="alterne">alterné (1 semaine sur 2)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="submit" id="submitRdv" 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>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
</div><!-- content -->
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<!-- Bootstrap Fullcalendar plugin -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar-scheduler/1.9.4/scheduler.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/locale/fr.js"></script>
|
||||
<!-- autocomplete plugin -->
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var datePlan = '${datePlan}';
|
||||
|
||||
$('#calendar').fullCalendar({
|
||||
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
|
||||
locale: 'fr',
|
||||
header: {
|
||||
left: 'agendaWeek month',
|
||||
center: 'prev title next',
|
||||
right: 'today'
|
||||
},
|
||||
allDaySlot: true,
|
||||
defaultView: 'agendaWeek',
|
||||
defaultDate: moment(datePlan),
|
||||
slotDuration: '00:60:00',
|
||||
hiddenDays: [0], // hide sunday
|
||||
height: 'auto',
|
||||
minTime: "07:00:00",
|
||||
maxTime: "21:00:00",
|
||||
displayEventTime: true,
|
||||
events:${calendar_events},
|
||||
eventRender: function(event, element){
|
||||
element.find('.fc-title').append("<br/>" + event.description);
|
||||
},
|
||||
dayClick: function(date, jsEvent, view) {
|
||||
// alert('Bientôt, la possibilité de créer un rdv pour le ' + date.format());
|
||||
$('#dateheureRDV').html(moment(date).format('dddd DD MMMM'));
|
||||
$('#dateRDV').attr('value', moment(date).format('DD-MM-YYYY'));
|
||||
$("#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>
|
||||
</div><!-- scripts -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
312
aem_gestion/templates/planning/planninga_list.pt
Normal file
312
aem_gestion/templates/planning/planninga_list.pt
Normal file
@@ -0,0 +1,312 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-success" tal:condition="message" tal:content="message" />
|
||||
|
||||
<form id="frm-planninga_list" action="${url}" method="POST" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5">
|
||||
<a href="/motos_schd/${type}" 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-chevron-right"></span> Suivi groupe</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
(Veuillez cocher un ou plusieurs élèves pour effectuer un suivi)
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<table id="planninga_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Nom, Prénom</th>
|
||||
<th>Solde</th>
|
||||
<th>ETG</th>
|
||||
<th>Cat</th>
|
||||
<th>1er plateau</th>
|
||||
<th>H. prises</th>
|
||||
<th>Examens P - R</th>
|
||||
<th>St</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<br />
|
||||
<form id="frm-stageb_list" action="${url}" method="POST" class="form-horizontal">
|
||||
<div class="form-group" style="margin-left:10px;">
|
||||
<button type="button" data-toggle="modal" data-target="#deleteEleveStage" id="deleted_selected" class="btn btn-danger hide" >Supprimer la sélection</button>
|
||||
<a class="btn btn-success" tal:condition="stage.VALIDE != 'O'" href="/motos_edit/${type}/${date}/${grp}/0"><span class="glyphicon glyphicon-user"></span> Ajouter éléve</a>
|
||||
<button class="btn btn-primary" type="button" tal:condition="code == 9 and stage.VALIDE != 'O' " data-toggle="modal" data-target="#editPlanning" name="form.seance"><span class="glyphicon glyphicon-pencil"></span> Modifier planning</button>
|
||||
<button class="btn btn-primary" type="button" tal:condition="code == 9 and stage.VALIDE != 'O' " data-toggle="modal" data-target="#validatePlanning"><span class="glyphicon glyphicon-check"></span> Valider planning</button>
|
||||
</div>
|
||||
</form>
|
||||
<!--edit stage -->
|
||||
<div class="modal fade" id="editPlanning" role="dialog" aria-labelledby="confirmCreateLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content ">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Planning ${type} du ${date}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="edit-planning-moto" class="form-horizontal" action="" 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-3">Groupe</label>
|
||||
<div class="col-sm-8 col-md-7">
|
||||
<select class="form-control" name="GROUPE" id="select-group" disabled>
|
||||
<tal:block tal:repeat="key [x for x in groupe.keys()]">
|
||||
<option tal:attributes="selected key==stage.GROUPE and 'selected' or None" value="${key}" >${groupe[key]}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-sm-3 control-label">Libellé </label>
|
||||
<div class="col-sm-8 col-md-7">
|
||||
<input type="text" class="form-control"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le libellé est obligatoire"
|
||||
id="LIBELLE" name="LIBELLE" value="${stage.LIBELLE}" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-md-3 col-sm-3 control-label" style="margin-top:8px">Total places Plateau : </label>
|
||||
<div class="col-sm-8 col-md-2" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="TOTAL" value="${stage.TOTAL}" name="TOTAL" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
<label class="col-sm-3 col-md-2 control-label" style="margin-top:8px" >Total plateau inscrits</label>
|
||||
<div class="col-sm-8 col-md-3" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="DISPO" value="${stage.TOTAL-stage.DISPO}" name="DISPO" disabled/>
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-md-3 col-sm-3 control-label" style="margin-top:8px">Total places Route : </label>
|
||||
<div class="col-sm-8 col-md-2" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="ROUTE" value="${stage.ROUTE}" name="ROUTE" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
<label class="col-sm-3 col-md-2 control-label" style="margin-top:8px" >Total Route inscrits</label>
|
||||
<div class="col-sm-8 col-md-3" style="margin-top:8px">
|
||||
<input type="number" class="form-control" id="ROUTE_DISPO" value="${stage.ROUTE-stage.ROUTE_DISPO}" name="ROUTE_DISPO" disabled/>
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-8 col-xs-offset-3">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" style="margin-top:8px">Annuler</button>
|
||||
<button type="button" id="deleteRdv" tal:condition="code == 9" class="btn btn-danger" data-dismiss="modal" data-toggle="modal" data-target="#deletePlanning" style="margin-top:8px">Supprimer</button>
|
||||
<button type="submit" id="submitRdv" class="btn btn-primary" name="form.updated" style="margin-top:8px">Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- validate -->
|
||||
<div class="modal fade" tal:condition="code == 9" id="validatePlanning" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form action="" method="post" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Validation</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Après la validation, aucune modification ne sera possible.
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.validated" >Confirmer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modal -->
|
||||
<div class="modal fade" id="deletePlanning" tal:condition="code == 9" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form action="" method="post" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Suppression</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Confirmez-vous la supression de ce planning ?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted" >Confirmer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<!-- modal -->
|
||||
<div class="modal fade" id="deleteEleveStage" tal:condition="code == 9" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form action="${url}" method="post" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Suppression</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Confirmez-vous la supression de ces eleves dans ce stage?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<input type="hidden" value="" id="deleted_selected_inputs" name="deleted_selected_inputs" />
|
||||
<button type="submit" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted_selected" >Confirmer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- content -->
|
||||
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<script src="//gyrocode.github.io/jquery-datatables-checkboxes/1.2.11/js/dataTables.checkboxes.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD/MM/YYYY');
|
||||
var table = $('#planninga_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
bFilter: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: "text-center", "targets": [3,4,8] },
|
||||
{ className: "text-right", "targets": [2] },
|
||||
{ 'targets': 0,
|
||||
'checkboxes': {
|
||||
'selectRow': true,
|
||||
'selectCallback': function(td, cellData, rowData, row, col) {
|
||||
getAlldata();
|
||||
},
|
||||
}
|
||||
},
|
||||
{ targets: 1,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers la fiche élève
|
||||
return '<a href="/fiche_eleve/' + data.substr(0, 6) + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
{ targets: 9,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/motos_edit/${type}/${date}/${grp}/' + full[0] +
|
||||
'" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-pencil"></span>' + '</a>';
|
||||
},
|
||||
},
|
||||
],
|
||||
select: {
|
||||
'style': 'multi'
|
||||
},
|
||||
order: [[1, 'asc']],
|
||||
createdRow: function( row, data, dataIndex ) {
|
||||
if ( data[2].slice(-1) == "E" ) {
|
||||
$('td', row).eq(2).css('background-color', 'Orange');
|
||||
}
|
||||
if ( data[7].slice(-2) == "AP" ) {
|
||||
$('td', row).eq(7).css('background-color', 'GoldenRod').css('color', 'white');
|
||||
}
|
||||
if ( data[8] > "1" ) {
|
||||
$('td', row).eq(8).css('background-color', 'Crimson').css('color', 'white');
|
||||
}
|
||||
if ( data[8] == "1" ) {
|
||||
$('td', row).eq(8).css('background-color', 'ForestGreen').css('color', 'white');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
$('#edit-planning-moto').formValidation({
|
||||
fields: {
|
||||
TOTAL: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Total devrait superieur ou egalé à ce qui est inscrit',
|
||||
callback: function(input) {
|
||||
var dispo = parseInt(${stage.DISPO})
|
||||
return dispo <= parseInt(input)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ROUTE: {
|
||||
validators: {
|
||||
callback: {
|
||||
message: 'Total route devrait superieur ou egalé à ce qui est inscrit',
|
||||
callback: function(input) {
|
||||
var dispo = parseInt(${stage.ROUTE_DISPO})
|
||||
return dispo <= parseInt(input)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
// Handle form submission event
|
||||
$('#frm-planninga_list').on('submit', function(e){
|
||||
var form = this;
|
||||
var rows_selected = table.column(0).checkboxes.selected();
|
||||
|
||||
// Iterate over all selected checkboxes
|
||||
$.each(rows_selected, function(index, rowId){
|
||||
// Create a hidden element
|
||||
$(form).append(
|
||||
$('<input>')
|
||||
.attr('type', 'hidden')
|
||||
.attr('name', 'id' + index)
|
||||
.val(rowId)
|
||||
);
|
||||
});
|
||||
});
|
||||
function getAlldata(data){
|
||||
selecteds = table.data().toArray()
|
||||
var selectdIds = table.column(0).checkboxes.selected().toArray()
|
||||
var filtered = selecteds.filter(function(e){
|
||||
console.log(e)
|
||||
return e[10] === 'N' && selectdIds.includes(e[0])
|
||||
})
|
||||
if(selecteds.length === 0 || filtered.length > 0){
|
||||
$('#deleted_selected').removeClass('hide');
|
||||
}
|
||||
else{
|
||||
$('#deleted_selected').addClass('hide');
|
||||
}
|
||||
$('#deleted_selected_inputs').val(selectdIds.join('-'))
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</div>
|
||||
|
||||
</metal:block>
|
||||
|
||||
|
||||
471
aem_gestion/templates/planning/planningb.pt
Normal file
471
aem_gestion/templates/planning/planningb.pt
Normal file
@@ -0,0 +1,471 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="container">
|
||||
<div class="alert alert-warning" tal:condition="message" tal:content="message"></div>
|
||||
<div id="flash" tal:condition="request.session.get('_f_error')" >
|
||||
<tal:block tal:repeat="m request.session.get('_f_error')">
|
||||
<div class="alert alert-warning">${m}</div>
|
||||
</tal:block>
|
||||
<span class="hide">${request.session.popitem()}</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div id="exams_agence-form" >
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-1">Agence</label>
|
||||
<div class="col-xs-11">
|
||||
<a class="btn btn-default" href="${url}?agence=1" >VALMY</a>
|
||||
<a class="btn btn-default" href="${url}?agence=2" >SAXE</a>
|
||||
<a class="btn btn-default" href="${url}?agence=3" >CROIX ROUSSE</a>
|
||||
<a class="btn btn-default" href="${url}?agence=4" >MONPLAISIR</a>
|
||||
<a class="btn btn-default" href="${url}?agence=5" >CHARPENNES</a>
|
||||
<a class="btn btn-default" href="${url}?agence=6" >VAUGNERAY</a>
|
||||
<a class="btn btn-default" href="${url}?agence=7" >GENTIL</a>
|
||||
<a class="btn btn-default" href="${url}?agence=8" >VITTON</a>
|
||||
<a class="btn btn-default" href="${url}?agence=9" >WEB</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<form method="POST" id="change-permis" action="${current_url}" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-1">Type de permis</label>
|
||||
<div class="col-xs-5">
|
||||
<select class="form-control" name="current_planning" onChange="$('#change-permis').submit()">
|
||||
<option value="ALL" tal:attributes="selected current_planning=='ALL' and 'selected' or None">----</option>
|
||||
<tal:block tal:repeat="item type_plannings">
|
||||
<option value="${item}" tal:attributes="selected current_planning==item and 'selected' or None">${item}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="row ml-2">
|
||||
<div class="col-xs-5">
|
||||
<button class="btn btn-primary" type="button" tal:condition="code >= 4 " data-toggle="modal" data-target="#validatePlanning"><span class="glyphicon glyphicon-check"></span> Validation Planning B</button>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<style>
|
||||
.fc-bgevent {
|
||||
opacity: 0.8 !important;
|
||||
border: 1px dotted #acacac;
|
||||
}
|
||||
</style>
|
||||
<div id="calendar"></div>
|
||||
<br />
|
||||
<p>
|
||||
|
||||
<span class="label" style="background-color:#b57f3e; color:black;">Type de Permis B</span>
|
||||
<span class="label" style="background-color:#c2ac91; color:black;">Type de Permis B78</span>
|
||||
<span class="label" style="background-color:#79b0a0; color:black;">Type de Permis 2R</span>
|
||||
<span class="label" style="background-color:#a08da6; color:black;">Type de Permis GL</span>
|
||||
</p>
|
||||
<br />
|
||||
<p>
|
||||
<span class="label" style="background-color:LightGreen; color:black;">Validée</span>
|
||||
<span class="label" style="background-color:LightBlue; color:black;">Activitée</span>
|
||||
<span class="label" style="background-color:LightPink; color:black;">Réservation</span>
|
||||
<span class="label" style="background-color:LightYellow; color:black;">Heure Conduite B</span>
|
||||
<span class="label" style="background-color:Gold; color:black;">Examen blanc</span>
|
||||
<span class="label" style="background-color:GoldenRod; color:black;">Avant permis</span>
|
||||
<span class="label" style="background-color:Plum; color:black;">RDV préalable</span>
|
||||
<span class="label" style="background-color:YellowGreen; color:black;">RDV pédag 1</span>
|
||||
<span class="label" style="background-color:LimeGreen; color:black;">RDV pédag 2</span>
|
||||
<span class="label" style="background-color:DeepSkyBlue; color:black;">1ères heures</span>
|
||||
<span class="label" style="background-color:DeepPink; color:black;">Absent Retard</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Modal : Confirmation CREATION -->
|
||||
<div class="modal fade" id="confirmCreate" role="dialog" aria-labelledby="confirmCreateLabel" 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">Créer un rendez-vous</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 pour : <br />
|
||||
</p>
|
||||
<div class="col-xs-offset-3 col-xs-9">
|
||||
<p><b>le <span id=dateheureRDV>date</span> h</b></p>
|
||||
<p>pour un élève ou une activité</p>
|
||||
</div>
|
||||
<div class="form-group" id="form-code">
|
||||
<label class="col-xs-3 control-label">Nom ou Code</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="3 caractères minimum" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="dateRDV" id=dateRDV value="date">
|
||||
<input type="hidden" name="heureRDV" id=heureRDV value="heure">
|
||||
<input type="hidden" name="agence" id="agence" value="${agence}">
|
||||
<input type="hidden" name="cd_mon" id="cd_mon" value="">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Nb d'heures</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control static" name="QTE">
|
||||
<tal:block tal:repeat="i [x for x in range(1,12)]">
|
||||
<option tal:attributes="selected str(i)==QTE and 'selected' or None">${i}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="submit" id="submitRdv" 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>
|
||||
|
||||
<!-- Modal : Confirmation CREATION -->
|
||||
<div class="modal fade" id="confirmCreateB78" role="dialog" aria-labelledby="confirmCreateLabel" 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">Créer un rendez-vous</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="create_rdv-form78" 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 pour : <br />
|
||||
</p>
|
||||
<div class="col-xs-offset-3 col-xs-9">
|
||||
<p><b>le <span id='dateheureRDVB78'>date</span> h</b></p>
|
||||
<p>pour un élève ou une activité</p>
|
||||
</div>
|
||||
<div class="form-group" id="form-codeB78">
|
||||
<label class="col-xs-3 control-label">Nom ou Code</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="nameB78" name="name" placeholder="3 caractères minimum" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="dateRDV" id="dateRDVB78" value="date">
|
||||
<input type="hidden" name="heureRDV" id="heureRDVB78" value="heure">
|
||||
<input type="hidden" name="agence" id="agenceB78" value="${agence}">
|
||||
<input type="hidden" name="cd_mon_B78" id="cd_mon_B78" value="">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Nb d'heures</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control static" name="QTE">
|
||||
<tal:block tal:repeat="i [x for x in range(1,12)]">
|
||||
<option tal:attributes="selected str(i)==QTE and 'selected' or None">${i}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="submit" id="submitRdvB78" 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>
|
||||
|
||||
<!-- Modal : validation PLANNING -->
|
||||
<div class="modal fade" id="validatePlanning" role="dialog" aria-labelledby="confirmCreateLabel" 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">Validation planning B</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<form id="validate-planning" 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>
|
||||
Après la validation, aucune modification ne sera possible. Etes-vous sûr de vouloir valider cette journée ?
|
||||
</p>
|
||||
<div class="form-group" id="form-codeB78">
|
||||
<label class="col-xs-3 control-label">Date</label>
|
||||
<div class="col-xs-8">
|
||||
<input type="text" class="form-control" id="validate_date" name="date" value="${current_date.strftime('%d/%m/%Y')}" placeholder="DD/MM/YYYY" />
|
||||
<span id="text-error-message" style="font-size:11px;color:#D9534F;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Agence</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control static" name="agence" tal:attributes="value code != 9 and myagence or agence" tabindex="-1" tal:attributes="disabled code != 9 and 'disabled' or None" tabindex="-1">
|
||||
<tal:block tal:repeat="i [x for x in range(1,10)]" >
|
||||
<option tal:attributes="selected ((code == 9 and i==agence) or (code != 9 and i==myagence )) and 'selected' or None" value="${i}" >${i}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="submit" class="btn btn-danger" name="form.validated">Valider</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div><!-- content -->
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<!-- Bootstrap Fullcalendar plugin -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar-scheduler/1.9.4/scheduler.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/locale/fr.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#calendar').fullCalendar({
|
||||
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
|
||||
locale: 'fr',
|
||||
defaultView: 'timelineDay',
|
||||
defaultDate:'${current_date.strftime('%Y-%m-%d')}',
|
||||
selectable: false,
|
||||
contentHeight: "auto",
|
||||
minTime: "07:00:00",
|
||||
maxTime: "21:00:00",
|
||||
header: {
|
||||
left: '',
|
||||
center: 'prev title next',
|
||||
right: 'timelineDay'
|
||||
},
|
||||
resourceAreaWidth: '20%',
|
||||
resourceLabelText: 'Moniteurs',
|
||||
resources: ${calendar_ressources},
|
||||
selectOverlap: function(event) {
|
||||
return event.rendering === 'background';
|
||||
},
|
||||
resourceRender: function(resourceObj, labelTds, bodyTds) {
|
||||
//console.log( bodyTds);
|
||||
if(resourceObj.planning == "2R"){
|
||||
labelTds.css('background', '#79b0a0');
|
||||
}
|
||||
else if(resourceObj.planning == "GL"){
|
||||
labelTds.css('background', '#a08da6');
|
||||
}
|
||||
else if(resourceObj.planning == "B"){
|
||||
labelTds.css('background', '#b57f3e');
|
||||
}
|
||||
else if(resourceObj.planning == "B78"){
|
||||
labelTds.css('background', '#c2ac91');
|
||||
}
|
||||
else{
|
||||
labelTds.css('color', 'black');
|
||||
}
|
||||
|
||||
},
|
||||
events: function(start,end,timezone,callback){
|
||||
var data = ${calendar_events};
|
||||
var fomatedData = [];
|
||||
data.forEach(function(e){
|
||||
if(e.url){
|
||||
var url = e.url.replaceAll('amp;','');
|
||||
e.url = url;
|
||||
fomatedData.push(e)
|
||||
}
|
||||
});
|
||||
callback(data)
|
||||
},
|
||||
dayClick: function(date, jsEvent, view,resource) {
|
||||
if (jsEvent.target.classList.contains('fc-bgevent')) {
|
||||
console.log(date)
|
||||
if(resource.planning === "B78"){
|
||||
$('#dateheureRDVB78').html(moment(date).format('dddd DD MMMM à HH'));
|
||||
$('#dateRDVB78').attr('value', moment(date).format('YYYY-MM-DD'));
|
||||
$('#heureRDVB78').attr('value', moment(date).format('HH'));
|
||||
$('#cd_mon_B78').val(resource.id);
|
||||
$("#confirmCreateB78").modal("show");
|
||||
}
|
||||
else{
|
||||
$('#dateheureRDV').html(moment(date).format('dddd DD MMMM à HH'));
|
||||
$('#dateRDV').attr('value', moment(date).format('YYYY-MM-DD'));
|
||||
$('#heureRDV').attr('value', moment(date).format('HH'));
|
||||
$('#cd_mon').val(resource.id);
|
||||
$("#confirmCreate").modal("show");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
eventClick: function(infso) {
|
||||
console.log(infso)
|
||||
},
|
||||
dayRender: function(date,cell, data) {
|
||||
cell.css("background-color", "#edeff0");
|
||||
cell.css("disabled", 'disabled')
|
||||
cell.Enabled = false;
|
||||
},
|
||||
viewRender: function(view, element) {
|
||||
var start = view.activeStart;
|
||||
var end = view.activeEnd;
|
||||
const paramsString = window.location.search;
|
||||
const searchParams = new URLSearchParams(paramsString);
|
||||
var current_day = moment('${current_date.strftime('%Y-%m-%d')}');
|
||||
var diff = view.start.diff(current_day,'days', false);
|
||||
$('#validate_date').val(view.start.format('DD/MM/YYYY'));
|
||||
if(diff <= -6){
|
||||
disableNavButton();
|
||||
searchParams.set('next', view.start.format('YYYY-MM-DD'));
|
||||
// searchParams.set('next', view.start.subtract(30, "days").format('YYYY-MM-DD'));
|
||||
window.location.replace(window.location.href.replace(location.search, '')+'?'+searchParams.toString())
|
||||
}
|
||||
else if(diff >= 30) {
|
||||
disableNavButton();
|
||||
searchParams.set('next', view.start.format('YYYY-MM-DD'));
|
||||
window.location.replace(window.location.href.replace(location.search, '')+'?'+searchParams.toString())
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
$('#create_rdv-form').formValidation({
|
||||
framework: 'bootstrap',
|
||||
excluded: ':disabled',
|
||||
icon: {
|
||||
valid: 'glyphicon glyphicon-ok',
|
||||
invalid: 'glyphicon glyphicon-remove',
|
||||
validating: 'glyphicon glyphicon-refresh'
|
||||
},
|
||||
});
|
||||
$('#name').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_lookup',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: 'E' + request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 3,
|
||||
appendTo: "#confirmCreate"
|
||||
});
|
||||
$('#create_rdv-form').submit(function(ev){
|
||||
var actionurl = ev.currentTarget.action;
|
||||
var array_code = $('#name').val().split(' | ');
|
||||
var reg = new RegExp('^[A-Z0-9]+-[A-Z0-9]+|[0-9]{6}$');
|
||||
var condition1 = array_code.length == 2 && array_code[0].length >= 3 && array_code[1].length == 6 ;
|
||||
var condition2 = reg.test( $('#name').val().trim())
|
||||
if(condition1 && condition2){
|
||||
$('#text-error-message').text('');
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
$('#form-code').addClass('has-feedback has-error');
|
||||
$('#submitRdv').addClass('disabled').attr("disabled", true);
|
||||
$('#text-error-message').text('Code non validé');
|
||||
ev.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('#name').on('change input',function(){
|
||||
console.log('here');
|
||||
$('#text-error-message').text('');
|
||||
$('#form-code').removeClass('has-feedback has-error');
|
||||
$('#submitRdv').removeClass('disabled').attr("disabled", false);
|
||||
|
||||
});
|
||||
|
||||
$('#create_rdv-formB78').formValidation({
|
||||
framework: 'bootstrap',
|
||||
excluded: ':disabled',
|
||||
icon: {
|
||||
valid: 'glyphicon glyphicon-ok',
|
||||
invalid: 'glyphicon glyphicon-remove',
|
||||
validating: 'glyphicon glyphicon-refresh'
|
||||
},
|
||||
});
|
||||
|
||||
$('#nameB78').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_lookupb78',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: 'E' + request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
console.log(data)
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 3,
|
||||
appendTo: "#confirmCreateB78"
|
||||
});
|
||||
|
||||
$('#create_rdv-formB78').submit(function(ev){
|
||||
var actionurl = ev.currentTarget.action;
|
||||
var array_code = $('#name78').val().split(' | ');
|
||||
var reg = new RegExp('^[A-Z0-9]+-[A-Z0-9]+|[0-9]{6}$');
|
||||
var condition1 = array_code.length == 2 && array_code[0].length >= 3 && array_code[1].length == 6 ;
|
||||
var condition2 = reg.test( $('#name78').val().trim())
|
||||
if(condition1 && condition2){
|
||||
$('#text-error-message').text('');
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
$('#form-codeB78').addClass('has-feedback has-error');
|
||||
$('#submitRdvB78').addClass('disabled').attr("disabled", true);
|
||||
$('#text-error-message').text('Code non validé');
|
||||
ev.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#nameB78').on('change input',function(){
|
||||
$('#text-error-message').text('');
|
||||
$('#form-codeB78').removeClass('has-feedback has-error');
|
||||
$('#submitRdvB78').removeClass('disabled').prop("disabled", false);;
|
||||
});
|
||||
|
||||
function disableNavButton(){
|
||||
$(".fc-prev-button").prop('disabled', true);
|
||||
$(".fc-prev-button").addClass('fc-state-disabled');
|
||||
$(".fc-next-button").prop('disabled', true);
|
||||
$(".fc-next-button").addClass('fc-state-disabled');
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
|
||||
70
aem_gestion/templates/planning/plannings.pt
Normal file
70
aem_gestion/templates/planning/plannings.pt
Normal file
@@ -0,0 +1,70 @@
|
||||
<metal:block use-macro="main_template">
|
||||
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="container-fluid text-center">
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/stages_schd/B">
|
||||
<span class="glyphicon glyphicon-calendar logo-small"></span><br />
|
||||
<h4>STAGE B</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/stages_schd/C">
|
||||
<span class="glyphicon glyphicon-calendar logo-small"></span><br />
|
||||
<h4>STAGE PAP</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/stages_schd/M">
|
||||
<span class="glyphicon glyphicon-calendar logo-moto"></span><br />
|
||||
<h4>STAGE A</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/motos_schd/A">
|
||||
<span class="glyphicon glyphicon-calendar logo-moto"></span><br />
|
||||
<h4>PLANNING A</h4></a>
|
||||
</div>
|
||||
</div> <!-- row 2 -->
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/motos_schd/I">
|
||||
<span class="glyphicon glyphicon-calendar logo-small"></span><br />
|
||||
<h4>CIRCUIT FORFAIT</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/motos_schd/R">
|
||||
<span class="glyphicon glyphicon-calendar logo-small"></span>
|
||||
<h4>RDV PEDAGOGIQUE</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/motos_schd/D">
|
||||
<span class="glyphicon glyphicon-calendar logo-small"></span>
|
||||
<h4>STAGE CODE</h4></a>
|
||||
</div>
|
||||
</div> <!-- row 3 -->
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/motos_schd/E">
|
||||
<span class="glyphicon glyphicon-calendar logo-small"></span>
|
||||
<h4>EXAMEN BLANC B</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/motos_schd/F">
|
||||
<span class="glyphicon glyphicon-calendar logo-moto"></span>
|
||||
<h4>EXAMEN BLANC A</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${url_listeGL}">
|
||||
<span class="glyphicon glyphicon-copy logo-success"></span>
|
||||
<h4>LISTING GL</h4></a>
|
||||
</div>
|
||||
</div> <!-- row 4 -->
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</metal:block>
|
||||
|
||||
165
aem_gestion/templates/planning/rdvb78_edit.pt
Normal file
165
aem_gestion/templates/planning/rdvb78_edit.pt
Normal file
@@ -0,0 +1,165 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-warning" tal:condition="message" tal:content="message" />
|
||||
|
||||
<form id="rdvb_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="rdvb78"
|
||||
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">
|
||||
<div class="col-xs-offset-3 col-xs-8">
|
||||
<p class="text-danger">
|
||||
<b>${rdvb78.CD_CLI} - ${rdvb78.NOM}</b>
|
||||
<a class="btn btn-warning" role="button" href="${btn_url}"
|
||||
tal:condition="btn_url">
|
||||
<span class="glyphicon glyphicon-search"></span> ${btn_name}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Nom</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" name="NOM" id="NOM"
|
||||
value="${rdvb78.NOM} | ${rdvb78.CD_CLI}"
|
||||
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">Nb d'heures</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" name="QTE" tal:condition="rdvb78.CD_CLI > 100000">
|
||||
<option value="1" tal:attributes="selected rdvb78.QTE == 1 and 'selected' or None">1 heure</option>
|
||||
<option value="2" tal:attributes="selected rdvb78.QTE == 2 and 'selected' or None">2 heures</option>
|
||||
</select>
|
||||
<select class="form-control static" name="QTE" tal:condition="rdvb78.CD_CLI < 100000">
|
||||
<tal:block tal:repeat="i [x for x in range(1,12)]">
|
||||
<option tal:attributes="selected i==rdvb78.QTE and 'selected' or None">${i}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="statut">Type d'heure</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" name="typeHeure">
|
||||
<div tal:repeat="item heuresSpe">
|
||||
<option value="${item}" tal:attributes="selected str(rdvb78.CIRCUIT)==item[0] and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Intitulé</label>
|
||||
<div class="col-xs-9">
|
||||
<p class="form-control-static">${rdvb78.INTITULE}</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-3">Lieu du rdv</label>
|
||||
<div class="col-xs-9">
|
||||
<p class="form-control-static">${rdvb78.LIEU_RDV}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Commentaire</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" name="COMMENT"
|
||||
value="${rdvb78.COMMENT}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="50"
|
||||
data-fv-stringlength-message="50 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" tal:condition="rdvb78.TYPE_ENTREPRISE=='E'">
|
||||
<label class="control-label col-xs-3">Entreprise</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${rdvb78.NOM_ENTREPRISE}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="statut">Statut</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="statut" name="STATUT">
|
||||
<div tal:repeat="item statuts">
|
||||
<option value="${item.CODE}" tal:attributes="selected rdvb78.STATUT==item.CODE and 'selected' or None">${item.CODE} - ${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Dern. modif le</label>
|
||||
<div class="col-xs-9">
|
||||
<p class="form-control-static">${rdvb78.modif_le.strftime('%d-%m-%Y %H:%M')} par ${rdvb78.CD_UTI}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-3 col-xs-8">
|
||||
<a href="${back}" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
|
||||
<button class="btn btn-danger" tal:condition="rdv_valide==False and rdvb78.QTE>0"
|
||||
data-toggle="modal" data-target="#confirmDelete">
|
||||
<span class="glyphicon glyphicon-trash"></span> Supprimer</button>
|
||||
<button class="btn btn-primary" type="submit" name="form.validated" tal:condition="rdv_valide==False and rdvb78.QTE>0 and rdvb78.STATUT > 0 ">
|
||||
<span class="glyphicon glyphicon-ok"></span> Valider</button>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted" tal:condition="rdv_valide==False and rdvb78.QTE>0">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</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>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#rdvb_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
$('#NOM').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_lookupb78',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: 'E' + request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 3,
|
||||
appendTo: "#rdvb_edit-form"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
169
aem_gestion/templates/planning/rdvb_edit.pt
Normal file
169
aem_gestion/templates/planning/rdvb_edit.pt
Normal file
@@ -0,0 +1,169 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-warning" tal:condition="message" tal:content="message" />
|
||||
|
||||
<form id="rdvb_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="rdvb"
|
||||
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">
|
||||
<div class="col-xs-offset-3 col-xs-8">
|
||||
<p class="text-danger">
|
||||
<b>${rdvb.CD_CLI} - ${rdvb.NOM}</b>
|
||||
<a class="btn btn-warning" role="button" href="${btn_url}"
|
||||
tal:condition="btn_url">
|
||||
<span class="glyphicon glyphicon-search"></span> ${btn_name}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Nom</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" name="NOM" id="NOM"
|
||||
value="${rdvb.NOM} | ${rdvb.CD_CLI}"
|
||||
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">Nb d'heures</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" name="QTE" tal:condition="rdvb.CD_CLI > 100000">
|
||||
<option value="1" tal:attributes="selected rdvb.QTE == 1 and 'selected' or None">1 heure</option>
|
||||
<option value="2" tal:attributes="selected rdvb.QTE == 2 and 'selected' or None">2 heures</option>
|
||||
</select>
|
||||
<select class="form-control static" name="QTE" tal:condition="rdvb.CD_CLI < 100000">
|
||||
<tal:block tal:repeat="i [x for x in range(1,12)]">
|
||||
<option tal:attributes="selected i==rdvb.QTE and 'selected' or None">${i}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="statut">Type d'heure</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" name="typeHeure">
|
||||
<div tal:repeat="item heuresSpe">
|
||||
<option value="${item}" tal:attributes="selected str(rdvb.CIRCUIT)==item[0] and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Intitulé</label>
|
||||
<div class="col-xs-9">
|
||||
<p class="form-control-static">${rdvb.INTITULE}</p>
|
||||
</div>
|
||||
<label class="control-label col-xs-3">Lieu du rdv</label>
|
||||
<div class="col-xs-9">
|
||||
<p class="form-control-static">${rdvb.LIEU_RDV}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Commentaire</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" name="COMMENT"
|
||||
value="${rdvb.COMMENT}"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="50"
|
||||
data-fv-stringlength-message="50 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" tal:condition="rdvb.TYPE_ENTREPRISE=='E'">
|
||||
<label class="control-label col-xs-3">Entreprise</label>
|
||||
<div class="col-xs-8">
|
||||
<p class="form-control-static">${rdvb.NOM_ENTREPRISE}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="statut">Statut</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="statut" name="STATUT">
|
||||
<div tal:repeat="item statuts">
|
||||
<option value="${item.CODE}" tal:attributes="selected rdvb.STATUT==item.CODE and 'selected' or None">${item.CODE} - ${item.LIBELLE}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3">Dern. modif le</label>
|
||||
<div class="col-xs-9">
|
||||
<p class="form-control-static">${rdvb.modif_le.strftime('%d-%m-%Y %H:%M')} par ${rdvb.CD_UTI}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-3 col-xs-8">
|
||||
<a href="${back}" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<button class="btn btn-danger" tal:condition="rdv_valide==False and rdvb.QTE>0"
|
||||
data-toggle="modal" data-target="#confirmDelete">
|
||||
<span class="glyphicon glyphicon-trash"></span> Supprimer</button>
|
||||
<button class="btn btn-primary" type="submit" name="form.validated" tal:condition="rdv_valide==False and rdvb.QTE>0 and rdvb.STATUT > 0">
|
||||
<span class="glyphicon glyphicon-ok"></span> Valider</button>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted" tal:condition="rdv_valide==False and rdvb.QTE>0">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</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>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#rdvb_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
$('#NOM').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_lookup',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: "E"+request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
|
||||
});
|
||||
},
|
||||
select :function(el,data){
|
||||
console.log(data.item)
|
||||
},
|
||||
minLength: 3,
|
||||
appendTo: "#rdvb_edit-form"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user