Commit ecee21cc authored by Artem Serga's avatar Artem Serga

#6 - Add asterisk to required form field

parent cd25c6fc
...@@ -77,15 +77,16 @@ ...@@ -77,15 +77,16 @@
{{ form.hidden_tag() if form.hidden_tag is defined }} {{ form.hidden_tag() if form.hidden_tag is defined }}
{% for f in form if f.type != 'HiddenField' and f.type != 'CSRFTokenField' %} {% for f in form if f.type != 'HiddenField' and f.type != 'CSRFTokenField' %}
<div class="control-group{% if f.errors %} error{% endif %}"> <div class="control-group{% if f.errors %} error{% endif %}">
<div class="control-label"> <div class="control-label">
{% if h.is_required_form_field(f) %}
<strong>{{ f.label.text }}</strong>
{% else %}
{{ f.label.text }} {{ f.label.text }}
{% endif %} {% if h.is_required_form_field(f) %}
</div> <strong style="color: red">&#42;</strong>
<div class="controls"> {% else %}
&nbsp;
{% endif %}
</div>
<div class="controls">
<div> <div>
{% if not focus_set %} {% if not focus_set %}
{{ f(autofocus='autofocus')|safe }} {{ f(autofocus='autofocus')|safe }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment