Allow existing users to voluntarily sign up for the contributor terms

Based on a patch from Frederik Ramm this change allows users to make a
voluntary decision to sign up for the new contributor terms.
This commit is contained in:
Tom Hughes 2010-08-10 18:08:11 +01:00
parent 2adcfc1a72
commit a99b516962
4 changed files with 63 additions and 13 deletions

View file

@ -38,6 +38,24 @@
</td>
</tr>
<tr>
<td class="fieldName" valign="top"><%= t 'user.account.contributor terms.heading' %></td>
<td>
<% if @user.terms_agreed? %>
<%= t 'user.account.contributor terms.agreed' %>
<span class="minorNote">(<a href="<%= t 'user.account.contributor terms.link' %>" target="_new"><%= t 'user.account.contributor terms.link text' %></a>)</span>
<br />
<% if @user.consider_pd? %>
<%= t 'user.account.contributor terms.agreed_with_pd' %>
<% end %>
<% else %>
<%= t 'user.account.contributor terms.not yet agreed' %> <br />
<%= link_to t('user.account.contributor terms.review link text'), :controller => 'user', :action => 'terms' %>
<% end %>
</td>
</tr>
<tr>
<td class="fieldName" valign="top"><%= t 'user.account.profile description' %></td>
<td><%= f.text_area :description, :rows => '5', :cols => '60' %></td>

View file

@ -1,6 +1,6 @@
<h1><%= t 'user.terms.heading' %></h1>
<p><%= t 'user.terms.press accept button' %></p>
<p><%= t 'user.terms.read and accept' %></p>
<!-- legale is <%= @legale %> -->
<% form_tag :action => 'terms' do %>
@ -33,13 +33,17 @@
</p>
<p>
<%= hidden_field_tag('referer', h(params[:referer])) unless params[:referer].nil? %>
<%= hidden_field('user', 'email') %>
<%= hidden_field('user', 'email_confirmation') %>
<%= hidden_field('user', 'display_name') %>
<%= hidden_field('user', 'pass_crypt') %>
<%= hidden_field('user', 'pass_crypt_confirmation') %>
<% if params[:user] %>
<%= hidden_field('user', 'email') %>
<%= hidden_field('user', 'email_confirmation') %>
<%= hidden_field('user', 'display_name') %>
<%= hidden_field('user', 'pass_crypt') %>
<%= hidden_field('user', 'pass_crypt_confirmation') %>
<% end %>
<div id="buttons">
<%= submit_tag(t('user.terms.decline'), :name => "decline", :id => "decline") %>
<% if params[:user] %>
<%= submit_tag(t('user.terms.decline'), :name => "decline", :id => "decline") %>
<% end %>
<%= submit_tag(t('user.terms.agree'), :name => "agree", :id => "agree") %>
</div>
</p>