diff --git a/ckanext/scheming/templates/scheming/form_snippets/repeating_subfields.html b/ckanext/scheming/templates/scheming/form_snippets/repeating_subfields.html index f714a16e..ef25a9d9 100644 --- a/ckanext/scheming/templates/scheming/form_snippets/repeating_subfields.html +++ b/ckanext/scheming/templates/scheming/form_snippets/repeating_subfields.html @@ -55,37 +55,32 @@ is_required=h.scheming_field_required(field)) %}
- {% set alert_warning = h.scheming_language_text(field.form_alert_warning) %} - {% if alert_warning %} -
- {{ alert_warning|safe }} -
- {% endif %} + {% set alert_warning = h.scheming_language_text(field.form_alert_warning) %} + {% if alert_warning %} +
+ {{ alert_warning|safe }} +
+ {% endif %} - {%- set group_data = data[field.field_name] -%} - {%- set group_count = group_data|length -%} - {%- if not group_count and 'id' not in data -%} - {%- set group_count = field.form_blanks|default(1) -%} - {%- endif -%} + {%- set group_data = data[field.field_name] -%} + {%- set group_count = group_data|length -%} + {%- if not group_count and 'id' not in data -%} + {%- set group_count = field.form_blanks|default(1) -%} + {%- endif -%} -
- {% for index in range(group_count) %} - {{ repeating_panel(index, index + 1) }} - {% endfor %} -
-
- {% block add_button %}{% block add_button_text %} {{ _('Add') }}{% endblock %}{% endblock %} +
+ {% for index in range(group_count) %} + {{ repeating_panel(index, index + 1) }} + {% endfor %} +
+
+ {% block add_button %}{% block add_button_text %} {{ _('Add') }}{% endblock %}{% endblock %} - {% set help_text = h.scheming_language_text(field.help_text) %} - {% if help_text %} -
- {{ help_text }} -
- {% endif %} -
+ {%- snippet 'scheming/form_snippets/help_text.html', field=field -%} +
-
{{ repeating_panel('REPEATING-INDEX0', 'REPEATING-INDEX1') }}
+
{{ repeating_panel('REPEATING-INDEX0', 'REPEATING-INDEX1') }}
{% endcall %}