Commit c83187ebb2494563078fd0feb7378efa75977ba1
1 parent
780ecdcc
Exists in
colab
and in
4 other branches
Modifying the Edit User using css tooltips for the following usability standards defined
Showing
1 changed file
with
69 additions
and
17 deletions
Show diff stats
app/views/devise/registrations/edit.html.erb
... | ... | @@ -2,29 +2,81 @@ |
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 %><br /> | |
13 | + <%= f.text_field :name, :autofocus => true %> | |
14 | + </div> | |
15 | + <div class="help-container"> | |
16 | + <p> | |
17 | + Your full name! | |
18 | + </p> | |
19 | + </div> | |
20 | + </div> | |
21 | + | |
22 | + <div class="form-row"> | |
23 | + <div class="field-container"> | |
24 | + <%= f.label :email %><br /> | |
25 | + <%= f.email_field :email %> | |
10 | 26 | |
11 | - <div><%= f.label :email %><br /> | |
12 | - <%= f.email_field :email %></div> | |
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> | |
37 | + | |
38 | + <div class="form-row"> | |
39 | + <div class="field-container"> | |
40 | + <%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br /> | |
41 | + <%= f.password_field :password, :autocomplete => "off" %> | |
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> | |
49 | + | |
50 | + <div class="form-row"> | |
51 | + <div class="field-container"> | |
52 | + <%= f.label :password_confirmation %><br /> | |
53 | + <%= f.password_field :password_confirmation %> | |
54 | + </div> | |
55 | + <div class="help-container"> | |
56 | + <p> | |
57 | + Confirm your password! | |
58 | + </p> | |
59 | + </div> | |
60 | + </div> | |
13 | 61 | |
14 | - <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> | |
15 | - <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> | |
16 | - <% end %> | |
62 | + <div class="form-row"> | |
63 | + <div class="field-container"> | |
64 | + <%= f.label :current_password %><br /> | |
65 | + <%= f.password_field :current_password %> | |
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> | |
17 | 75 | |
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> | |
20 | 76 | |
21 | - <div><%= f.label :password_confirmation %><br /> | |
22 | - <%= f.password_field :password_confirmation %></div> | |
23 | - | |
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> | |
26 | - | |
27 | - <div><%= f.submit "Update", class: 'btn btn-primary' %></div> | |
77 | + <div class="row margin-left-none" style="margin-top: 20px"> | |
78 | + <%= f.submit "Update", class: 'btn btn-primary span2' %> | |
79 | + </div> | |
28 | 80 | <% end %> |
29 | 81 | |
30 | 82 | <hr /> | ... | ... |