Closed themowski closed 10 months ago
My team is using release-3.0.0.
release-3.0.0
I noticed that the form_snippets/repeating_subfields.html file does not use the form_snippets/help_text.html file that other snippets use. This results in the help text being inconsistently formatted when compared to other fields that specify help text.
form_snippets/repeating_subfields.html
form_snippets/help_text.html
We applied this patch, and it seemed to fix the issue:
diff --git a/ckanext-scheming/ckanext/scheming/templates/scheming/form_snippets/repeating_subfields.html b/ckanext-scheming/ckanext/scheming/templates/scheming/form_snippets/repeating_subfields.html index f714a16..9d5aa2b 100644 --- a/ckanext-scheming/ckanext/scheming/templates/scheming/form_snippets/repeating_subfields.html +++ b/ckanext-scheming/ckanext/scheming/templates/scheming/form_snippets/repeating_subfields.html @@ -77,12 +77,7 @@ {% block add_button %}<a href="javascript:;" name="repeating-add" class="btn btn-link" >{% block add_button_text %}<i class="fa fa-plus" aria-hidden="true"></i> {{ _('Add') }}{% endblock %}</a>{% endblock %} - {% set help_text = h.scheming_language_text(field.help_text) %} - {% if help_text %} - <div class="info-block mrgn-tp-md"> - {{ help_text }} - </div> - {% endif %} + {%- snippet 'scheming/form_snippets/help_text.html', field=field -%} </div> <div name="repeating-template" style="display:none">{{ repeating_panel('REPEATING-INDEX0', 'REPEATING-INDEX1') }}</div>
On an unrelated note, the repeating_subfields.html file uses a mix of tabs & spaces on the same line in multiple spots -- not sure if that's something you want to tweak as well.
repeating_subfields.html
@themowski sounds good, would you care to submit a PR with these changes?
Sure, I'll try to get something submitted sooner rather than later.
My team is using
release-3.0.0
.I noticed that the
form_snippets/repeating_subfields.html
file does not use theform_snippets/help_text.html
file that other snippets use. This results in the help text being inconsistently formatted when compared to other fields that specify help text.We applied this patch, and it seemed to fix the issue:
On an unrelated note, the
repeating_subfields.html
file uses a mix of tabs & spaces on the same line in multiple spots -- not sure if that's something you want to tweak as well.