summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-07-09 19:20:12 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-07-08 09:58:47 +0200
commitfaa399bb5232883d51f848a2795d33853896cc8f (patch)
treef65f72441311e7378b90674a31e3109034aca890 /ishtar_common/templates
parent79b20fb764a37205bca7b1f7c0f41bd19e5aa0c8 (diff)
downloadIshtar-faa399bb5232883d51f848a2795d33853896cc8f.tar.bz2
Ishtar-faa399bb5232883d51f848a2795d33853896cc8f.zip
Preventive file: work on inlines
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/blocks/bs_field_snippet.html17
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 %}