during the account confirmation step.
cache_sweeper :user_sweeper, :only => [:account, :hide, :unhide, :delete]
+ def terms
+ @title = t 'user.new.title'
+ @user = User.new(params[:user])
+
+ if @user.invalid?
+ render :action => 'new'
+ end
+ end
+
def save
@title = t 'user.new.title'
@user.description = "" if @user.description.nil?
@user.creation_ip = request.remote_ip
@user.languages = request.user_preferred_languages
+ @user.terms_agreed = Time.now.getutc
if @user.save
flash[:notice] = t 'user.new.flash create success message'
@user = token.user
@user.active = true
@user.email_valid = true
- @user.terms_agreed = Time.now.getutc
- @user.consider_pd = true if params[:consider_pd]
@user.save!
referer = token.referer
token.destroy
<p><%= t 'user.confirm.press confirm button' %></p>
-<div id="contributorTerms">
- <p id="first"><%= t 'legal.contributor_terms.intro' %></p>
- <ol>
- <li>
- <p><%= t 'legal.contributor_terms.section_1' %></p>
- </li>
- <li>
- <p><%= t 'legal.contributor_terms.section_2' %></p>
- </li>
- <li>
- <p><%= t 'legal.contributor_terms.section_3' %></p>
- <p><%= t 'legal.contributor_terms.active_defn_1' %></p>
- <p><%= t 'legal.contributor_terms.active_defn_2' %></p>
- </li>
- <li>
- <p><%= t 'legal.contributor_terms.section_4' %></p>
- </li>
- <li>
- <p><%= t 'legal.contributor_terms.section_5' %></p>
- </li>
- <li>
- <p><%= t 'legal.contributor_terms.section_6' %></p>
- <ol>
- <li><p><%= t 'legal.contributor_terms.section_6_1' %></p></li>
- <li><p><%= t 'legal.contributor_terms.section_6_2' %></p></li>
- </ol>
- </li>
- <li>
- <p id="last"><%= t 'legal.contributor_terms.section_7' %></p>
- </li>
- </ol>
-</div>
-
<form method="post">
- <p>
- <label for="confirm_pd_checkbox"><%= t 'user.confirm.consider_pd' %></label>
- <input id="confirm_pd_checkbox" type="checkbox" name="consider_pd"/>
- <span class="minorNote">(<%= link_to(t('user.confirm.consider_pd_why'), t('user.confirm.consider_pd_why_url'), :target => :new)%>)</span>
- </p>
- <p>
- <input type="hidden" name="confirm_string" value="<%= params[:confirm_string] %>"/>
- <input type="submit" name="confirm_action" value="<%= t 'user.confirm.button' %>"/>
- </p>
+<input type="hidden" name="confirm_string" value="<%= params[:confirm_string] %>">
+<input type="submit" name="confirm_action" value="<%= t 'user.confirm.button' %>">
</form>
+
+
<%= error_messages_for 'user' %>
-<% form_tag :action => 'save' do %>
+<% form_tag :action => 'terms' do %>
<%= hidden_field_tag('referer', h(params[:referer])) unless params[:referer].nil? %>
<table id="signupForm">
<tr><td class="fieldName"><%= t 'user.new.email address' %></td><td><%= text_field('user', 'email',{:size => 50, :maxlength => 255, :tabindex => 1}) %></td></tr>
--- /dev/null
+<h1><%= t 'user.terms.heading' %></h1>
+
+<p><%= t 'user.terms.press accept button' %></p>
+
+<div id="contributorTerms">
+ <p id="first"><%= t 'legal.contributor_terms.intro' %></p>
+ <ol>
+ <li>
+ <p><%= t 'legal.contributor_terms.section_1' %></p>
+ </li>
+ <li>
+ <p><%= t 'legal.contributor_terms.section_2' %></p>
+ </li>
+ <li>
+ <p><%= t 'legal.contributor_terms.section_3' %></p>
+ <p><%= t 'legal.contributor_terms.active_defn_1' %></p>
+ <p><%= t 'legal.contributor_terms.active_defn_2' %></p>
+ </li>
+ <li>
+ <p><%= t 'legal.contributor_terms.section_4' %></p>
+ </li>
+ <li>
+ <p><%= t 'legal.contributor_terms.section_5' %></p>
+ </li>
+ <li>
+ <p><%= t 'legal.contributor_terms.section_6' %></p>
+ <ol>
+ <li><p><%= t 'legal.contributor_terms.section_6_1' %></p></li>
+ <li><p><%= t 'legal.contributor_terms.section_6_2' %></p></li>
+ </ol>
+ </li>
+ <li>
+ <p id="last"><%= t 'legal.contributor_terms.section_7' %></p>
+ </li>
+ </ol>
+</div>
+
+<% form_tag :action => 'save' do %>
+ <p>
+ <label for="confirm_pd_checkbox"><%= t 'user.terms.consider_pd' %></label>
+ <%= check_box('user', 'consider_pd') %>
+ <span class="minorNote">(<%= link_to(t('user.terms.consider_pd_why'), t('user.terms.consider_pd_why_url'), :target => :new)%>)</span>
+ </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') %>
+ <%= submit_tag(t('user.terms.button')) %>
+ </p>
+<% end %>
confirm password: "Confirm Password:"
signup: Signup
flash create success message: "User was successfully created. Check your email for a confirmation note, and you will be mapping in no time :-)<br /><br />Please note that you will not be able to login until you've received and confirmed your email address.<br /><br />If you use an antispam system which sends confirmation requests then please make sure you whitelist webmaster@openstreetmap.org as we are unable to reply to any confirmation requests."
+ terms:
+ heading: Contributor terms
+ press accept button: "Please read the agreement below and press the agree button to activate your account."
+ consider_pd: "I consider my contributions to be in the Public Domain"
+ consider_pd_why: what's this?
+ consider_pd_why_url: http://wiki.openstreetmap.org/wiki/Why_would_I_want_my_contributions_to_be_public_domain
+ button: Agree
no_such_user:
title: "No such user"
heading: "The user {{user}} does not exist"
flash update success: "User information updated successfully."
confirm:
heading: Confirm a user account
- press confirm button: "Please read the agreement below and press the agree button to activate your account."
- consider_pd: "I consider my contributions to be in the Public Domain"
- consider_pd_why: what's this?
- consider_pd_why_url: http://wiki.openstreetmap.org/wiki/Why_would_I_want_my_contributions_to_be_public_domain
- button: Agree
+ press confirm button: "Press the confirm button below to activate your account."
+ button: Confirm
success: "Confirmed your account, thanks for signing up!"
failure: "A user account with this token has already been confirmed."
confirm_email:
map.connect '/offline', :controller => 'site', :action => 'offline'
map.connect '/key', :controller => 'site', :action => 'key'
map.connect '/user/new', :controller => 'user', :action => 'new'
+ map.connect '/user/terms', :controller => 'user', :action => 'terms'
map.connect '/user/save', :controller => 'user', :action => 'save'
map.connect '/user/confirm', :controller => 'user', :action => 'confirm'
map.connect '/user/confirm-email', :controller => 'user', :action => 'confirm_email'