Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ToS agreement display #6716

Merged
merged 4 commits into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion decidim-core/app/cells/decidim/tos_page/announcement.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<%= cell("decidim/announcement", announcement_args) %>
<%= content_tag :div, nil, id: "sticky-top-stop" %>
17 changes: 17 additions & 0 deletions decidim-core/app/cells/decidim/tos_page/form.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<article class="card">
<div class="card__content">
<div class="card__header">
<h5 class="card__title text-center">
<%= t("form.legend", scope: "decidim.pages.terms_and_conditions") %>
</h5>
</div>

<div class="row column flex-center">
<%= cell "decidim/tos_page", :refuse_btn_modal %>

<%= button_to decidim.accept_tos_path, method: :put, class: "button button--nomargin small" do %>
<%= t("form.agreement", scope: "decidim.pages.terms_and_conditions") %>
<% end %>
</div>
</div>
</article>
29 changes: 0 additions & 29 deletions decidim-core/app/cells/decidim/tos_page/sticky_form.erb

This file was deleted.

2 changes: 1 addition & 1 deletion decidim-core/app/views/decidim/pages/_standalone.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</div>
</div>

<%= cell "decidim/tos_page", :sticky_form %>
<%= cell "decidim/tos_page", :form %>
</main>
</div>
</div>
2 changes: 1 addition & 1 deletion decidim-core/app/views/decidim/pages/_tabbed.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</div>
</div>

<%= cell "decidim/tos_page", :sticky_form %>
<%= cell "decidim/tos_page", :form %>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion decidim-core/spec/system/user_tos_acceptance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
it "redirects to the TOS page" do
expect(page).to have_current_path(decidim.page_path(tos_page))
expect(page).to have_content translated(tos_page.title)
expect(page).to have_content strip_tags(translated(tos_page.content))
expect(page.find(".card__content p", obscured: false)).to have_content strip_tags(translated(tos_page.content))
end

it "renders an announcement requiring to review the TOS" do
Expand Down