103 lines
3.9 KiB
XML
103 lines
3.9 KiB
XML
<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="membre"
|
|
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-2 control-label">Email</label>
|
|
<div class="col-xs-5">
|
|
<input class="form-control" type="text" name="email"
|
|
value="${membre.email}" placeholder="55 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-2" for="intitule">Nom</label>
|
|
<div class="col-xs-5">
|
|
<input class="form-control" type="text" id="intitule" name="nom" value="${membre.nom}"
|
|
data-fv-notempty="true"
|
|
data-fv-notempty-message="Le nom est obligatoire"
|
|
data-fv-stringlength="true"
|
|
data-fv-stringlength-max="45"
|
|
data-fv-stringlength-message="45 caractères maximum" />
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-xs-2" for="intitule">Prénom</label>
|
|
<div class="col-xs-5">
|
|
<input class="form-control" type="text" id="intitule" name="prenom" value="${membre.prenom}"
|
|
data-fv-notempty="true"
|
|
data-fv-notempty-message="Le prenom est obligatoire"
|
|
data-fv-stringlength="true"
|
|
data-fv-stringlength-max="45"
|
|
data-fv-stringlength-message="45 caractères maximum" />
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-xs-2" for="acces">Accès</label>
|
|
<div class="col-xs-2">
|
|
<select class="form-control" id="acces" name="acces">
|
|
<div tal:repeat="item acces_list">
|
|
<option value="${item}" tal:attributes="selected membre.acces==item and 'selected' or None">${item}</option>
|
|
</div>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-xs-2">Dernière modif.</label>
|
|
<div class="col-xs-7">
|
|
<p class="form-control-static" tal:condition="membre.modif_le">${membre.modif_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label col-xs-2">Statut</label>
|
|
<div class="col-xs-7">
|
|
<div >
|
|
<p class="form-control-static text-danger" tal:condition="membre.expire_le">Désactivé le ${membre.modif_le.strftime('%d/%m/%Y')}</p>
|
|
</div>
|
|
<p class="form-control-static text-success" tal:condition="not membre.expire_le">Actif</p>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="form-group">
|
|
<div class="col-xs-offset-2 col-xs-10">
|
|
<div class="form-group">
|
|
<a class="btn btn-default" href="${request.application_url}/users_list"><span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
|
<button class="btn btn-primary" type="submit" name="form.submitted">
|
|
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
|
<button class="btn btn-warning" type="submit" name="form.deleted"
|
|
tal:condition="membre.email > 0">
|
|
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
|
<button class="btn btn-success" type="submit" name="form.activated"
|
|
tal:condition="membre.expire_le">Activer la fiche</button>
|
|
<button class="btn btn-danger" type="submit" name="form.desactivated"
|
|
tal:condition="not membre.expire_le">Désactiver la fiche</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<br />
|
|
<br />
|
|
</div> <!-- row -->
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#user_edit-form').formValidation();
|
|
$('form input').on('keypress', function(e) {
|
|
return e.which !== 13;
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</div>
|
|
</metal:block>
|