Browse Source

make sign up mobile friendly

denney-fix-saving-dates
Jason Denney 11 years ago
parent
commit
a35bd2f22b
  1. 39
      app/views/devise/registrations/_user_profile_fields.html.haml
  2. 43
      app/views/devise/registrations/new.html.haml

39
app/views/devise/registrations/_user_profile_fields.html.haml

@ -1,25 +1,14 @@
%fieldset %p
.control-group %fieldset
= f.label :addrStreet1, :class => "control-label" .form-group
.controls = f.text_field :addrStreet1, placeholder: "Street Address Line 1", :class => "form-control input-lg"
= f.text_field :addrStreet1, :class => "control-label" .form-group
.control-group = f.text_field :addrStreet2, placeholder: "Street Address Line 2",:class => "form-control input-lg"
= f.label :addrStreet2, :class => "control-label" .form-group
.controls = f.text_field :addrCity, placeholder: "City", :class => "form-control input-lg"
= f.text_field :addrStreet2, :class => "control-label" .form-group
.control-group = f.text_field :addrState, placeholder: "State Abbreviation", :class => "form-control input-lg"
= f.label :addrCity, :class => "control-label" .form-group
.controls = f.text_field :addrZip, placeholder: "Zip Code", :class => "form-control input-lg"
= f.text_field :addrCity, :class => "control-label" .form-group
.control-group = f.text_field :phone, placeholder: "Phone", :class => "form-control input-lg"
= 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"

43
app/views/devise/registrations/new.html.haml

@ -1,36 +1,23 @@
= stylesheet_link_tag "bootstrap_and_overrides", :media => "all" = 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! = devise_error_messages!
.controls .controls
%h2 Sign up %h2 Sign up
.control-group .form-group
= f.label :username, :class => "control-label" = f.text_field :username, placeholder: "Username", :class => "form-control input-lg"
.controls .form-group
= f.text_field :username = f.text_field :first_name, placeholder: "First Name", :class => "form-control input-lg"
.control-group .form-group
= f.label :first_name, :class => "control-label" = f.text_field :last_name, placeholder: "Last Name", :class => "form-control input-lg"
.controls .form-group
= f.text_field :first_name = f.email_field :email, placeholder: "E-mail", :class => "form-control input-lg"
.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 - profile_builder = resource.user_profiles.empty? ? resource.user_profiles.build : resource.user_profiles
= f.fields_for :user_profiles, profile_builder do |builder| = f.fields_for :user_profiles, profile_builder do |builder|
= render 'user_profile_fields', f: builder = render 'user_profile_fields', f: builder
.control-group .form-group
= f.label :password, :class => "control-label" = f.password_field :password, placeholder: "Password", :class => "form-control input-lg"
.controls .form-group
= f.password_field :password = f.password_field :password_confirmation, placeholder: "Password Confirmation", :class => "form-control input-lg"
.control-group .form-group
= f.label :password_confirmation, :class => "control-label" = f.submit "Sign up", class:"btn btn-lg btn-primary"
.controls
= f.password_field :password_confirmation
.control-group
.controls
= f.submit "Sign up"
= render "links" = render "links"

Loading…
Cancel
Save