Add help-text/label components
This commit is contained in:
parent
0a3abab6bc
commit
2e857818da
4 changed files with 7 additions and 5 deletions
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<fieldset class="fieldset form__fieldset">
|
||||
<a class="link" href="{% url 'accounts:password-reset' %}">
|
||||
<small class="small">I forgot my password</small>
|
||||
<small class="small">{% trans "I forgot my password" %}</small>
|
||||
</a>
|
||||
</fieldset>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -22,13 +22,11 @@
|
|||
|
||||
{% for field in form.visible_fields %}
|
||||
<fieldset class="fieldset form__fieldset">
|
||||
<label class="label form__label" for="{{ field.name }}">
|
||||
{{ field.label }}
|
||||
</label>
|
||||
{% include "components/form/label.html" %}
|
||||
|
||||
{{ field.errors }}
|
||||
{{ field }}
|
||||
<small class="small helptext">{{ field.help_text }}</small>
|
||||
{% include "components/form/help-text.html" %}
|
||||
</fieldset>
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
|
|
|||
1
src/newsreader/templates/components/form/help-text.html
Normal file
1
src/newsreader/templates/components/form/help-text.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<small class="small helptext">{{ field.help_text }}</small>
|
||||
3
src/newsreader/templates/components/form/label.html
Normal file
3
src/newsreader/templates/components/form/label.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<label class="label form__label" for="{{ field.name }}">
|
||||
{{ field.label }}
|
||||
</label>
|
||||
Loading…
Add table
Add a link
Reference in a new issue