From 67c51068cc79a3b345433cb367b911daccee502e Mon Sep 17 00:00:00 2001 From: Jason Denney Date: Mon, 2 Sep 2013 18:08:05 -0400 Subject: [PATCH] Make user signup easier to read & enter --- .../_user_profile_fields.html.haml | 47 +++++++------- app/views/devise/registrations/new.html.haml | 64 ++++++++++--------- 2 files changed, 57 insertions(+), 54 deletions(-) diff --git a/app/views/devise/registrations/_user_profile_fields.html.haml b/app/views/devise/registrations/_user_profile_fields.html.haml index 45a74b8..1a3ec42 100644 --- a/app/views/devise/registrations/_user_profile_fields.html.haml +++ b/app/views/devise/registrations/_user_profile_fields.html.haml @@ -1,24 +1,25 @@ %fieldset - = f.label :addrStreet1 - %br/ - = f.text_field :addrStreet1 - %br/ - = f.label :addrStreet2 - %br/ - = f.text_field :addrStreet2 - %br/ - = f.label :addrCity - %br/ - = f.text_field :addrCity - %br/ - = f.label :addrState - %br/ - = f.text_field :addrState - %br/ - = f.label :addrZip - %br/ - = f.text_field :addrZip - %br/ - = f.label :phone - %br/ - = f.text_field :phone + .control-group + = f.label :addrStreet1, :class => "control-label" + .controls + = f.text_field :addrStreet1, :class => "control-label" + .control-group + = f.label :addrStreet2, :class => "control-label" + .controls + = f.text_field :addrStreet2, :class => "control-label" + .control-group + = f.label :addrCity, :class => "control-label" + .controls + = f.text_field :addrCity, :class => "control-label" + .control-group + = f.label :addrState, :class => "control-label" + .controls + = f.text_field :addrState, :class => "control-label" + .control-group + = f.label :addrZip, :class => "control-label" + .controls + = f.text_field :addrZip, :class => "control-label" + .control-group + = f.label :phone, :class => "control-label" + .controls + = f.text_field :phone, :class => "control-label" diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index b2393d7..efece1c 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -1,34 +1,36 @@ = stylesheet_link_tag "bootstrap_and_overrides", :media => "all" -%h2 Sign up -= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| += form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :class => "form-horizontal"}) do |f| = devise_error_messages! - %div - = f.label :username - %br/ - = f.text_field :username - %div - = f.label :first_name - %br/ - = f.text_field :first_name - %div - = f.label :last_name - %br/ - = f.text_field :last_name - %div - = f.label :email - %br/ - = f.email_field :email - %div - - profile_builder = resource.user_profiles.empty? ? resource.user_profiles.build : resource.user_profiles - = f.fields_for :user_profiles, profile_builder do |builder| - = render 'user_profile_fields', f: builder - %div - = f.label :password - %br/ - = f.password_field :password - %div - = f.label :password_confirmation - %br/ - = f.password_field :password_confirmation - %div= f.submit "Sign up" + .controls + %h2 Sign up + .control-group + = f.label :username, :class => "control-label" + .controls + = f.text_field :username + .control-group + = f.label :first_name, :class => "control-label" + .controls + = f.text_field :first_name + .control-group + = f.label :last_name, :class => "control-label" + .controls + = f.text_field :last_name + .control-group + = f.label :email, :class => "control-label" + .controls + = f.email_field :email + - profile_builder = resource.user_profiles.empty? ? resource.user_profiles.build : resource.user_profiles + = f.fields_for :user_profiles, profile_builder do |builder| + = render 'user_profile_fields', f: builder + .control-group + = f.label :password, :class => "control-label" + .controls + = f.password_field :password + .control-group + = f.label :password_confirmation, :class => "control-label" + .controls + = f.password_field :password_confirmation + .control-group + .controls + = f.submit "Sign up" = render "links"