From f0dccab3419f1b5e87bc51aa9c581fad90b3f0fb Mon Sep 17 00:00:00 2001 From: Saman Bemel-Benrud Date: Tue, 11 Jun 2013 16:15:17 -0700 Subject: [PATCH] Fine tune login form --- app/assets/stylesheets/common.css.scss | 13 ++++- app/views/user/account.html.erb | 2 +- app/views/user/login.html.erb | 79 ++++++++++++++------------ config/locales/en.yml | 2 +- 4 files changed, 56 insertions(+), 40 deletions(-) diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index cd00f7eab..3fb643f3c 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -1220,7 +1220,7 @@ ul.results-list li { border-bottom: 1px solid #ccc; } /* Rules for the login page */ #login_openid_buttons { - height: 56px; + margin-bottom: 0; } #login_openid_buttons li { @@ -1424,7 +1424,7 @@ ul.results-list li { border-bottom: 1px solid #ccc; } .standard-form { fieldset { - margin-bottom: $lineheight/2; + margin-bottom: $lineheight; } label { display: block; @@ -1434,10 +1434,16 @@ ul.results-list li { border-bottom: 1px solid #ccc; } font-weight: bold; line-height: 1.5; } + .form-section { + margin-top: $lineheight; + padding-top: $lineheight; + border-top: 1px solid $keyline; + } .form-row { margin-bottom: $lineheight/2; } - input[name=remember_me] { + input[name=remember_me], + input[name=remember_me_openid] { float: left; } } @@ -1453,6 +1459,7 @@ input[type="password"], textarea { border: 1px solid #ccc; padding: 2px 5px; + margin: 0; } textarea { diff --git a/app/views/user/account.html.erb b/app/views/user/account.html.erb index b5f93dcfb..d8a63bde6 100644 --- a/app/views/user/account.html.erb +++ b/app/views/user/account.html.erb @@ -15,7 +15,7 @@
- +

<%= t 'user.account.email never displayed publicly' %>

diff --git a/app/views/user/login.html.erb b/app/views/user/login.html.erb index f03292fe9..d1efa8b2b 100644 --- a/app/views/user/login.html.erb +++ b/app/views/user/login.html.erb @@ -7,57 +7,66 @@ <%= form_tag({ :action => "login" }, { :id => "login_form" }) do %> <%= hidden_field_tag('referer', h(params[:referer])) %> -

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

+

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

+
- - <%= text_field_tag "username", params[:username], :maxlength => 255, :tabindex => 1 %> -
-
- - <%= password_field_tag "password", "", :maxlength => 255, :tabindex => 2 %> +
+ + <%= text_field_tag "username", params[:username], :tabindex => 1 %> +
+
+ + <%= password_field_tag "password", "", :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 => 4 %>
-
-

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

- - - -
-
- - <%= url_field_tag("openid_url", "", { :tabindex => 3, :class => "openid_url" }) %> - (<%= t 'user.account.openid.link text' %>) -
-
- - <%= check_box_tag "remember_me", "yes", false, :tabindex => 5 %> + +
+ +

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

+ +
    +
  • <%= link_to image_tag("openid.png", :alt => t("user.login.openid_providers.openid.title")), "#", :id => "openid_open_url", :title => t("user.login.openid_providers.openid.title") %>
  • +
  • <%= openid_button "google", "gmail.com" %>
  • +
  • <%= openid_button "yahoo", "me.yahoo.com" %>
  • +
  • <%= openid_button "myopenid", "myopenid.com" %>
  • +
  • <%= openid_button "wordpress", "wordpress.com" %>
  • +
  • <%= openid_button "aol", "aol.com" %>
  • +
+ +
+ + <%= url_field_tag("openid_url", "", { :tabindex => 3, :class => "openid_url" }) %> + (<%= t 'user.account.openid.link text' %>) +
+ +
+ <%= check_box_tag "remember_me_openid", "yes", false, :tabindex => 5 %> + +
+ + <%= submit_tag t('user.login.login_button'), :tabindex => 6, :id => "login_openid_submit" %> +
+
- <%= submit_tag t('user.login.login_button'), :tabindex => 6, :id => "login_openid_submit" %> + <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 8d30dbb05..2bb83a493 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1618,7 +1618,7 @@ en: login_button: "Login" register now: Register now with username: "Already have an OpenStreetMap account? Please login with your username and password:" - with openid: "Alternatively please use your OpenID to login:" + with openid: "Alternatively, use 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. -- 2.43.2