diff --git a/app/assets/javascripts/collapsibleCheckboxes.js b/app/assets/javascripts/collapsibleCheckboxes.js index 97957b3d1..7c8b5bae0 100644 --- a/app/assets/javascripts/collapsibleCheckboxes.js +++ b/app/assets/javascripts/collapsibleCheckboxes.js @@ -20,7 +20,7 @@ this.addFooterAndDoneButton(); // create summary from component pieces and match text to current selection - this.summary.$el = this.summary.create(this.getSelection(), this.total); + this.summary.addContent(); this.summary.update(this.getSelection(), this.total, this.fieldLabel); this.$fieldset.before(this.summary.$el); @@ -55,15 +55,15 @@ } } }, - create: function() { - const $el = $(`
- -
`); + addContent: function() { + const $content = $(`+ +
`); - this.$text = $el.find('span'); - this.$changeButton = $el.find('button'); + this.$text = $content.find('span'); + this.$changeButton = $content.find('button'); - return $el; + this.$el.append($content); }, update: function(selection, total, field) { let template; diff --git a/app/templates/components/select-input.html b/app/templates/components/select-input.html index a42f00a9f..f65647647 100644 --- a/app/templates/components/select-input.html +++ b/app/templates/components/select-input.html @@ -38,6 +38,9 @@ {% macro select_wrapper(field, hint=None, disable=[], option_hints={}, hide_legend=False, collapsible_opts={}, legend_style="text") %} {% set is_collapsible = collapsible_opts|length %}