From 14827ad93b6d186ad805493efb79db7420309470 Mon Sep 17 00:00:00 2001 From: Diana Whitten Date: Tue, 9 Feb 2016 11:29:11 -0700 Subject: [PATCH] "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 --- horizon/templates/horizon/common/_form_field.html | 3 +++ horizon/templates/horizon/common/_form_field_required.html | 1 + horizon/templates/horizon/common/_workflow.html | 2 +- .../static/dashboard/scss/components/_workflow.scss | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 horizon/templates/horizon/common/_form_field_required.html diff --git a/horizon/templates/horizon/common/_form_field.html b/horizon/templates/horizon/common/_form_field.html index a9062fc189..54ca7c0c5f 100644 --- a/horizon/templates/horizon/common/_form_field.html +++ b/horizon/templates/horizon/common/_form_field.html @@ -11,6 +11,7 @@ {% endif %}> {{ field }} {{ field.label }} + {% if field.field.required %}{% include "horizon/common/_form_field_required.html" %}{% endif %} {% if field.help_text %} @@ -28,6 +29,7 @@ {% if field.auto_id %} {% if field.help_text %} + {% if field.field.required %}{% include "horizon/common/_form_field_required.html" %}{% endif %} {% endif %} {% endif %} @@ -50,6 +52,7 @@ {% if field.auto_id %} {% if field.help_text %} + {% if field.field.required %}{% include "horizon/common/_form_field_required.html" %}{% endif %} {% endif %} {% endif %} diff --git a/horizon/templates/horizon/common/_form_field_required.html b/horizon/templates/horizon/common/_form_field_required.html new file mode 100644 index 0000000000..bb0324b8d1 --- /dev/null +++ b/horizon/templates/horizon/common/_form_field_required.html @@ -0,0 +1 @@ + diff --git a/horizon/templates/horizon/common/_workflow.html b/horizon/templates/horizon/common/_workflow.html index bbb1b6e074..df84cc4904 100644 --- a/horizon/templates/horizon/common/_workflow.html +++ b/horizon/templates/horizon/common/_workflow.html @@ -20,7 +20,7 @@
  • {{ step }} - {% if step.has_required_fields %}{% endif %} + {% if step.has_required_fields %}{% include "horizon/common/_form_field_required.html" %}{% endif %}
  • {% endfor %} diff --git a/openstack_dashboard/static/dashboard/scss/components/_workflow.scss b/openstack_dashboard/static/dashboard/scss/components/_workflow.scss index 154331a163..f003753948 100644 --- a/openstack_dashboard/static/dashboard/scss/components/_workflow.scss +++ b/openstack_dashboard/static/dashboard/scss/components/_workflow.scss @@ -86,7 +86,7 @@ } } - .nav-tabs .hz-icon-required { + .hz-icon-required { font-size: 50%; vertical-align: top; color: $brand-primary;