added users_list.pt and user_edit.pt
This commit is contained in:
110
mondumas/templates/user_edit.pt
Normal file
110
mondumas/templates/user_edit.pt
Normal file
@@ -0,0 +1,110 @@
|
||||
<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_uti">Identifiant</label>
|
||||
<div class="col-xs-2">
|
||||
<input class="form-control" type="text" id="cd_uti" name="cd_uti" value="${individu.cd_uti}"
|
||||
placeholder="10 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="L'identifiant 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="intitule">Nom et prénom</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="intitule" 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="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>
|
||||
<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>
|
||||
</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">Gérer son agenda
|
||||
</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>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static">${individu.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>
|
||||
</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="individu.cd_uti > 0">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</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>
|
||||
Reference in New Issue
Block a user