Skip to content

Commit

Permalink
Merge pull request #2550 from alphagov/fix-accordion-issues
Browse files Browse the repository at this point in the history
Accordion `show/hide all sections` not working on manual pages
  • Loading branch information
gclssvglx authored Sep 15, 2022
2 parents 21d4a99 + ca58c43 commit 5b9234c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/views/content_items/manual_section.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@

{
data_attributes: {
module: "ga4-event-tracker",
ga4: {
event_name: "select_content",
type: "accordion",
Expand Down Expand Up @@ -90,6 +89,9 @@
data_attributes_show_all: {
"ga4": ga4_attributes.to_json
},
data_attributes: {
module: "ga4-event-tracker",
},
anchor_navigation: true,
items: items,
} %>
Expand Down
4 changes: 3 additions & 1 deletion app/views/content_items/manuals/_updates.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
%>
<%= render "govuk_publishing_components/components/accordion", {
heading_level: 3,
data_attributes: {
module: "ga4-event-tracker",
},
data_attributes_show_all: {
"ga4": show_all_attributes.to_json
},
Expand All @@ -46,7 +49,6 @@
<% end
{
data_attributes: {
module: "ga4-event-tracker",
ga4: {
event_name: 'select_content',
type: 'accordion',
Expand Down

0 comments on commit 5b9234c

Please sign in to comment.