From: Tom Hughes Date: Tue, 27 Apr 2010 09:45:49 +0000 (+0100) Subject: Make the decline button a real button X-Git-Tag: live~6322^2~11 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/276c29cb3138b2bd3e36d5f24430c7d55df3b8bc?ds=sidebyside 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. --- diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 27d124dae..43a6db790 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -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]) diff --git a/app/views/user/terms.html.erb b/app/views/user/terms.html.erb index a370d4b48..5dac8f692 100644 --- a/app/views/user/terms.html.erb +++ b/app/views/user/terms.html.erb @@ -39,8 +39,8 @@ <%= hidden_field('user', 'pass_crypt') %> <%= hidden_field('user', 'pass_crypt_confirmation') %>
- -
<%= submit_tag(t('user.terms.button'), :class => 'float_right') %>
+
<%= submit_tag(t('user.terms.decline'), :name => "decline") %>
+
<%= submit_tag(t('user.terms.agree'), :name => "agree") %>

<% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 420137984..21931925a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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" diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index 2c99cf074..d46013393 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -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 */