Skip to content

Commit

Permalink
revert: "feat: Add newsletter to registration form (#152)"
Browse files Browse the repository at this point in the history
This reverts commit 585fd97.
  • Loading branch information
Quentinchampenois committed Dec 11, 2023
1 parent 3ee3b25 commit c03acf9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
1 change: 0 additions & 1 deletion app/forms/decidim/registration_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class RegistrationForm < Form
attribute :metropolis_residential_area, String
attribute :metropolis_work_area, String
attribute :gender, String
attribute :newsletter, Boolean
attribute :tos_agreement, Boolean
attribute :additional_tos, Boolean
attribute :current_locale, String
Expand Down
13 changes: 0 additions & 13 deletions app/views/decidim/devise/registrations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,6 @@
</div>
</div>

<div class="card" id="card__newsletter">
<div class="card__content">
<legend><%= t(".newsletter_title") %></legend>
<div class="row">
<div class="columns additional_tos_checkboxes">
<div class="field">
<%= f.check_box :newsletter, label: t(".newsletter"), checked: @form.newsletter %>
</div>
</div>
</div>
</div>
</div>

<div class="card" id="card__additional_tos">
<div class="card__content">
<legend><%= t(".additional_tos_title") %></legend>
Expand Down
7 changes: 2 additions & 5 deletions spec/system/examples/registration_password_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
expect(page).to have_field("registration_user_nickname", with: "")
expect(page).to have_field("registration_user_email", with: "")
expect(page).to have_field("registration_user_password", with: "")
expect(page).to have_field("registration_user_newsletter", checked: false)
expect(page).not_to have_field("registration_user_newsletter", checked: false)
end

it "creates a new User" do
Expand Down Expand Up @@ -84,7 +84,6 @@

check :registration_user_tos_agreement
check :registration_user_additional_tos
check :registration_user_newsletter

check :registration_user_additional_tos
find("*[type=submit]").click
Expand All @@ -108,7 +107,7 @@
expect(page).to have_field("registration_user_email", with: "")
expect(page).to have_field("registration_user_password", with: "")
expect(page).to have_field("registration_user_password_confirmation", with: "")
expect(page).to have_field("registration_user_newsletter", checked: false)
expect(page).not_to have_field("registration_user_newsletter", checked: false)
end

it "creates a new User" do
Expand All @@ -127,7 +126,6 @@
select "1992", from: :registration_user_year

fill_in :registration_user_password_confirmation, with: "nonsense"
check :registration_user_newsletter
check :registration_user_tos_agreement
check :registration_user_additional_tos
find("*[type=submit]").click
Expand Down Expand Up @@ -164,7 +162,6 @@
select "1992", from: :registration_user_year

fill_in :registration_user_password_confirmation, with: "DfyvHn425mYAy2HL"
check :registration_user_newsletter
check :registration_user_tos_agreement
check :registration_user_additional_tos
check :registration_user_newsletter
Expand Down

0 comments on commit c03acf9

Please sign in to comment.