From: Anton Khorev Date: Sat, 18 Jan 2025 04:23:55 +0000 (+0300) Subject: Remove pd checkbox from terms page X-Git-Tag: live~159^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/41a1867043fd9441578f8653a375963024a22676 Remove pd checkbox from terms page --- diff --git a/app/controllers/accounts/terms_controller.rb b/app/controllers/accounts/terms_controller.rb index 45e0cc239..704532988 100644 --- a/app/controllers/accounts/terms_controller.rb +++ b/app/controllers/accounts/terms_controller.rb @@ -34,7 +34,6 @@ module Accounts flash[:notice] = { :partial => "accounts/terms/terms_declined_flash" } if current_user.save else unless current_user.terms_agreed? - current_user.consider_pd = params[:user][:consider_pd] current_user.tou_agreed = Time.now.utc current_user.terms_agreed = Time.now.utc current_user.terms_seen = true diff --git a/app/views/accounts/terms/show.html.erb b/app/views/accounts/terms/show.html.erb index 3cc52302f..c1c0e0a89 100644 --- a/app/views/accounts/terms/show.html.erb +++ b/app/views/accounts/terms/show.html.erb @@ -72,13 +72,4 @@ <%= submit_tag(t(".continue"), :name => "continue", :id => "continue", :disabled => true, :class => "btn btn-primary") %> <%= submit_tag(t(".cancel"), :name => "decline", :id => "decline", :class => "btn btn-outline-secondary") %> - -
-
- <%= check_box("user", "consider_pd", :class => "form-check-input") %> - - (<%= link_to(t(".consider_pd_why"), t(".consider_pd_why_url"), :target => :new) %>) -
<% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index c802f2ab8..55b15fc8b 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -306,9 +306,6 @@ en: read_ct: "I have read and agree to the above contributor terms" tou_explain_html: "These %{tou_link} govern the use of the website and other infrastructure provided by the OSMF. Please click on the link, read and agree to the text." read_tou: "I have read and agree to the Terms of Use" - consider_pd: "In addition to the above, I consider my contributions to be in the Public Domain" - consider_pd_why: "what's this?" - consider_pd_why_url: https://osmfoundation.org/wiki/Licence_and_Legal_FAQ/Why_would_I_want_my_contributions_to_be_public_domain guidance_info_html: "Information to help understand these terms: a %{readable_summary_link} and some %{informal_translations_link}" readable_summary: human readable summary informal_translations: informal translations diff --git a/test/controllers/accounts/terms_controller_test.rb b/test/controllers/accounts/terms_controller_test.rb index 768884666..55b30506b 100644 --- a/test/controllers/accounts/terms_controller_test.rb +++ b/test/controllers/accounts/terms_controller_test.rb @@ -52,13 +52,12 @@ module Accounts user = create(:user, :terms_seen => false, :terms_agreed => nil) session_for(user) - put account_terms_path, :params => { :user => { :consider_pd => true }, :read_ct => 1, :read_tou => 1 } + put account_terms_path, :params => { :read_ct => 1, :read_tou => 1 } assert_redirected_to edit_account_path assert_equal "Thanks for accepting the new contributor terms!", flash[:notice] user.reload - assert user.consider_pd assert_not_nil user.terms_agreed assert user.terms_seen end @@ -67,13 +66,12 @@ module Accounts user = create(:user, :terms_seen => false, :terms_agreed => nil) session_for(user) - put account_terms_path, :params => { :user => { :consider_pd => true }, :referer => "/test", :read_ct => 1, :read_tou => 1 } + put account_terms_path, :params => { :referer => "/test", :read_ct => 1, :read_tou => 1 } assert_redirected_to "/test" assert_equal "Thanks for accepting the new contributor terms!", flash[:notice] user.reload - assert user.consider_pd assert_not_nil user.terms_agreed assert user.terms_seen end