ajouter la possibilité d'activer ou de désactiver un membre
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<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"
|
||||
<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"
|
||||
@@ -14,7 +14,7 @@
|
||||
<label class="col-xs-2 control-label">Email</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" name="email"
|
||||
value="${individu.email}" placeholder="55 caractères maximum"
|
||||
value="${membre.email}" placeholder="55 caractères maximum"
|
||||
data-fv-emailaddress="true"
|
||||
data-fv-emailaddress-message="L'adresse email n'est pas valide" />
|
||||
</div>
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="intitule">Nom et prénom</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="intitule" name="nom" value="${individu.nom}"
|
||||
<input class="form-control" type="text" id="intitule" name="nom" value="${membre.nom}"
|
||||
placeholder="30 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le nom est obligatoire"
|
||||
@@ -32,47 +32,28 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Email</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" name="email"
|
||||
value="${individu.email}" placeholder="55 caractères maximum"
|
||||
data-fv-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="access">Accès</label>
|
||||
<label class="control-label col-xs-2" for="acces">Accès</label>
|
||||
<div class="col-xs-2">
|
||||
<select class="form-control" id="access" name="access">
|
||||
<optgroup tal:repeat="item access">
|
||||
<option value="${item}" tal:attributes="selected individu.access==item[0] and 'selected' or None">${item}</option>
|
||||
</optgroup>
|
||||
<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">
|
||||
<div class="col-xs-offset-2 col-xs-7 checkbox">
|
||||
<label><input type="checkbox" name="agenda" value="individu.agenda" id="agenda"
|
||||
tal:attributes="checked individu.agenda <> 0 and 'checked' or None">Peut prendre des rendez-vous
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-7 checkbox">
|
||||
<label><input type="checkbox" name="actif" value="individu.actif" id="actif"
|
||||
tal:attributes="checked individu.actif <> 0 and 'checked' or None">La fiche est active
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Dernière modif.</label>
|
||||
<label class="control-label col-xs-2">Dernière modif.</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static">${individu.modif_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
<p class="form-control-static">${membre.modif_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-7 checkbox">
|
||||
<p class="form-control-static">La fiche est active</p>
|
||||
<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 />
|
||||
@@ -83,8 +64,12 @@
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<button class="btn btn-warning" type="submit" name="form.deleted"
|
||||
tal:condition="individu.email > 0">
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user