Make the decline button a real button

Make the decline button on the terms page a real form submit button
and have the server redirect to the wiki as it's the only way to get
something that will actually look the same as a button on all the
different browsers.
This commit is contained in:
Tom Hughes 2010-04-27 10:45:49 +01:00
parent d033a0f35d
commit 276c29cb31
4 changed files with 6 additions and 15 deletions

View file

@ -39,6 +39,8 @@ class UserController < ApplicationController
if Acl.find_by_address(request.remote_ip, :conditions => {:k => "no_account_creation"})
render :action => 'new'
elsif params[:decline]
redirect_to t 'user.terms.declined'
else
@user = User.new(params[:user])

View file

@ -39,8 +39,8 @@
<%= hidden_field('user', 'pass_crypt') %>
<%= hidden_field('user', 'pass_crypt_confirmation') %>
<div class="left_right_line">
<div class="left"><a class="looks_like_button" href="<%= t 'user.terms.exit_wiki' %>"><%= t 'user.terms.decline' %></a></div>
<div class="right"><%= submit_tag(t('user.terms.button'), :class => 'float_right') %></div>
<div class="left"><%= submit_tag(t('user.terms.decline'), :name => "decline") %></div>
<div class="right"><%= submit_tag(t('user.terms.agree'), :name => "agree") %></div>
</div>
</p>
<% end %>

View file

@ -1409,8 +1409,8 @@ en:
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
exit_wiki: "http://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined"
agree: Agree
declined: "http://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined"
decline: "Decline"
legale_select: "Please select your country of residence:"
legale_button: "Go"

View file

@ -747,17 +747,6 @@ abbr.geo {
background: #fff;
}
/* rules for styling a link to look like a button to get around the difficulty
* of laying anything out properly in html. */
a.looks_like_button {
color: black;
background: buttonface;
border: 1px solid black;
font-size: small;
padding: 1px;
}
/* hack to get left/right alignment on a line working. apparently still works in IE too.
* shamelessly stolen from http://www.spartanicus.utvinternet.ie/left_and_right_alignment_using_css.htm
*/