summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
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
commit424984867fc08f6b65a2b9ab58d31562c6e9f75d (patch)
treeddae952b1df92c12e6004e9a670ee84640bbb158 /ishtar_common/templates
parentb77b736baa87c237ea19b30b9fa94b51b710c1c8 (diff)
downloadIshtar-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.html2
-rw-r--r--ishtar_common/templates/blocks/bs_form_snippet.html2
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}}