From 78631eb0cc05881452aa71ddfa628573abe5e098 Mon Sep 17 00:00:00 2001 From: Saman Bemel-Benrud Date: Mon, 10 Jun 2013 11:00:30 -0700 Subject: [PATCH] Refactor signup form to remove tables --- app/assets/stylesheets/common.css.scss | 29 ++++--- app/views/user/new.html.erb | 115 +++++++++++++------------ 2 files changed, 75 insertions(+), 69 deletions(-) diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index b392de1df..c05262b69 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -1427,24 +1427,22 @@ p#contributorGuidance { /* Rules for forms */ -.submitButton { - text-align: center; -} +.standard-form fieldset { + margin-bottom: 20px; -.fieldName { - vertical-align: top; - font-weight: bold; - font-size: 12px; - line-height: 1.6666; - text-align: right; } -.submitButton { - text-align: right; +.standard-form label { + display: block; + width: 200px; + margin-right: 10px; + font-size: 14px; + font-weight: bold; + line-height: 1.5; } -.minorNote { - font-size: 12px; +.standard-form .form-row { + margin-bottom: 10px; } input[type="text"], @@ -1535,7 +1533,12 @@ ul.secondary-actions { /* Utility for general button styles */ +input[type="button"], +input[type="submit"], +input[type="reset"], a.button { + cursor: pointer; + border: 0; display: block; padding: 5px; min-width: 120px; diff --git a/app/views/user/new.html.erb b/app/views/user/new.html.erb index 71d3e875b..25339c1f4 100644 --- a/app/views/user/new.html.erb +++ b/app/views/user/new.html.erb @@ -9,62 +9,65 @@ <%= form_for :user, :url => { :action => 'terms' } do %> <%= hidden_field_tag('referer', h(@referer)) unless @referer.nil? %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<%= t 'user.new.email address' %><%= email_field(:user, :email, { :size => 50, :maxlength => 255, :tabindex => 1 }) %>
<%= t 'user.new.confirm email address' %><%= email_field(:user, :email_confirmation, { :size => 50, :maxlength => 255, :tabindex => 2 }) %>
<%= raw(t 'user.new.not displayed publicly') %>
 
<%= t 'user.new.display name' %><%= text_field(:user, :display_name, { :size => 30, :maxlength => 255, :tabindex => 3 }) %>
<%= t 'user.new.display name description' %>
 
<%= raw t 'user.new.openid', :logo => openid_logo %><%= url_field(:user, :openid_url, { :id => "openid_url", :size => 50, :maxlength => 255, :tabindex => 4, :class => "openid_url" }) %>
 
<%= t 'user.new.password' %><%= password_field(:user, :pass_crypt, { :size => 30, :maxlength => 255, :tabindex => 5 }) %>
<%= t 'user.new.confirm password' %><%= password_field(:user, :pass_crypt_confirmation, { :size => 30, :maxlength => 255, :tabindex => 6 }) %>
- <%= link_to raw(t("user.new.use openid", :logo => openid_logo)), "#", :id => "openid_enable" %> - <%= t 'user.new.openid no password' %> -
 
<%= submit_tag t('user.new.continue'), :tabindex => 6 %>
+
+
+
+ + <%= email_field(:user, :email, { :tabindex => 1 }) %> +
+
+ + <%= email_field(:user, :email_confirmation, { :tabindex => 2 }) %> +
+

<%= raw(t 'user.new.not displayed publicly') %>

+
+ +
+
+ + <%= text_field(:user, :display_name, { :tabindex => 3 }) %> +
+

<%= t 'user.new.display name description' %> +

+ +
+
+ + <%= url_field(:user, :openid_url, { :id => "openid_url", :tabindex => 4, :class => "openid_url" }) %> +
+
+ +
+
+ + <%= password_field(:user, :pass_crypt, {:tabindex => 5 }) %> +
+
+ + <%= password_field(:user, :pass_crypt_confirmation, { :tabindex => 6 }) %> +
+ + <%= link_to raw(t("user.new.use openid", :logo => openid_logo)), "#", :id => "openid_enable" %> + + + <%= t 'user.new.openid no password' %> + +
+ +
<%= submit_tag t('user.new.continue'), :tabindex => 6 %>
+
<% end %>