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 | 424984867fc08f6b65a2b9ab58d31562c6e9f75d (patch) | |
tree | ddae952b1df92c12e6004e9a670ee84640bbb158 /ishtar_common/templates | |
parent | b77b736baa87c237ea19b30b9fa94b51b710c1c8 (diff) | |
download | Ishtar-424984867fc08f6b65a2b9ab58d31562c6e9f75d.tar.bz2 Ishtar-424984867fc08f6b65a2b9ab58d31562c6e9f75d.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}} |