From 79e140641c1b73a2776f28d4a3bfc9cfc5ef0401 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 27 Apr 2010 20:32:43 +0000 Subject: [PATCH] Tweak the OpenID login page * Replace 'foo' alt text with a real alt text and add title="" text too * Don't display an "Or" between the two, it's obvious from context that it's either-or * Display a small OpenID logo next to the login form (from http://openid.net/foundation/news/logos/) * Fix some indenting / HTML errors in the login table * Don't add border: 1px style to the OpenID provider logos. Prettier this way and doesn't include inline CSS --- app/views/user/login.html.erb | 45 +++++++++++++++++++++++++-------- config/locales/en.yml | 21 ++++++++++++++- public/images/openid-16x16.gif | Bin 0 -> 328 bytes 3 files changed, 55 insertions(+), 11 deletions(-) create mode 100644 public/images/openid-16x16.gif diff --git a/app/views/user/login.html.erb b/app/views/user/login.html.erb index 6cac5cecb..c8cbdbaf2 100644 --- a/app/views/user/login.html.erb +++ b/app/views/user/login.html.erb @@ -38,23 +38,48 @@ function openid_signin(provider) (<%= link_to t('user.login.lost password link'), :controller => 'user', :action => 'lost_password' %>) -
-

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

+

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

- + + + + + + + +
<%= t 'user.login.openid' %><%= text_field('user', 'openid_url',{:size => 28, :maxlength => 255, :tabindex => 3}) %>
(<%= t 'user.account.openid.link text' %>)
+ <%= image_tag "openid-16x16.gif", :alt => t('user.login.openid_logo_alt') %> + <%= t 'user.login.openid' %> + <%= text_field('user', 'openid_url',{:size => 28, :maxlength => 255, :tabindex => 3}) %>
+ + (<%= t 'user.account.openid.link text' %>) + +
- <%= image_tag "openid_logo.png", :alt => 'foo', :style => "border: solid; border-width: 1px" %> - <%= image_tag "yahoo.gif", :alt => 'foo', :style => "border: solid; border-width: 1px"%> - <%= image_tag "google.gif", :alt => 'foo', :style => "border: solid; border-width: 1px" %> - <%= image_tag "myopenid.png", :alt => 'foo', :style => "border: solid; border-width: 1px" %> - <%= image_tag "wordpress.png", :alt => 'foo', :style => "border: solid; border-width: 1px"%> - <%= image_tag "myspace.png", :alt => 'foo', :style => "border: solid; border-width: 1px" %> - + + <%= image_tag "openid_logo.png", :alt => t('user.login.openid_providers.openid.title') %> + + + <%= image_tag "yahoo.gif", :alt => t('user.login.openid_providers.yahoo.alt') %> + + + <%= image_tag "google.gif", :alt => t('user.login.openid_providers.google.alt') %> + + + <%= image_tag "myopenid.png", :alt => t('user.login.openid_providers.myopenid.alt') %> + + + <%= image_tag "wordpress.png", :alt => t('user.login.openid_providers.wordpress.alt') %> + + + <%= image_tag "myspace.png", :alt => t('user.login.openid_providers.myspace.alt') %> +
+
diff --git a/config/locales/en.yml b/config/locales/en.yml index 8053e710e..8a8d3cdaa 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1512,7 +1512,6 @@ en: openid description: "Use your OpenID to login" username_heading: "Login with username and password:" openid_heading: "Login with an OpenID:" - or: "Or" remember: "Remember me:" lost password link: "Lost your password?" login_button: "Login" @@ -1520,6 +1519,26 @@ en: auth failure: "Sorry, could not log in with those details." openid missing provider: "Sorry, could not contact your OpenID provider" openid invalid: "Sorry, your OpenID seems misformed" + 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" diff --git a/public/images/openid-16x16.gif b/public/images/openid-16x16.gif new file mode 100644 index 0000000000000000000000000000000000000000..e2d8377db023a3915cc9e8c2f1f5c7462622f0a1 GIT binary patch literal 328 zcmZ?wbhEHb6krfwxXQrr>({UQ_wR4qxN*;(J#*&FS-N!TvSrKGuV4S?%F;i7{_Nbj z^V6qK`}XadJ9qBs)2Dx~3p;V*#MZ4_j~qF&aN)v#|Nb2~aNyvg9 ztXT2$=g%EGcI@80`{m1*Z{NOs{rdIFl`EeF4W-ruOthu2f ztl_Mdp@*QzZPDcui{^-N`o3xq@(UMrZh5FF-w`Y#$*8QNq^Zf+5a!Y$(d{Fk$;RMZ d?jf!z+?DC8mZr!$-G@O{mX$wbm9ry*H2@d`j5z=R literal 0 HcmV?d00001 -- 2.43.2
<%= check_box_tag "remember_me", "yes", false, :tabindex => 3 %><%= submit_tag t('user.login.login_button'), :tabindex => 3 %>