File tree Expand file tree Collapse file tree
cells/decidim/initiatives/content_blocks/highlighted_initiatives
helpers/decidim/initiatives Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 < div class ="row small-up-1 smallmedium-up-2 mediumlarge-up-3 large-up-4 card-grid ">
66 <% highlighted_initiatives . each do |initiative | %>
77 < div class ="column ">
8- < article class ="card card--initiative card--mini ">
8+ < div class ="card card--initiative card--mini ">
99 <%= link_to decidim_initiatives . initiative_path ( initiative ) , class : "card__link" do %>
1010 < span class ="show-for-sr "> <%= translated_attribute initiative . title %> </ span >
1111 <% end %>
1414 < span class ="card__title "> <%= decidim_html_escape ( translated_attribute ( initiative . title ) ) %> </ span >
1515 <% end %>
1616 </ div >
17- </ article >
17+ </ div >
1818 </ div >
1919 <% end %>
2020 </ div >
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ module InitiativesHelper
77 def initiatives_filter_form_for ( filter )
88 content_tag :div , class : "filters" do
99 form_for filter ,
10+ namespace : filter_form_namespace ,
1011 builder : Decidim ::Initiatives ::InitiativesFilterFormBuilder ,
1112 url : url_for ,
1213 as : :filter ,
@@ -17,6 +18,15 @@ def initiatives_filter_form_for(filter)
1718 end
1819 end
1920 end
21+
22+ private
23+
24+ # Creates a unique namespace for a filter form to prevent dupliacte IDs in
25+ # the DOM when multiple filter forms are rendered with the same fields (e.g.
26+ # for desktop and mobile).
27+ def filter_form_namespace
28+ "filters_#{ SecureRandom . uuid } "
29+ end
2030 end
2131 end
2232end
Original file line number Diff line number Diff line change 11<%= render "layouts/decidim/application" do %>
22 <% if wizard_steps.first == step %>
33 <div class ="wrapper ">
4- <%= yield %>
5- </ div >
4+ <%= yield %>
65 </ div >
76 <% else %>
87 < div class ="wrapper ">
You can’t perform that action at this time.
0 commit comments