"Required" fields are no longer visually indicated

During a refactor, the required field asterisk was unintentionally
removed from some of hte workflows (those not using _workflow.html).
This has been fixed, and now both implementations are making use of
the same template, alleviating dual maintenance in the future.

Closes-bug: #1543717

Change-Id: Ia8672e1e62b077c91c364bc62e16ee36625bda20
This commit is contained in:
Diana Whitten 2016-02-09 11:29:11 -07:00
parent de3ae40fb5
commit 14827ad93b
4 changed files with 6 additions and 2 deletions

View File

@ -11,6 +11,7 @@
{% endif %}>
{{ field }}
<span>{{ field.label }}</span>
{% if field.field.required %}{% include "horizon/common/_form_field_required.html" %}{% endif %}
{% if field.help_text %}
<span class="help-icon" data-toggle="tooltip"
data-placement="top" title="{{ field.help_text|safe }}">
@ -28,6 +29,7 @@
{% if field.auto_id %}
<label class="control-label {{ classes.label }} {% if field.field.required %}{{ form.required_css_class }}{% endif %}">{{ field.label }}</label>
{% if field.help_text %}
{% if field.field.required %}{% include "horizon/common/_form_field_required.html" %}{% endif %}
<span class="help-icon" data-toggle="tooltip" data-placement="top" title="{{ field.help_text|safe }}"><span class="fa fa-question-circle"></span></span>
{% endif %}
{% endif %}
@ -50,6 +52,7 @@
{% if field.auto_id %}
<label class="control-label {{ classes.label }} {% if field.field.required %}{{ form.required_css_class }}{% endif %}" for="{{ field.auto_id }}">{{ field.label }}</label>
{% if field.help_text %}
{% if field.field.required %}{% include "horizon/common/_form_field_required.html" %}{% endif %}
<span class="help-icon" data-toggle="tooltip" data-placement="top" title="{{ field.help_text|safe }}"><span class="fa fa-question-circle"></span></span>
{% endif %}
{% endif %}

View File

@ -0,0 +1 @@
<span class="hz-icon-required fa fa-asterisk"></span>

View File

@ -20,7 +20,7 @@
<li class="{% if entry_point == step.slug %}active{% endif %}{% if step.has_errors %} error{% endif %}{% if step.has_required_fields %} required{% endif %}">
<a href="#{{ step.get_id }}" data-toggle="tab" data-target="#{{ step.get_id }}">
{{ step }}
{% if step.has_required_fields %}<span class="hz-icon-required fa fa-asterisk"></span>{% endif %}
{% if step.has_required_fields %}{% include "horizon/common/_form_field_required.html" %}{% endif %}
</a>
</li>
{% endfor %}

View File

@ -86,7 +86,7 @@
}
}
.nav-tabs .hz-icon-required {
.hz-icon-required {
font-size: 50%;
vertical-align: top;
color: $brand-primary;