Amélioration form account_create

This commit is contained in:
Aurélien Delobelle 2016-09-03 16:03:36 +02:00
parent 88aad45fbb
commit f502814d82
3 changed files with 58 additions and 12 deletions

View file

@ -224,15 +224,20 @@ textarea {
text-decoration:underline;
}
#search_autocomplete {
margin-bottom:15px;
}
#search_results {
top:0 !important;
top:-15px !important;
left:0 !important;
z-index:100;
}
#search_results ul {
list-style-type:none;
padding:0;
background:rgba(255,255,255,0.8);
background:rgba(255,255,255,0.9);
}
#search_results ul li.user_category {

View file

@ -27,13 +27,19 @@
<div style="position:relative;">
<div id="search_results"></div>
</div>
<div id="form-placeholder">
{% include 'kfet/account_create_form.html' %}
<div class="form-horizontal">
<div id="form-placeholder">
{% include 'kfet/account_create_form.html' %}
</div>
{% if not perms.kfet.add_account %}
<div class="form-group">
<label for="password" class="col-sm-2 control-label">Authentification</label>
<div class="col-sm-10">
<input type="password" name="KFETPASSWORD" id="password" class="form-control">
</div>
</div>
{% endif %}
</div>
{% if not perms.kfet.add_account %}
Authentification:
<input type="password" name="KFETPASSWORD">
{% endif %}
</form>
</div>
</div>

View file

@ -1,4 +1,39 @@
{{ user_form.as_p }}
{{ cof_form.as_p }}
{{ account_form.as_p }}
<input type="submit" value="Enregistrer">
{% load widget_tweaks %}
{% for field in user_form %}
<div class="form-group">
<label for="{{ field.id_for_label }}" class="col-sm-2 control-label">{{ field.label }}</label>
<div class="col-sm-10">
{{ field|add_class:'form-control' }}
<span class="help-block">{{ field.errors }}</span>
</div>
</div>
{% endfor %}
{% for field in cof_form %}
<div class="form-group">
<label for="{{ field.id_for_label }}" class="col-sm-2 control-label">{{ field.label }}</label>
<div class="col-sm-10">
{{ field|add_class:'form-control' }}
<span class="help-block">{{ field.errors }}</span>
</div>
</div>
{% endfor %}
{% for field in account_form %}
<div class="form-group">
<label for="{{ field.id_for_label }}" class="col-sm-2 control-label">{{ field.label }}</label>
<div class="col-sm-10">
{{ field|add_class:'form-control' }}
<span class="help-block">{{ field.errors }}</span>
</div>
</div>
{% endfor %}
{% if user_form %}
<div class="form-group">
<div class="col-sm-6 col-sm-offset-3 text-center">
<input type="submit" value="Enregistrer" class="btn btn-primary btn-lg">
</div>
</div>
{% endif %}