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
This commit is contained in:
Simon Poole 2018-10-21 10:39:56 +02:00
parent da66044021
commit 077834704e
6 changed files with 51 additions and 21 deletions

View file

@ -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/") %>
</p>
<a class="button learn-more" href="<%= about_path %>"><%= t("layouts.learn_more") %></a>
<a class="button sign-up" href="<%= user_new_path %>"><%= t("layouts.start_mapping") %></a>
<p><%= t 'layouts.intro_tou_html', :tou_link => link_to(t('layouts.tou'), "https://wiki.osmfoundation.org/wiki/Terms_of_Use") %>
</p>
<a class="button learn-more" href="<%= about_path %>"><%= t('layouts.learn_more') %></a>
<a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.start_mapping') %></a>
</div>
<% end %>

View file

@ -9,7 +9,12 @@
<%= form_tag({ :action => "save" }, { :class => " inner22 standard-form fillL" }) do %>
<!-- legale is <%= @legale %> -->
<p class="deemphasize"><%= t '.read and accept' %></p>
<label class="standard-label">
<%= t '.heading_ct' %>
</label>
<div class='form-row horizontal-list'>
<p class="deemphasize"><%= t '.contributor_terms_explain' %></p>
<label class="standard-label">
<%= t ".legale_select" %>
</label>
@ -28,27 +33,36 @@
<%= render :partial => "terms" %>
</div>
<div class="deemphasize">
<p id="contributorGuidance">
<%= raw t '.guidance',
:summary => 'https://www.osmfoundation.org/wiki/License/Contributor_Terms_Summary',
:translations => 'https://www.osmfoundation.org/wiki/License/Contributor_Terms/Informal_Translations' %>
</p>
</div>
<label class="standard-label">
<%= t 'layouts.tou' %>
</label>
<p class="deemphasize"><%= t '.tou_explain' %></p>
<div class="form-row">
<label for="user_consider_pd">
<%= check_box("user", "consider_pd") %>
<%= t ".consider_pd" %>
<label for="read_tou">
<%= check_box_tag 'read_tou',1,false,:onclick=>"agreebtn = document.getElementById('agree');agreebtn.disabled=!this.checked;"%>
<%= t '.read_tou_html', :tou_link => link_to(t('layouts.tou'), "https://wiki.osmfoundation.org/wiki/Terms_of_Use", :target => :new) %>
</label>
<span class="minorNote">(<%= link_to(t(".consider_pd_why"), t(".consider_pd_why_url"), :target => :new) %>)</span>
<%= hidden_field_tag("referer", h(params[:referer])) unless params[:referer].nil? %>
<div class="buttons form-row inner20 clearfix">
<p class="deemphasize"><%= t ".read and accept" %></p>
<%= submit_tag(t(".agree"), :name => "agree", :id => "agree") %>
<%= submit_tag(t(".decline"), :name => "decline", :id => "decline") %>
<%= submit_tag(t('.agree'), :name => "agree", :id => "agree", disabled: true) %>
<%= submit_tag(t('.decline'), :name => "decline", :id => "decline") %>
</div>
<div class="deemphasize">
<p id="contributorGuidance">
<%= raw t ".guidance",
:summary => "https://www.osmfoundation.org/wiki/License/Contributor_Terms_Summary",
:translations => "https://www.osmfoundation.org/wiki/License/Contributor_Terms/Informal_Translations" %>
</p>
</div>
<label for="user_consider_pd">
<%= check_box('user', 'consider_pd') %>
<%= t '.consider_pd' %>
</label>
<span class="minorNote">(<%= link_to(t('.consider_pd_why'), t('.consider_pd_why_url'), :target => :new)%>)</span>
</div>
<% end %>