Skip to content

Commit

Permalink
Remove sticky from tos agreement (#6716) (#6954)
Browse files Browse the repository at this point in the history
* Remove sticky from tos agreement

* Modify tests to check visibility of modified TOS

* Remove i18n files

Co-authored-by: Dynnammo <33259633+Dynnammo@users.noreply.github.com>
  • Loading branch information
armandfardeau and Dynnammo committed Dec 3, 2020
1 parent 735d9c2 commit 1299e15
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 33 deletions.
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

0 comments on commit 1299e15

Please sign in to comment.