Fixing up the signin/signup pages
This commit is contained in:
parent
1d7670d74e
commit
1dddf00d96
13 changed files with 47 additions and 47 deletions
|
|
@ -18,4 +18,4 @@
|
|||
= f.input :password, :hint => "(Leave blank if you don't want to change it)", :input_html => {:autocomplete => "off"}
|
||||
= f.input :password_confirmation, :input_html => {:autocomplete => "off"}
|
||||
= f.input :current_password, :input_html => {:autocomplete => "off"}, :hint => "(we need your current password to confirm password or email changes)"
|
||||
= f.submit "Update"
|
||||
= f.action :submit, :as => :button, :label => "Update", :button_html => {:class => "btn btn-primary"}
|
||||
|
|
|
|||
14
app/views/devise/registrations/new.html.haml
Normal file
14
app/views/devise/registrations/new.html.haml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
.container
|
||||
%h2.center-text
|
||||
Sign Up
|
||||
.row-fluid
|
||||
.well.span3.offset2
|
||||
= semantic_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
|
||||
= f.input :email
|
||||
= f.input :password
|
||||
= f.input :password_confirmation
|
||||
= f.action :submit, :as => :button, :label => "Sign Up", :button_html => {:class => "btn btn-primary"}
|
||||
.well.span3.offset2
|
||||
%h4
|
||||
Already have an account?
|
||||
= render "devise/shared/links"
|
||||
|
|
@ -1,13 +1,15 @@
|
|||
.container
|
||||
%h2.center-text
|
||||
Sign in
|
||||
.row
|
||||
.span6.offset3
|
||||
Sign In
|
||||
.row-fluid
|
||||
.well.span3.offset2
|
||||
= semantic_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
|
||||
= f.input :email
|
||||
= f.input :password
|
||||
- if devise_mapping.rememberable?
|
||||
= f.input :remember_me, :as=> :boolean
|
||||
= f.submit "Sign in"
|
||||
|
||||
= f.input :remember_me, :as=> :boolean, :label => false
|
||||
= f.action :submit, :as => :button, :label => "Sign In", :button_html => {:class => "btn btn-primary"}
|
||||
.well.span3.offset2
|
||||
%h4
|
||||
No account?
|
||||
= render "devise/shared/links"
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to "Sign in", new_session_path(resource_name) %><br />
|
||||
<% 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' %>
|
||||
<%= 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? %>
|
||||
<%- resource_class.omniauth_providers.each do |provider| %>
|
||||
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
22
app/views/devise/shared/_links.html.haml
Normal file
22
app/views/devise/shared/_links.html.haml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
- if controller_name != 'sessions'
|
||||
= button_to "Sign In", new_session_path(resource_name), :method => :get, :class => "btn btn-primary", :style=> "margin-top: 5px"
|
||||
|
||||
- if devise_mapping.registerable? && controller_name != 'registrations'
|
||||
= button_to "Sign Up", new_registration_path(resource_name), :method => :get, :class => "btn btn-primary", :style=> "margin-top: 5px"
|
||||
|
||||
- if devise_mapping.recoverable? && controller_name != 'passwords'
|
||||
= link_to "Forgot your password?", new_password_path(resource_name)
|
||||
%br
|
||||
|
||||
- if devise_mapping.confirmable? && controller_name != 'confirmations'
|
||||
= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
|
||||
%br
|
||||
|
||||
- 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
|
||||
|
||||
- if devise_mapping.omniauthable?
|
||||
- resource_class.omniauth_providers.each do |provider|
|
||||
= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue