93 lines
2.3 KiB
XML
93 lines
2.3 KiB
XML
<metal:block use-macro="main_template">
|
|
<div metal:fill-slot="content">
|
|
|
|
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
|
|
|
<div class="row">
|
|
|
|
<form id="member-search-form" class="form-horizontal" role="form" action="${url}" method="post">
|
|
|
|
<div class="form-group">
|
|
<label class="col-xs-4 control-label">Nom ou Code de l'élève</label>
|
|
<div class="col-xs-8">
|
|
<input type="text" class="form-control" name="name" value="${name}" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-xs-offset-4 col-xs-8">
|
|
<button id="submitButton" class="btn btn-primary" type="submit" name="form.submitted">
|
|
<span class="glyphicon glyphicon-search"></span> Rechercher</button>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
</div><!-- row -->
|
|
|
|
<div class="row">
|
|
<div tal:condition="members">
|
|
<table class="table table-striped table-bordered">
|
|
<tr>
|
|
<th>Code</th>
|
|
<th>Nom, Prénom</th>
|
|
<th>Permis - Formule</th>
|
|
<th>Inscrit</th>
|
|
<th>Statut</th>
|
|
<th></th>
|
|
</tr>
|
|
<tr tal:repeat="member members">
|
|
<td>${member.cd_cli}</td>
|
|
<td>${member.nompren}</td>
|
|
<td>${member.permis_demande} - ${member.formule}</td>
|
|
<td tal:content="member.cree_le.strftime('%d/%m/%Y')" />
|
|
<td tal:content="member.statut" />
|
|
<td>
|
|
<a href="/connecter_a/${member.cd_cli}">
|
|
<span class="glyphicon glyphicon-log-in"></span> Se connecter</a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<br />
|
|
<br />
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#member-search-form').formValidation({
|
|
framework: 'bootstrap',
|
|
message: 'This value is not valid',
|
|
icon: {
|
|
valid: 'glyphicon glyphicon-ok',
|
|
invalid: 'glyphicon glyphicon-remove',
|
|
validating: 'glyphicon glyphicon-refresh'
|
|
},
|
|
fields: {
|
|
name: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: 'Le nom ou le code est obligatoire'
|
|
},
|
|
stringLength: {
|
|
min: 2,
|
|
max: 30,
|
|
message: 'Le nom ou le code doit avoir de 2 à 30 caractères de long'
|
|
},
|
|
}
|
|
},
|
|
}
|
|
});
|
|
$('form input').on('keypress', function(e) {
|
|
var code = e.keyCode || e.which;
|
|
if (code === 13) {
|
|
e.preventDefault();
|
|
// simuler clic bouton submit
|
|
document.getElementById("submitButton").click();
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</div>
|
|
</metal:block>
|