]> git.openstreetmap.org Git - rails.git/commitdiff
Remove pd checkbox from terms page
authorAnton Khorev <tony29@yandex.ru>
Sat, 18 Jan 2025 04:23:55 +0000 (07:23 +0300)
committerAnton Khorev <tony29@yandex.ru>
Sat, 18 Jan 2025 16:17:03 +0000 (19:17 +0300)
app/controllers/accounts/terms_controller.rb
app/views/accounts/terms/show.html.erb
config/locales/en.yml
test/controllers/accounts/terms_controller_test.rb

index 45e0cc239f4dcb465e3c50755a1fc111996c70d6..7045329888da231d7b5e0be9dcbd29f7db36fdf4 100644 (file)
@@ -34,7 +34,6 @@ module Accounts
         flash[:notice] = { :partial => "accounts/terms/terms_declined_flash" } if current_user.save
       else
         unless current_user.terms_agreed?
         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
           current_user.tou_agreed = Time.now.utc
           current_user.terms_agreed = Time.now.utc
           current_user.terms_seen = true
index 3cc52302ff8a3d537d958e4ecf65ea5ecc19a6d6..c1c0e0a89a77760da67d05d65de7ade49d9074c7 100644 (file)
     <%= 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") %>
   </div>
     <%= 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") %>
   </div>
-
-  <div class="mb-3">
-    <div class="form-check">
-      <%= check_box("user", "consider_pd", :class => "form-check-input") %>
-    <label for="user_consider_pd" class="form-check-label">
-      <%= t ".consider_pd" %>
-    </label>
-    <span class="minorNote">(<%= link_to(t(".consider_pd_why"), t(".consider_pd_why_url"), :target => :new) %>)</span>
-  </div>
 <% end %>
 <% end %>
index c802f2ab831fd7338c9902e0ccf8aac3d43df050..55b15fc8bc7eafd97ebf2465b67ea1c169e71d4b 100644 (file)
@@ -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"
         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
         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
index 76888466626f049f98860f8d11fc3c1a0bf48fb8..55b30506b41f1bba226869a57125ba088e91bb9b 100644 (file)
@@ -52,13 +52,12 @@ module Accounts
       user = create(:user, :terms_seen => false, :terms_agreed => nil)
       session_for(user)
 
       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_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
       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)
 
       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_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
       assert_not_nil user.terms_agreed
       assert user.terms_seen
     end