From: Simon Poole Date: Sun, 21 Oct 2018 08:39:56 +0000 (+0200) Subject: Add links to the ToU and include them in signup X-Git-Tag: live~2553^2~15 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/077834704e79259e60967b0cde8f8785017e9145?ds=sidebyside Add links to the ToU and include them in signup - this adds links to the ToU in the Welcome box and on the About page - adds a timestamp column to the users table to record acceptance of the ToU - require ToU to be accepted before signup can proceed - rearrange and change text on signup page --- diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 9b97fa0a1..e382f1531 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -53,6 +53,7 @@ class UsersController < ApplicationController elsif current_user unless current_user.terms_agreed? current_user.consider_pd = params[:user][:consider_pd] + current_user.tou_agreed = Time.now.getutc current_user.terms_agreed = Time.now.getutc current_user.terms_seen = true @@ -73,6 +74,7 @@ class UsersController < ApplicationController current_user.creation_ip = request.remote_ip current_user.languages = http_accept_language.user_preferred_languages current_user.terms_agreed = Time.now.getutc + current_user.tou_agreed = Time.now.getutc current_user.terms_seen = true if current_user.auth_uid.blank? diff --git a/app/models/user.rb b/app/models/user.rb index 9f1310843..dbe91ab0f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -34,6 +34,7 @@ # image_content_type :string # auth_provider :string # home_tile :integer +# tou_agreed :datetime # # Indexes # diff --git a/app/views/layouts/map.html.erb b/app/views/layouts/map.html.erb index 4d37cdfb8..b0d99893a 100644 --- a/app/views/layouts/map.html.erb +++ b/app/views/layouts/map.html.erb @@ -48,8 +48,10 @@ :bytemark => link_to(t("layouts.partners_bytemark"), "https://www.bytemark.co.uk"), :partners => link_to(t("layouts.partners_partners"), "https://hardware.openstreetmap.org/thanks/") %>

- <%= t("layouts.learn_more") %> - <%= t("layouts.start_mapping") %> +

<%= t 'layouts.intro_tou_html', :tou_link => link_to(t('layouts.tou'), "https://wiki.osmfoundation.org/wiki/Terms_of_Use") %> +

+ <%= t('layouts.learn_more') %> + <%= t('layouts.start_mapping') %> <% end %> diff --git a/app/views/users/terms.html.erb b/app/views/users/terms.html.erb index a93ecb0a1..18b86dd12 100644 --- a/app/views/users/terms.html.erb +++ b/app/views/users/terms.html.erb @@ -9,7 +9,12 @@ <%= form_tag({ :action => "save" }, { :class => " inner22 standard-form fillL" }) do %> +

<%= t '.read and accept' %>

+
+

<%= t '.contributor_terms_explain' %>

@@ -28,27 +33,36 @@ <%= render :partial => "terms" %>
+
+

+ <%= raw t '.guidance', + :summary => 'https://www.osmfoundation.org/wiki/License/Contributor_Terms_Summary', + :translations => 'https://www.osmfoundation.org/wiki/License/Contributor_Terms/Informal_Translations' %> +

+
+ + +

<%= t '.tou_explain' %>

-
<% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 569992599..37053cb44 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1089,6 +1089,8 @@ en: partners_ucl: "UCL" partners_bytemark: "Bytemark Hosting" partners_partners: "partners" + intro_tou_html: "Use of this site is subject to our %{tou_link}." + tou: "Terms of Use" osm_offline: "The OpenStreetMap database is currently offline while essential database maintenance work is carried out." osm_read_only: "The OpenStreetMap database is currently in read-only mode while essential database maintenance work is carried out." donate: "Support OpenStreetMap by %{link} to the Hardware Upgrade Fund." @@ -1299,7 +1301,7 @@ en: This site and many other related services are formally operated by the OpenStreetMap Foundation (OSMF) on behalf of the community. Use of all OSMF operated services is subject - to our + to our Terms of Use, Acceptable Use Policies and our Privacy Policy
Please contact the OSMF @@ -2025,10 +2027,14 @@ en: terms declined: "We are sorry that you have decided to not accept the new Contributor Terms. For more information, please see this wiki page." terms declined url: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined terms: - title: "Contributor terms" - heading: "Contributor terms" - read and accept: "Please read the agreement and press the agree button to confirm that you accept the terms of this agreement for your existing and future contributions." - consider_pd: "In addition to the above agreement, I consider my contributions to be in the Public Domain" + title: "Terms" + heading: "Terms" + heading_ct: "Contributor terms" + read and accept: "Please read the contributor agreement and the terms of use, check the checkbox when done and then press the agree button to confirm that you accept the terms of both documents." + contributor_terms_explain: "This agreement governs the terms for your existing and future contributions." + tou_explain: "These terms govern the use of the website and other infrastructure provided by the OSMF." + read_tou_html: "I have read and agree to the %{tou_link}" + 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://www.osmfoundation.org/wiki/License/Why_would_I_want_my_contributions_to_be_public_domain guidance: 'Information to help understand these terms: a human readable summary and some informal translations' diff --git a/db/migrate/20181020114000_add_user_tou_agreed.rb b/db/migrate/20181020114000_add_user_tou_agreed.rb new file mode 100644 index 000000000..ea89c6c09 --- /dev/null +++ b/db/migrate/20181020114000_add_user_tou_agreed.rb @@ -0,0 +1,5 @@ +class AddUserTouAgreed < ActiveRecord::Migration[5.1] + def change + add_column :users, :tou_agreed, :datetime + end +end