Commit 15e1ea849c3e59785d62be908b001ba208d3372e

Authored by Rafael Manzo
2 parents 780ecdcc e651f640

Merge pull request #67 from mezuro/edit_account

Edit Account
Showing 1 changed file with 66 additions and 15 deletions   Show diff stats
app/views/devise/registrations/edit.html.erb
... ... @@ -2,29 +2,80 @@
2 2 <h1>Edit <%= resource_name.to_s.humanize %></h1>
3 3 </div>
4 4  
5   -<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
  5 +<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => "form-inline" }) do |f| %>
6 6 <%= devise_error_messages! %>
7 7  
8   - <div><%= f.label :name %><br />
9   - <%= f.text_field :name, :autofocus => true %></div>
  8 + <div class="row margin-left-none">
  9 + <div class="form-table span9">
  10 + <div class="form-row">
  11 + <div class="field-container">
  12 + <%= f.label :name, class: 'control-label' %><br />
  13 + <%= f.text_field :name, :autofocus => true, class: 'text-field' %>
  14 + </div>
  15 + <div class="help-container">
  16 + <p>
  17 + Your full name!
  18 + </p>
  19 + </div>
  20 + </div>
10 21  
11   - <div><%= f.label :email %><br />
12   - <%= f.email_field :email %></div>
  22 + <div class="form-row">
  23 + <div class="field-container">
  24 + <%= f.label :email, class: 'control-label' %><br />
  25 + <%= f.email_field :email, class: 'text-field' %>
13 26  
14   - <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
15   - <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
16   - <% end %>
  27 + <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
  28 + <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
  29 + <% end %>
  30 + </div>
  31 + <div class="help-container">
  32 + <p>
  33 + Your email is the form of communication we have with you, so make sure you typed it correctly!
  34 + </p>
  35 + </div>
  36 + </div>
17 37  
18   - <div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
19   - <%= f.password_field :password, :autocomplete => "off" %></div>
  38 + <div class="form-row">
  39 + <div class="field-container">
  40 + <%= f.label :password, class: 'control-label' %> <i>(leave blank if you don't want to change it)</i><br />
  41 + <%= f.password_field :password, :autocomplete => "off", class: 'text-field' %>
  42 + </div>
  43 + <div class="help-container">
  44 + <p>
  45 + Your password must be at least 8 characters. Strong passwords contain characters in upper and lowercase, numbers and symbols.
  46 + </p>
  47 + </div>
  48 + </div>
20 49  
21   - <div><%= f.label :password_confirmation %><br />
22   - <%= f.password_field :password_confirmation %></div>
  50 + <div class="form-row">
  51 + <div class="field-container">
  52 + <%= f.label :password_confirmation, class: 'control-label' %><br />
  53 + <%= f.password_field :password_confirmation, class: 'text-field' %>
  54 + </div>
  55 + <div class="help-container">
  56 + <p>
  57 + Confirm your password!
  58 + </p>
  59 + </div>
  60 + </div>
23 61  
24   - <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
25   - <%= f.password_field :current_password %></div>
  62 + <div class="form-row">
  63 + <div class="field-container">
  64 + <%= f.label :current_password, class: 'control-label' %><br />
  65 + <%= f.password_field :current_password, class: 'text-field' %>
  66 + </div>
  67 + <div class="help-container">
  68 + <p>
  69 + We need your current password to confirm your changes!
  70 + </p>
  71 + </div>
  72 + </div>
  73 + </div>
  74 + </div>
26 75  
27   - <div><%= f.submit "Update", class: 'btn btn-primary' %></div>
  76 + <div class="row margin-left-none" style="margin-top: 20px">
  77 + <%= f.submit "Update", class: 'btn btn-primary span2' %>
  78 + </div>
28 79 <% end %>
29 80  
30 81 <hr />
... ...