diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-09-16 19:03:52 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-09-16 19:03:52 +0200 |
commit | 6faa859d7dc69ee873bda8e5e695ce4332462435 (patch) | |
tree | ddae952b1df92c12e6004e9a670ee84640bbb158 /ishtar_common/templates | |
parent | 29e1f9e5af6aeee97f2b35d8cf19f588d524274d (diff) | |
download | Ishtar-6faa859d7dc69ee873bda8e5e695ce4332462435.tar.bz2 Ishtar-6faa859d7dc69ee873bda8e5e695ce4332462435.zip |
Forms: manage conditionnal field inside a same form with JS
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r-- | ishtar_common/templates/blocks/bs_field_snippet.html | 2 | ||||
-rw-r--r-- | ishtar_common/templates/blocks/bs_form_snippet.html | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/ishtar_common/templates/blocks/bs_field_snippet.html b/ishtar_common/templates/blocks/bs_field_snippet.html index b89727327..644f7f433 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 class="form-group{% if not field.label %} no-label{% endif %} {% if field.field.widget.attrs.cols or force_large_col %}col-lg-12{% else %}col-lg-6{% 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.cols or force_large_col %}col-lg-12{% else %}col-lg-6{% 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 show_field_number or form.show_field_number %} diff --git a/ishtar_common/templates/blocks/bs_form_snippet.html b/ishtar_common/templates/blocks/bs_form_snippet.html index 98d9e0fe6..124ecfb5e 100644 --- a/ishtar_common/templates/blocks/bs_form_snippet.html +++ b/ishtar_common/templates/blocks/bs_form_snippet.html @@ -125,3 +125,5 @@ $(register_advanced_search); </script> {% endif %} + +{{form.extra_render|safe}} |