Commit 61dba93d757c995829807f00e93552e774becc43

Authored by Rafael Manzo
1 parent 0975a9e2

Restored devise views style

app/views/devise/passwords/new.html.erb
1   -<h2><%= t('.forgot_your_password', :default => 'Forgot your password?') %></h2>
  1 +<div class="page-header">
  2 + <h1><%= t('.forgot_your_password', :default => 'Forgot your password?') %></h1>
  3 +</div>
2 4  
3 5 <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
4 6 <%= devise_error_messages! %>
5 7  
6   - <div><%= f.label :email %><br />
7   - <%= f.email_field :email %></div>
  8 + <div class="row margin-left-none">
  9 + <div class="form-table col-md-9">
  10 + <div class="form-row">
  11 + <div class="field-container">
  12 + <%= f.label :email, class: "control-label" %>
  13 + <%= f.email_field :email, autofocus: true, class: 'text-field form-control' %>
  14 + </div>
  15 + <div class="help-container">
  16 + <p>
  17 + The same email address used to sign up.
  18 + </p>
  19 + </div>
  20 + </div>
  21 + </div>
  22 + </div>
8 23  
9   - <div><%= f.submit t('.send_me_reset_password_instructions', :default => "Send me reset password instructions") %></div>
  24 + <div class="row margin-left-none" style="margin-top: 20px">
  25 + <%= f.submit t('.send_me_reset_password_instructions', :default => "Send me reset password instructions"), class: 'btn btn-warning' %>
  26 + <%= render "devise/shared/links" %>
  27 + </div>
10 28 <% end %>
11   -
12   -<%= render "devise/shared/links" %>
... ...
app/views/devise/registrations/edit.html.erb
1   -<h2><%= t('.title', :resource => resource_class.model_name.human , :default => "Edit #{resource_name.to_s.humanize}") %></h2>
  1 +<div class="page-header">
  2 + <h1><%= t('.title', :resource => resource_class.model_name.human , :default => "Edit #{resource_name.to_s.humanize}") %></h1>
2 3  
3 4 <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
4 5 <%= devise_error_messages! %>
5 6  
6   - <div><%= f.label :email %><br />
7   - <%= f.email_field :email %></div>
  7 + <div class="row margin-left-none">
  8 + <div class="form-table col-md-9">
  9 + <div class="form-row">
  10 + <div class="field-container">
  11 + <%= f.label :name, class: 'control-label' %><br />
  12 + <%= f.email_field :name, :autofocus => true, class: 'text-field form-control' %>
  13 + </div>
  14 + <div class="help-container">
  15 + <p>
  16 + Your full name.
  17 + </p>
  18 + </div>
  19 + </div>
  20 + <div class="form-row">
  21 + <div class="field-container">
  22 + <%= f.label :email, class: 'control-label' %><br />
  23 + <%= f.email_field :email, class: 'text-field form-control' %>
  24 + <%- if devise_mapping.confirmable? && resource.pending_reconfirmation? -%>
  25 + <p>
  26 + <%= t('.currently_waiting_confirmation_for_email', :email => resource.unconfirmed_email, :default => "Currently waiting confirmation for: %{email}") %>
  27 + </p>
  28 + <%- end -%>
  29 + </div>
  30 + <div class="help-container">
  31 + <p>
  32 + Your email is our communication channel. Make sure you have typed it correctly.
  33 + </p>
  34 + </div>
  35 + </div>
8 36  
9   - <%- if devise_mapping.confirmable? && resource.pending_reconfirmation? -%>
10   - <p>
11   - <%= t('.currently_waiting_confirmation_for_email', :email => resource.unconfirmed_email, :default => "Currently waiting confirmation for: %{email}") %>
12   - </p>
13   - <%- end -%>
  37 + <div class="form-row">
  38 + <div class="field-container">
  39 + <%= f.label :password, class: 'control-label' %> <i>(<%= t('.leave_blank_if_you_don_t_want_to_change_it', :default => "leave blank if you don't want to change it") %>)</i><br />
  40 + <%= f.password_field :password, :autocomplete => "off", class: 'text-field form-control' %>
  41 + </div>
  42 + <div class="help-container">
  43 + <p>
  44 + Your password must have at least 8 characters. Strong passwords contain numbers, symbols, upper and lowercase characters.
  45 + </p>
  46 + </div>
  47 + </div>
14 48  
15   - <div><%= f.label :password %> <i>(<%= t('.leave_blank_if_you_don_t_want_to_change_it', :default => "leave blank if you don't want to change it") %>)</i><br />
16   - <%= f.password_field :password, :autocomplete => "off" %></div>
  49 + <div class="form-row">
  50 + <div class="field-container">
  51 + <%= f.label :password_confirmation, class: 'control-label' %><br />
  52 + <%= f.password_field :password_confirmation, class: 'text-field form-control' %>
  53 + </div>
  54 + <div class="help-container">
  55 + <p>
  56 + Confirm your password.
  57 + </p>
  58 + </div>
  59 + </div>
17 60  
18   - <div><%= f.label :password_confirmation %><br />
19   - <%= f.password_field :password_confirmation %></div>
  61 + <div class="form-row">
  62 + <div class="field-container">
  63 + <%= f.label :current_password, class: 'control-label' %> <i>(<%= t('.we_need_your_current_password_to_confirm_your_changes', :default => 'we need your current password to confirm your changes') %>)</i><br />
  64 + <%= f.password_field :current_password, class: 'text-field form-control' %>
  65 + </div>
  66 + <div class="help-container">
  67 + <p>
  68 + Your current password is needed to confirm your changes.
  69 + </p>
  70 + </div>
  71 + </div>
20 72  
21   - <div><%= f.label :current_password %> <i>(<%= t('.we_need_your_current_password_to_confirm_your_changes', :default => 'we need your current password to confirm your changes') %>)</i><br />
22   - <%= f.password_field :current_password %></div>
23   -
24   - <div><%= f.submit t('.update', :default => "Update") %></div>
  73 + <div class="row margin-left-none" style="margin-top: 20px">
  74 + <%= f.submit t('.update', :default => "Update"), class: 'btn btn-primary col-md-2' %>
  75 + </div>
  76 + </div>
  77 + </div>
25 78 <% end %>
26 79  
27   -<h3><%= t('.cancel_my_account', :default => 'Cancel my account') %></h3>
  80 +<h2><%= t('.cancel_my_account', :default => 'Cancel my account') %></h2>
28 81  
29 82 <p><%= t('.unhappy', :default => 'Unhappy') %>? <%= link_to t('.cancel_my_account', :default => "Cancel my account"), registration_path(resource_name), :data => { :confirm => t('.are_you_sure', :default => "Are you sure?") }, :method => :delete %>.</p>
30 83  
... ...
app/views/devise/registrations/new.html.erb
1   -<h2><%= t('.sign_up', :default => "Sign up") %></h2>
  1 +<div class="page-header">
  2 + <h1><%= t('.sign_up', :default => "Sign up") %></h1>
  3 +</div>
2 4  
3 5 <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
4 6 <%= devise_error_messages! %>
5 7  
6   - <div><%= f.label :email %><br />
7   - <%= f.email_field :email %></div>
  8 + <div class="row margin-left-none">
  9 + <div class="form-table col-md-9">
  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 form-control' %>
  14 + </div>
  15 + <div class="help-container">
  16 + <p>
  17 + Your full name.
  18 + </p>
  19 + </div>
  20 + </div>
8 21  
9   - <div><%= f.label :password %><br />
10   - <%= f.password_field :password %></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 form-control' %>
  26 + </div>
  27 + <div class="help-container">
  28 + <p>
  29 + Your email is our communication channel. Make sure you have typed it correctly.
  30 + </p>
  31 + </div>
  32 + </div>
11 33  
12   - <div><%= f.label :password_confirmation %><br />
13   - <%= f.password_field :password_confirmation %></div>
  34 + <div class="form-row">
  35 + <div class="field-container">
  36 + <%= f.label :password, class: 'control-label' %><br />
  37 + <%= f.password_field :password, class: 'text-field form-control' %>
  38 + </div>
  39 + <div class="help-container">
  40 + <p>
  41 + Your password must have at least 8 characters. Strong passwords contain numbers, symbols, upper and lowercase characters.
  42 + </p>
  43 + </div>
  44 + </div>
14 45  
15   - <div><%= f.submit t('.sign_up', :default => "Sign up") %></div>
16   -<% end %>
  46 + <div class="form-row">
  47 + <div class="field-container">
  48 + <%= f.label :password_confirmation, class: 'control-label' %><br />
  49 + <%= f.password_field :password_confirmation, class: 'text-field form-control' %>
  50 + </div>
  51 + <div class="help-container">
  52 + <p>
  53 + Confirm your password.
  54 + </p>
  55 + </div>
  56 + </div>
  57 + </div>
  58 + </div>
17 59  
18   -<%= render "devise/shared/links" %>
  60 + <div class="row margin-left-none" style="margin-top: 20px">
  61 + <%= f.submit t('.sign_up', :default => "Sign up"), class: 'btn btn-primary col-md-2' %>
  62 + </div>
  63 +<% end %>
... ...
app/views/devise/sessions/new.html.erb
1   -<h2><%= t('.sign_in', :default => "Sign in") %></h2>
  1 +<div class="page-header">
  2 + <h1><%= t('.sign_in', :default => "Sign in") %></h1>
  3 +</div>
2 4  
3 5 <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
4   - <div><%= f.label :email %><br />
5   - <%= f.email_field :email %></div>
  6 + <div class="row margin-left-none">
  7 + <div class="form-table col-md-9">
  8 + <div class="form-row">
  9 + <div class="field-container">
  10 + <%= f.label :email %><br />
  11 + <%= f.email_field :email %>
  12 + </div>
  13 + <div class="help-container">
  14 + <p>
  15 + The same email address used to sign up.
  16 + </p>
  17 + </div>
  18 + </div>
6 19  
7   - <div><%= f.label :password %><br />
8   - <%= f.password_field :password %></div>
  20 + <div class="form-row">
  21 + <div class="field-container">
  22 + <%= f.label :password %><br />
  23 + <%= f.password_field :password %>
  24 + </div>
  25 + <div class="help-container">
  26 + <p>
  27 + If you forgot your password, follow this <a href="/users/password/new">link</a> to reset it.
  28 + </p>
  29 + </div>
  30 + </div>
9 31  
10   - <% if devise_mapping.rememberable? -%>
11   - <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
12   - <% end -%>
  32 + <% if devise_mapping.rememberable? -%>
  33 + <div class="form-row">
  34 + <div class="field-container">
  35 + <%= f.check_box :remember_me %> <%= f.label :remember_me %>
  36 + </div>
  37 + <div class="help-container">
  38 + <p>
  39 + Stay logged in.
  40 + </p>
  41 + </div>
  42 + </div>
  43 + <% end -%>
  44 + </div>
  45 + </div>
13 46  
14   - <div><%= f.submit t('.sign_in', :default => "Sign in") %></div>
  47 + <div class="row margin-left-none" style="margin-top: 20px">
  48 + <%= f.submit t('.sign_in', :default => "Sign in"), class: 'btn btn-primary', :tabindex => 3 %>
  49 + <%= render "devise/shared/links" %>
  50 + </div>
15 51 <% end %>
16   -
17   -<%= render "devise/shared/links" %>
... ...
app/views/devise/shared/_links.erb
1 1 <%- if controller_name != 'sessions' %>
2   -<%= link_to t(".sign_in", :default => "Sign in"), new_session_path(resource_name) %><br />
  2 +<%= link_to t(".sign_in", :default => "Sign in"), new_session_path(resource_name), class: 'btn btn-info' %>
3 3 <% end -%>
4 4  
5 5 <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6   -<%= link_to t(".sign_up", :default => "Sign up"), new_registration_path(resource_name) %><br />
  6 +<%= link_to t(".sign_up", :default => "Sign up"), new_registration_path(resource_name), class: 'btn btn-info' %>
7 7 <% end -%>
8 8  
9   -<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
10   -<%= link_to t(".forgot_your_password", :default => "Forgot your password?"), new_password_path(resource_name) %><br />
11   -<% end -%>
  9 +<!-- <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
  10 +<%= link_to t(".forgot_your_password", :default => "Forgot your password?"), new_password_path(resource_name) %>
  11 +<% end -%> -->
12 12  
13 13 <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14   -<%= link_to t('.didn_t_receive_confirmation_instructions', :default => "Didn't receive confirmation instructions?"), new_confirmation_path(resource_name) %><br />
  14 +<%= link_to t('.didn_t_receive_confirmation_instructions', :default => "Didn't receive confirmation instructions?"), new_confirmation_path(resource_name), class: 'btn btn-info' %>
15 15 <% end -%>
16 16  
17 17 <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18   -<%= link_to t('.didn_t_receive_unlock_instructions', :default => "Didn't receive unlock instructions?"), new_unlock_path(resource_name) %><br />
  18 +<%= link_to t('.didn_t_receive_unlock_instructions', :default => "Didn't receive unlock instructions?"), new_unlock_path(resource_name), class: 'btn btn-info' %>
19 19 <% end -%>
20 20  
21 21 <%- if devise_mapping.omniauthable? %>
22 22 <%- resource_class.omniauth_providers.each do |provider| %>
23   - <%= link_to t('.sign_in_with_provider', :provider => provider.to_s.titleize, :default => "Sign in with #{provider.to_s.titleize}"), omniauth_authorize_path(resource_name, provider) %><br />
  23 + <%= link_to t('.sign_in_with_provider', :provider => provider.to_s.titleize, :default => "Sign in with #{provider.to_s.titleize}"), omniauth_authorize_path(resource_name, provider), class: 'btn btn-info' %>
24 24 <% end -%>
25 25 <% end -%>
26 26 \ No newline at end of file
... ...