mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
Improve password form formatting
Borrow the formatting from some of our other forms which looks much nicer (and shows field errors properly). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
047fc704f7
commit
54c9ac8e43
|
@ -3,7 +3,28 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form method="post" action=".">
|
<form method="post" action=".">
|
||||||
{{ form.as_p }}
|
{% for hidden in form.hidden_fields %}
|
||||||
|
{{ hidden }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for field in form.visible_fields %}
|
||||||
|
{% if field.name in form.errors %}
|
||||||
|
<div class="form-group alert alert-danger">
|
||||||
|
{{ field.errors }}
|
||||||
|
{% else %}
|
||||||
|
<div class="form-group">
|
||||||
|
{% endif %}
|
||||||
|
<div class="control-label {% if field.required %}requiredlabel{% endif %}">
|
||||||
|
{{ field.label_tag }}
|
||||||
|
</div>
|
||||||
|
<div class="controls">
|
||||||
|
{{ field }}
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
{{ field.help_text|safe }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
<input type="submit" class="btn btn-default" value="{% trans 'Submit' %}" />
|
<input type="submit" class="btn btn-default" value="{% trans 'Submit' %}" />
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
|
@ -6,7 +6,28 @@
|
||||||
{% if validlink %}
|
{% if validlink %}
|
||||||
|
|
||||||
<form id="password_form" method="post" action=".">
|
<form id="password_form" method="post" action=".">
|
||||||
{{ form.as_p }}
|
{% for hidden in form.hidden_fields %}
|
||||||
|
{{ hidden }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for field in form.visible_fields %}
|
||||||
|
{% if field.name in form.errors %}
|
||||||
|
<div class="form-group alert alert-danger">
|
||||||
|
{{ field.errors }}
|
||||||
|
{% else %}
|
||||||
|
<div class="form-group">
|
||||||
|
{% endif %}
|
||||||
|
<div class="control-label {% if field.required %}requiredlabel{% endif %}">
|
||||||
|
{{ field.label_tag }}
|
||||||
|
</div>
|
||||||
|
<div class="controls">
|
||||||
|
{{ field }}
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
{{ field.help_text|safe }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
<input type="submit" class="btn btn-default" value="{% trans 'Submit' %}" />
|
<input type="submit" class="btn btn-default" value="{% trans 'Submit' %}" />
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
|
@ -3,7 +3,28 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form id="password_form" method="post" action=".">
|
<form id="password_form" method="post" action=".">
|
||||||
{{ form.as_p }}
|
{% for hidden in form.hidden_fields %}
|
||||||
|
{{ hidden }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for field in form.visible_fields %}
|
||||||
|
{% if field.name in form.errors %}
|
||||||
|
<div class="form-group alert alert-danger">
|
||||||
|
{{ field.errors }}
|
||||||
|
{% else %}
|
||||||
|
<div class="form-group">
|
||||||
|
{% endif %}
|
||||||
|
<div class="control-label {% if field.required %}requiredlabel{% endif %}">
|
||||||
|
{{ field.label_tag }}
|
||||||
|
</div>
|
||||||
|
<div class="controls">
|
||||||
|
{{ field }}
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
{{ field.help_text|safe }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
<input type="submit" class="btn btn-default" value="{% trans 'Submit' %}" />
|
<input type="submit" class="btn btn-default" value="{% trans 'Submit' %}" />
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user