-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Styled devise views for signin and password reset
- Loading branch information
Showing
6 changed files
with
122 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,39 @@ | ||
<h2>Change your password</h2> | ||
<section class="C no"> | ||
<header> | ||
<h1>Change Password</h1> | ||
</header> | ||
<div class="C-cont"> | ||
<article> | ||
|
||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %> | ||
<%= devise_error_messages! %> | ||
<%= f.hidden_field :reset_password_token %> | ||
|
||
<fieldset> | ||
<div class="clearfix"> | ||
<%= f.label :password, "New password" %> | ||
<div class="input"> | ||
<%= f.password_field :password %> | ||
</div> | ||
</div> | ||
|
||
<div class="clearfix"> | ||
<%= f.label :password_confirmation, "Repeat password" %> | ||
<div class="input"> | ||
<%= f.password_field :password_confirmation %> | ||
</div> | ||
</div> | ||
</fieldset> | ||
|
||
<div class="submit_bar actions"> | ||
<%= f.submit "Change Password" %> | ||
| ||
<%= render :partial => "devise/shared/links" %> | ||
</div> | ||
|
||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %> | ||
<%= devise_error_messages! %> | ||
<%= f.hidden_field :reset_password_token %> | ||
<% end %> | ||
|
||
<p><%= f.label :password, "New password" %><br /> | ||
<%= f.password_field :password %></p> | ||
|
||
<p><%= f.label :password_confirmation, "Confirm new password" %><br /> | ||
<%= f.password_field :password_confirmation %></p> | ||
|
||
<p><%= f.submit "Change my password" %></p> | ||
<% end %> | ||
<%= render :partial => "devise/shared/links" %> | ||
</article> | ||
<div class="clear"></div> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,32 @@ | ||
<h2>Forgot your password?</h2> | ||
<section class="C no"> | ||
<header> | ||
<%= back_button :back %> | ||
<h1>Forgot your password?</h1> | ||
</header> | ||
<div class="C-cont"> | ||
<article> | ||
|
||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %> | ||
<%= devise_error_messages! %> | ||
|
||
<fieldset> | ||
<div class="clearfix"> | ||
<%= f.label :email %> | ||
<div class="input"> | ||
<%= f.email_field :email %> | ||
</div> | ||
</div> | ||
</fieldset> | ||
|
||
<div class="submit_bar actions"> | ||
<%= f.submit "Send Reset Instructions" %> | ||
| ||
<%= render :partial => "devise/shared/links" %> | ||
</div> | ||
|
||
<% end %> | ||
|
||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %> | ||
<%= devise_error_messages! %> | ||
|
||
<p><%= f.label :email %><br /> | ||
<%= f.email_field :email %></p> | ||
|
||
<p><%= f.submit "Send me reset password instructions" %></p> | ||
<% end %> | ||
<%= render :partial => "devise/shared/links" %> | ||
</article> | ||
<div class="clear"></div> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> | ||
<fieldset> | ||
<div class="clearfix"> | ||
<%= f.label :email %> | ||
<div class="input"> | ||
<%= f.email_field :email %> | ||
</div> | ||
</div> | ||
<div class="clearfix"> | ||
<%= f.label :password %> | ||
<div class="input"> | ||
<%= f.password_field :password %> | ||
</div> | ||
</div> | ||
<% if devise_mapping.rememberable? -%> | ||
<div class="input"> | ||
<%= f.check_box :remember_me %> <%= f.label :remember_me %> | ||
</div> | ||
<% end -%> | ||
</fieldset> | ||
|
||
<div class="submit_bar actions"> | ||
<%= f.submit "Sign in" %> | ||
| ||
<%= render :partial => "devise/shared/links" %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
<h2>Sign in</h2> | ||
|
||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> | ||
<p><%= f.label :email %><br /> | ||
<%= f.email_field :email %></p> | ||
|
||
<p><%= f.label :password %><br /> | ||
<%= f.password_field :password %></p> | ||
|
||
<% if devise_mapping.rememberable? -%> | ||
<p><%= f.check_box :remember_me %> <%= f.label :remember_me %></p> | ||
<% end -%> | ||
|
||
<p><%= f.submit "Sign in" %></p> | ||
<% end %> | ||
<%= render :partial => "devise/shared/links" %> | ||
<section class="C no"> | ||
<header> | ||
<%= back_button :back %> | ||
<h1>Sign In</h1> | ||
</header> | ||
<div class="C-cont"> | ||
<article> | ||
<%= render 'form' %> | ||
</article> | ||
<div class="clear"></div> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
<%- if controller_name != 'sessions' %> | ||
<%= link_to "Sign in", new_session_path(resource_name) %><br /> | ||
<%= link_to "Sign in", new_session_path(resource_name) %> | ||
<% end -%> | ||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %> | ||
<%= link_to "Register Account", new_registration_path(resource_name) %><br /> | ||
<%= link_to "Register Account", new_registration_path(resource_name) %> | ||
<% end -%> | ||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %> | ||
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br /> | ||
<%= link_to "Forgot your password?", new_password_path(resource_name) %> | ||
<% end -%> | ||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> | ||
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br /> | ||
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %> | ||
<% 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 /> | ||
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %> | ||
<% 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 /> | ||
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %> | ||
<% end -%> | ||
<% end -%> |