initial upload
This commit is contained in:
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>
|
||||
Reference in New Issue
Block a user