initial upload
This commit is contained in:
173
aem_gestion/templates/parametres/moniteur_edit.pt
Normal file
173
aem_gestion/templates/parametres/moniteur_edit.pt
Normal file
@@ -0,0 +1,173 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
<br />
|
||||
<div class="row">
|
||||
<form id="user_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="individu"
|
||||
data-fv-framework="bootstrap"
|
||||
data-fv-icon-valid="glyphicon glyphicon-ok"
|
||||
data-fv-icon-invalid="glyphicon glyphicon-remove"
|
||||
data-fv-icon-validating="glyphicon glyphicon-refresh">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="CD_MON">Code</label>
|
||||
<div class="col-xs-2">
|
||||
<input class="form-control" type="text" id="CD_MON" name="CD_MON" value="${individu.CD_MON}"
|
||||
placeholder="3 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le code est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="3"
|
||||
data-fv-stringlength-message="3 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="NOM">Prénom</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="NOM" name="NOM" value="${individu.NOM}"
|
||||
placeholder="30 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le nom est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="25"
|
||||
data-fv-stringlength-message="25 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-2">Ordre Planning</label>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" id="PLANNING" name="PLANNING">
|
||||
<tal:block tal:repeat="item plannings">
|
||||
<option value="${item}" tal:attributes="selected individu.PLANNING==item and 'selected' or None">${item}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="no_autorisation">No autorisation</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="no_autorisation" name="no_autorisation" value="${individu.no_autorisation}"
|
||||
placeholder="25 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="25"
|
||||
data-fv-stringlength-message="25 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-7 checkbox">
|
||||
<label><input type="checkbox" name="obsolete" value="individu.obsolete" id="obsolete"
|
||||
tal:attributes="checked individu.obsolete == -1 and 'checked' or None">Moniteur obsolete
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access"></label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static" tal:condition="code != '0'"> <b>Crée le</b> ${cree_le} , <b>modifié le</b> ${modif_le} par ${individu.cd_uti}</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/moniteurs">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-warning" type="button" data-toggle="modal" data-target="#deleteMoniteur"
|
||||
tal:condition="individu.CD_MON != '0' and codeu == 9">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted" tal:condition="codeu == 9">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modal -->
|
||||
<div class="modal fade" id="deleteMoniteur" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">Suppression</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Confirmez-vous la suppression de ce moniteur ?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted" >Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
<div class="row" tal:condition="show_aff">
|
||||
<h2 style="margin-bottom:20px;">Affectation du moniteur</h2>
|
||||
<p>
|
||||
<!-- <a href="${request.application_url}/moniteurs" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a> -->
|
||||
<a href="${request.application_url}/moniteur_aff_edit/${individu.CD_MON}/0" class="btn btn-success" role="button" tal:condition="codeu==9">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau</a>
|
||||
</p>
|
||||
|
||||
<table id="moniteurs_aff_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No Ligne</th>
|
||||
<th>Agence</th>
|
||||
<th>Début</th>
|
||||
<th>Fin</th>
|
||||
<th>Matin</th>
|
||||
<th>Aprés-Midi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
|
||||
});
|
||||
var dataSet = ${dt_data};
|
||||
$(document).ready(function() {
|
||||
var table = $('#moniteurs_aff_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 10,
|
||||
bLengthChange: false,
|
||||
bFilter: true,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ targets: 0,
|
||||
render: function (data, type, full, meta) {
|
||||
return '<a href="/moniteur_aff_edit/'+full[6]+'/'+data+'">'+data+ '</a>'
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
$('#moniteurs_aff_list tbody').on('click','tr', function(){
|
||||
var data = table.row(this).data()
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
Reference in New Issue
Block a user