Commit 2a6d1d97 by Thanh Hung Pham

Change layout

parent ef114004
<h2>Change your password</h2> <%- provide(:title, 'Change password') -%>
<div class="well">
<h2>Change your password</h2>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %> <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
<%= devise_error_messages! %> <%= devise_error_messages! %>
<%= f.hidden_field :reset_password_token %> <%= f.hidden_field :reset_password_token %>
<div class="field"> <div class="form-group">
<%= f.label :password, "New password" %><br /> <%= f.label :password, "New password" %>
<% if @minimum_password_length %> <%= f.password_field :password, autofocus: true, autocomplete: "off", class: 'form-control' %>
<em>(<%= @minimum_password_length %> characters minimum)</em><br /> </div>
<% end %>
<%= f.password_field :password, autofocus: true, autocomplete: "off" %>
</div>
<div class="field"> <div class="form-group">
<%= f.label :password_confirmation, "Confirm new password" %><br /> <%= f.label :password_confirmation, "Confirm new password" %>
<%= f.password_field :password_confirmation, autocomplete: "off" %> <%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control' %>
</div> </div>
<div class="actions"> <div class="actions">
<%= f.submit "Change my password" %> <%= f.submit "Change my password", class: 'btn btn-primary' %>
</div> </div>
<% end %> <% end %>
</div>
<%= render "devise/shared/links" %>
<h2>Forgot your password?</h2> <%- provide(:title, 'Forgot password') -%>
<div class="well">
<h2>Forgot your password?</h2>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
<%= devise_error_messages! %> <%= devise_error_messages! %>
<div class="field"> <div class="form-group">
<%= f.label :email %><br /> <%= f.label :email %>
<%= f.email_field :email, autofocus: true %> <%= f.email_field :email, autofocus: true, class: 'form-control' %>
</div> </div>
<div class="actions"> <div class="actions">
<%= f.submit "Send me reset password instructions" %> <%= f.submit "Send", class: 'btn btn-primary' %>
</div> </div>
<% end %> <% end %>
</div>
<%= render "devise/shared/links" %>
...@@ -25,6 +25,4 @@ ...@@ -25,6 +25,4 @@
<%= f.submit "Confirm your email", class: 'btn btn-primary' %> <%= f.submit "Confirm your email", class: 'btn btn-primary' %>
<% end %> <% end %>
<!--
<%= render "devise/shared/links" %> -->
</div> </div>
<h2>Log in</h2> <%- provide(:title, 'Login') -%>
<div class="well">
<h2>Log in</h2>
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="field"> <div class="form-group">
<%= f.label :email %><br /> <%= f.label :email %>
<%= f.email_field :email, autofocus: true %> <%= f.email_field :email, autofocus: true, class: 'form-control' %>
</div> </div>
<div class="field">
<%= f.label :password %><br />
<%= f.password_field :password, autocomplete: "off" %>
</div>
<% if devise_mapping.rememberable? -%> <div class="form-group">
<div class="field"> <%= f.label :password %><br />
<%= f.check_box :remember_me %> <%= f.password_field :password, autocomplete: "off", class: 'form-control' %>
<%= f.label :remember_me %> <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
<% end -%>
</div> </div>
<% end -%>
<div class="actions"> <% if devise_mapping.rememberable? -%>
<%= f.submit "Log in" %> <div class="form-group">
</div> <%= f.check_box :remember_me %>
<% end %> <%= f.label :remember_me %>
</div>
<% end -%>
<%= render "devise/shared/links" %> <div class="actions">
<%= f.submit "Log in", class: 'btn btn-primary' %>
<%= link_to 'Register', new_user_registration_path, class: 'btn btn-primary'%>
</div>
<% end %>
</div>
...@@ -2,22 +2,6 @@ ...@@ -2,22 +2,6 @@
<%= link_to "Log in", new_session_path(resource_name) %><br /> <%= link_to "Log in", new_session_path(resource_name) %><br />
<% end -%> <% end -%>
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.omniauthable? %> <%- if devise_mapping.omniauthable? %>
<%- resource_class.omniauth_providers.each do |provider| %> <%- resource_class.omniauth_providers.each do |provider| %>
<%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %><br /> <%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %><br />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment