diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-07-09 19:20:12 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-07-29 11:56:34 +0200 |
commit | cc6d9d22d724fb39a5b7d30255e6bab2adc78763 (patch) | |
tree | 8f2cb2984a7ececc7f683df42c02daa689f6644b /ishtar_common | |
parent | 2836cae57302f572bf3993a53fc61d4ffe56f16e (diff) | |
download | Ishtar-cc6d9d22d724fb39a5b7d30255e6bab2adc78763.tar.bz2 Ishtar-cc6d9d22d724fb39a5b7d30255e6bab2adc78763.zip |
Preventive file: work on inlines
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/templates/blocks/bs_field_snippet.html | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/ishtar_common/templates/blocks/bs_field_snippet.html b/ishtar_common/templates/blocks/bs_field_snippet.html index beecf624f..86ec89e84 100644 --- a/ishtar_common/templates/blocks/bs_field_snippet.html +++ b/ishtar_common/templates/blocks/bs_field_snippet.html @@ -1,5 +1,5 @@ {% load i18n %} - <div id="main_div-{{field.auto_id}}" class="form-group{% if not field.label %} no-label{% endif %} {% if bs_col_width %}{{bs_col_width}}{% elif field.field.widget.attrs.bs_col_width %}{{field.field.widget.attrs.bs_col_width}}{% else %}{% if field.field.widget.attrs.cols or force_large_col %}col-lg-12{% else %}col-lg-6{% endif %}{% endif %}{% if field.errors %} is-invalid{% endif %}{% if field.field.required %} required{% endif %}{% if force_large_col %} full-width{% endif %}" + <div id="main_div-{{field.auto_id}}" class="form-group{% if not field.label %} no-label{% endif %} {% if field.field.widget.attrs.bs_col_width %}{{field.field.widget.attrs.bs_col_width}}{% elif bs_col_width %}{{bs_col_width}}{% else %}{% if field.field.widget.attrs.cols or force_large_col %}col-lg-12{% else %}col-lg-6{% endif %}{% endif %}{% if field.errors %} is-invalid{% endif %}{% if field.field.required %} required{% endif %}{% if force_large_col %} full-width{% endif %}" data-alt-name="{{field.field.alt_name}}"> {% if field.label %}{{ field.label_tag }}{% endif %} {% if extra_field_label %}<label><em>{{extra_field_label}}</em></label>{% endif %} @@ -7,17 +7,24 @@ {% if field.field.order_number %}<span class="badge badge-pill badge-success field-tip"> {{field.field.order_number}} </span>{% endif %}{% endif %} - {% if field.help_text %} + {% if field.help_text or field.field.unit %} <div class="input-group"> {% endif %} {{field|safe}} - {% if field.help_text %} + {% if field.help_text or field.field.unit %} <span class="input-group-append"> + {% if field.field.unit %} + <a class="input-group-text unit-label"> + {{field.field.unit}} + </a> + {% endif %} + {% if field.help_text %} <a class="input-group-text" data-toggle="collapse" href="#{{field.auto_id}}_help" aria-expanded="false" aria-controls="{{field.auto_id}}_help"> <i class="fa fa-question-circle" aria-hidden="true"></i> </a> + {% endif %} </span> {% if field.errors %}<div class="invalid"> {{ field.errors }} @@ -25,11 +32,11 @@ </div> <div class="collapse" id="{{field.auto_id}}_help"> <div class="card card-body help-text"> - {{field.help_text}} + {{field.hep_text}} </div> </div> {% endif %} - {% if field.errors and not field.help_text %} + {% if field.errors and not field.help_text and not field.unit %} <div class="invalid"> {{ field.errors }} </div>{% endif %} |