From: Tom Hughes Date: Sun, 22 May 2011 17:01:15 +0000 (+0100) Subject: Merge branch 'master' into openid X-Git-Tag: live~7295 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/a37e1b8f7035bfac0e38f5b95ea643c601e1c9b1?hp=-c Merge branch 'master' into openid Conflicts: app/views/user/login.html.erb --- a37e1b8f7035bfac0e38f5b95ea643c601e1c9b1 diff --combined app/views/user/login.html.erb index 4515f412d,7cc4b6f24..3d30d9d69 --- a/app/views/user/login.html.erb +++ b/app/views/user/login.html.erb @@@ -1,80 -1,25 +1,80 @@@
+

<%= t 'user.login.heading' %>

-

<%= t 'user.login.already have' %>

- - <% form_tag :action => 'login' do %> + <% form_tag({ :action => "login" }, { :id => "login_form" }) do %> <%= hidden_field_tag('referer', h(params[:referer])) %> + +

<%= t 'user.login.with username' %>

+
<%= t 'user.login.email or username' %><%= text_field('user', 'email',{:value => "", :size => 28, :maxlength => 255, :tabindex => 1}) %>
<%= t 'user.login.password' %><%= password_field('user', 'password',{:value => "", :size => 28, :maxlength => 255, :tabindex => 2}) %> (<%= link_to t('user.login.lost password link'), :controller => 'user', :action => 'lost_password' %>)
<%= check_box_tag "remember_me", "yes", false, :tabindex => 3 %>
<%= submit_tag t('user.login.login_button'), :tabindex => 3 %> + +

<%= t 'user.login.with openid' %>

+ + + + + + + + + + + + +
+ <%= + link_to_function(image_tag("openid_large.png", :alt => t("user.login.openid_providers.openid.title")), nil, :title => t("user.login.openid_providers.openid.title")) do |page| + page[:login_form][:openid_url].value = "http://" + page[:login_openid_buttons].hide + page[:login_openid_url].show + page[:login_openid_submit].show + end + %> + <%= openid_button "yahoo", "me.yahoo.com" %><%= openid_button "google", "gmail.com" %>
<%= openid_button "myopenid", "myopenid.com" %><%= openid_button "wordpress", "wordpress.com" %><%= openid_button "myspace", "myspace.com" %>
+ + + + + + + + + + +
+ <%= t 'user.login.openid', :logo => openid_logo %> + + <%= text_field_tag("openid_url", "", { :size => 28, :maxlength => 255, :tabindex => 3, :class => "openid_url" }) %> + (<%= t 'user.account.openid.link text' %>) +
<%= check_box_tag "remember_me", "yes", false, :tabindex => 5 %>
+ + <%= submit_tag t('user.login.login_button'), :tabindex => 6, :id => "login_openid_submit" %> <% end %> + -
+
+

<%= t 'user.login.new to osm' %>

<%= t 'user.login.to make changes' %>

-

<%= t 'user.login.create account minute' %>

+

<%= t 'user.login.create account minute' %>

<%= button_to t('user.login.register now'), :action => :new, :referer => params[:referer] %>

-
+ +
+
+ +<%= + update_page_tag do |page| + page[:login_openid_url].hide + page[:login_openid_submit].hide + end +%> diff --combined app/views/user/terms.html.erb index ded9b4db6,cd352ab6f..e4644e815 --- a/app/views/user/terms.html.erb +++ b/app/views/user/terms.html.erb @@@ -33,17 -33,18 +33,19 @@@

<%= hidden_field_tag('referer', h(params[:referer])) unless params[:referer].nil? %> - <% if params[:user] %> + <% if @user.new_record? %> <%= 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') %> + <%= hidden_field('user', 'openid_url') %> <% end %>

<%= submit_tag(t('user.terms.decline'), :name => "decline", :id => "decline") %> <%= submit_tag(t('user.terms.agree'), :name => "agree", :id => "agree") %>

+
+

<%= t 'user.terms.guidance', :summary => 'http://www.osmfoundation.org/wiki/License/Contributor_Terms_Summary', :translations => 'http://www.osmfoundation.org/wiki/License/Contributor_Terms/Informal_Translations' %>

<% end %> diff --combined config/locales/en.yml index 1509ba917,d8d7c13b3..a95544017 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@@ -1516,15 -1516,15 +1516,15 @@@ en login: title: "Login" heading: "Login" - please login: "Please login or {{create_user_link}}." - create_account: "create an account" email or username: "Email Address or Username:" password: "Password:" + openid: "{{logo}} OpenID:" remember: "Remember me:" lost password link: "Lost your password?" login_button: "Login" register now: Register now - already have: Already have an OpenStreetMap account? Please login. + with username: "Already have an OpenStreetMap account? Please login with your username and password:" + with openid: "Alternatively please use your OpenID to login:" new to osm: New to OpenStreetMap? to make changes: To make changes to the OpenStreetMap data, you must have an account. create account minute: Create an account. It only takes a minute. @@@ -1533,28 -1533,6 +1533,28 @@@ webmaster: webmaster auth failure: "Sorry, could not log in with those details." notice: "Find out more about OpenStreetMap's upcoming license change (translations) (discussion)" + openid missing provider: "Sorry, could not contact your OpenID provider" + openid invalid: "Sorry, your OpenID seems to be malformed" + openid_logo_alt: "Log in with an OpenID" + openid_providers: + openid: + title: Login with an OpenID URL + alt: Login with an OpenID URL + yahoo: + title: Login with a Yahoo! OpenID + alt: Login with a Yahoo! OpenID + google: + title: Login with a Google OpenID + alt: Login with a Google OpenID + myopenid: + title: Login with a myOpenID OpenID + alt: Login with a myOpenID OpenID + wordpress: + title: Login with a Wordpress.com OpenID + alt: Login with a Wordpress.com OpenID + myspace: + title: Login with a MySpace OpenID + alt: Login with a MySpace OpenID logout: title: "Logout" heading: "Logout from OpenStreetMap" @@@ -1587,21 -1565,8 +1587,21 @@@ not displayed publicly: 'Not displayed publicly (see privacy policy)' display name: "Display Name:" display name description: "Your publicly displayed username. You can change this later in the preferences." + openid: "{{logo}} OpenID:" password: "Password:" confirm password: "Confirm Password:" + use openid: "Alternatively, use {{logo}} OpenID to login" + openid no password: "With OpenID a password is not required, but some extra tools or server may still need one." + openid association: | +

Your OpenID is not associated with a OpenStreetMap account yet.

+ continue: Continue flash create success message: "Thanks for signing up. We've sent a confirmation note to {{email}} and as soon as you confirm your account you'll be able to get mapping.

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 accepted: "Thanks for accepting the new contributor terms!" @@@ -1614,6 -1579,7 +1614,7 @@@ consider_pd: "In addition to the above agreement, I consider my contributions to be in the Public Domain" consider_pd_why: "what's this?" consider_pd_why_url: http://www.osmfoundation.org/wiki/License/Why_would_I_want_my_contributions_to_be_public_domain + guidance: 'Information to help understand these terms: a human readable summary and some informal translations' agree: Agree declined: "http://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined" decline: "Decline" @@@ -1688,10 -1654,6 +1689,10 @@@ current email address: "Current Email Address:" new email address: "New Email Address:" email never displayed publicly: "(never displayed publicly)" + openid: + openid: "OpenID:" + link: "http://wiki.openstreetmap.org/wiki/OpenID" + link text: "what is this?" public editing: heading: "Public editing:" enabled: "Enabled. Not anonymous and can edit data." diff --combined public/stylesheets/common.css index 509fce0e8,8b387e1d3..89fa39b31 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@@ -222,7 -222,7 +222,7 @@@ hr float: right; } - .search_form { + .search_container { height: 16px; padding-bottom: 6px; } @@@ -723,21 -723,6 +723,21 @@@ table.browse_details th margin-top: 5px; } +table#login_openid_buttons { + padding-bottom: 10px; +} + +#login_openid_buttons td { + padding-left: 10px; + padding-right: 10px; + padding-top: 5px; + padding-bottom: 5px; +} + +#login_openid_buttons img { + border: 0; +} + #login_signup form.button-to div { margin: 0px; padding: 0px; @@@ -749,7 -734,7 +749,7 @@@ div#contributorTerms border: 1px solid black; padding: 4px; overflow: auto; - width: 80%; + width: 95%; height: 400px; } @@@ -777,7 -762,7 +777,7 @@@ div#contributorTerms img } form#termsForm { - width: 80%; + width: 95%; margin-bottom: 3em; } @@@ -793,6 -778,14 +793,14 @@@ form#termsForm input#agree margin-left: 50px; } + p#contributorGuidance { + background-color: #f5f5ff; + border: 1px solid #f3f3ff; + border-radius: 15px; + -moz-border-radius: 15px; + padding: 10px; + } + /* Rules for the account settings page */ #accountForm td { @@@ -934,11 -927,6 +942,11 @@@ input[type="submit"] border: 1px solid black; } +input.openid_url { + background: url('../images/openid_input.png') repeat-y left white; + padding-left: 16px; +} + /* Rules for user images */ img.user_image { @@@ -981,10 -969,3 +989,10 @@@ abbr.geo .table1 { background: #fff; } + +/* Rules for OpenID logo */ + +.openid_logo { + vertical-align: text-bottom; + border: 0; +}