From a35bd2f22bf9fa3789f3e7f4515565f24422cdc5 Mon Sep 17 00:00:00 2001 From: Jason Denney Date: Wed, 15 Jan 2014 00:33:32 -0500 Subject: [PATCH] make sign up mobile friendly --- .../_user_profile_fields.html.haml | 39 ++++++----------- app/views/devise/registrations/new.html.haml | 43 +++++++------------ 2 files changed, 29 insertions(+), 53 deletions(-) diff --git a/app/views/devise/registrations/_user_profile_fields.html.haml b/app/views/devise/registrations/_user_profile_fields.html.haml index 1a3ec42..471e288 100644 --- a/app/views/devise/registrations/_user_profile_fields.html.haml +++ b/app/views/devise/registrations/_user_profile_fields.html.haml @@ -1,25 +1,14 @@ -%fieldset - .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" +%p + %fieldset + .form-group + = f.text_field :addrStreet1, placeholder: "Street Address Line 1", :class => "form-control input-lg" + .form-group + = f.text_field :addrStreet2, placeholder: "Street Address Line 2",:class => "form-control input-lg" + .form-group + = f.text_field :addrCity, placeholder: "City", :class => "form-control input-lg" + .form-group + = f.text_field :addrState, placeholder: "State Abbreviation", :class => "form-control input-lg" + .form-group + = f.text_field :addrZip, placeholder: "Zip Code", :class => "form-control input-lg" + .form-group + = f.text_field :phone, placeholder: "Phone", :class => "form-control input-lg" diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index efece1c..1b7d6b5 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -1,36 +1,23 @@ = stylesheet_link_tag "bootstrap_and_overrides", :media => "all" -= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :class => "form-horizontal"}) do |f| += form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| = devise_error_messages! .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 + .form-group + = f.text_field :username, placeholder: "Username", :class => "form-control input-lg" + .form-group + = f.text_field :first_name, placeholder: "First Name", :class => "form-control input-lg" + .form-group + = f.text_field :last_name, placeholder: "Last Name", :class => "form-control input-lg" + .form-group + = f.email_field :email, placeholder: "E-mail", :class => "form-control input-lg" - 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" + .form-group + = f.password_field :password, placeholder: "Password", :class => "form-control input-lg" + .form-group + = f.password_field :password_confirmation, placeholder: "Password Confirmation", :class => "form-control input-lg" + .form-group + = f.submit "Sign up", class:"btn btn-lg btn-primary" = render "links"