From 51971248c15fe9cc65b2c6479d977016e1886e55 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Tue, 21 Dec 2010 10:55:51 +0000 Subject: [PATCH 1/1] Rework the login page to explain better what to do if you're new --- app/views/user/login.html.erb | 35 +++++++++++++++++++++++------------ config/locales/en.yml | 5 +++++ public/stylesheets/common.css | 30 ++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 12 deletions(-) diff --git a/app/views/user/login.html.erb b/app/views/user/login.html.erb index cf7f4a819..1130600d5 100644 --- a/app/views/user/login.html.erb +++ b/app/views/user/login.html.erb @@ -1,14 +1,25 @@ -

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

+
+
+

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

-

<%= t 'user.login.please login', :create_user_link => link_to(t('user.login.create_account'), :controller => 'user', :action => 'new', :referer => params[:referer]) %>

+

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

-<% form_tag :action => 'login' do %> -<%= hidden_field_tag('referer', h(params[:referer])) %> - - - - - - -
<%= 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 %>
-<% end %> + <% form_tag :action => 'login' do %> + <%= hidden_field_tag('referer', h(params[:referer])) %> + + + + +
<%= 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 %> + <% end %> +
+
+
+

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

+

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

+

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

+

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

+
+
+
diff --git a/config/locales/en.yml b/config/locales/en.yml index 63577e919..5214a28d9 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1515,6 +1515,11 @@ en: remember: "Remember me:" lost password link: "Lost your password?" login_button: "Login" + register now: Register now + already got: Already got an OpenStreetMap account? Please 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. account not active: "Sorry, your account is not active yet.
Please use the link in the account confirmation email to activate your account, or request a new confirmation email." account suspended: Sorry, your account has been suspended due to suspicious activity.
Please contact the {{webmaster}} if you wish to discuss this. webmaster: webmaster diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index 906b392cd..c830f406b 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -626,6 +626,36 @@ hr { margin-top: 10px; } +/* Rules for the login page */ + +#login_wrapper { + float: left; /* ensures the child divs are the same size, and only as wide as they need to be */ +} + +#login_wrapper div { + margin: 5px; + padding: 15px; + border-radius: 15px; + -moz-border-radius: 15px; +} + +#login_wrapper input[type=submit] { + float: right; +} + +#login_login { + background-color: #f0f0f0; +} + +#login_login h1 { + margin-top: 5px; +} + +#login_signup form.button-to div { + margin: 0px; + padding: 0px; +} + /* Rules for the account confirmation page */ div#contributorTerms { -- 2.39.5