Skip to content

Commit 903301f

Browse files
author
Nicholas Watson
committed
move devise views
1 parent 7b51367 commit 903301f

File tree

12 files changed

+165
-4
lines changed

12 files changed

+165
-4
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<div>
2+
<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
3+
<fieldset>
4+
<legend>Resend confirmation instructions</legend>
5+
<%= devise_error_messages! %>
6+
<div class="control-group">
7+
<%= f.label :email, class: "control-label" %>
8+
<div class="controls">
9+
<%= f.text_field :email %>
10+
</div>
11+
</div>
12+
<div class="form-actions">
13+
<%= f.submit "Resend confirmation instructions", :class => 'btn btn-primary' %>
14+
</div>
15+
</fieldset>
16+
<% end %>
17+
</div>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<div>
2+
<%= form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => { :method => :put } do |f| %>
3+
<fieldset>
4+
<legend>Send invitation</legend>
5+
<%= devise_error_messages! %>
6+
<%= f.hidden_field :invitation_token %>
7+
<div class="control-group">
8+
<%= f.label :password , class: "control-label" %>
9+
<div class="controls">
10+
<%= f.password_field :password %>
11+
</div>
12+
</div>
13+
<div class="control-group">
14+
<%= f.label :password_confirmation, class: "control-label" %>
15+
<div class="controls">
16+
<%= f.password_field :password_confirmation %>
17+
</div>
18+
</div>
19+
<div class="form-actions">
20+
<%= f.submit "Set my password", :class => 'btn btn-primary' %>
21+
</div>
22+
</fieldset>
23+
<% end %>
24+
</div>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<div>
2+
<%= form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :post} do |f| %>
3+
<fieldset>
4+
<legend>Send invitation</legend>
5+
<%= devise_error_messages! %>
6+
<div class="control-group">
7+
<%= f.label :email, class: "control-label" %>
8+
<div class="controls">
9+
<%= f.text_field :email %>
10+
</div>
11+
</div>
12+
<div class="form-actions">
13+
<%= f.submit "Send an invitation", :class => 'btn btn-primary' %>
14+
</div>
15+
</fieldset>
16+
<% end %>
17+
</div>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<p>Welcome <%= @resource.email %>!</p>
2+
3+
<p>You can confirm your account through the link below:</p>
4+
5+
<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<p>Hello <%= @resource.email %>!</p>
2+
3+
<p>Someone has invited you to <%= root_url %>, you can accept it through the link below.</p>
4+
5+
<p><%= link_to 'Accept invitation', accept_invitation_url(@resource, :invitation_token => @resource.invitation_token) %></p>
6+
7+
<p>If you don't want to accept the invitation, please ignore this email.<br />
8+
Your account won't be created until you access the link above and set your password.</p>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<p>Hello <%= @resource.email %>!</p>
2+
3+
<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
4+
5+
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
6+
7+
<p>If you didn't request this, please ignore this email.</p>
8+
<p>Your password won't change until you access the link above and create a new one.</p>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<p>Hello <%= @resource.email %>!</p>
2+
3+
<p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
4+
5+
<p>Click the link below to unlock your account:</p>
6+
7+
<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<div>
2+
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
3+
<fieldset>
4+
<legend>Change your password<</legend>
5+
<%= devise_error_messages! %>
6+
<%= f.hidden_field :reset_password_token %>
7+
<div class="control-group">
8+
<%= f.label :password, "New password", class: "control-label" %>
9+
<div class="controls">
10+
<%= f.password_field :password %>
11+
</div>
12+
</div>
13+
<div class="control-group">
14+
<%= f.label :password_confirmation, "Confirm new password", class: "control-label" %>
15+
<div class="controls">
16+
<%= f.password_field :password_confirmation %>
17+
</div>
18+
</div>
19+
<div class="form-actions">
20+
<%= f.submit "Change my password", class: "btn btn-primary" %>
21+
<%= render :partial => "devise/shared/links" %>
22+
</div>
23+
</fieldset>
24+
<% end %>
25+
</div>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<div>
2+
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
3+
<fieldset>
4+
<legend>Forgot your password?</legend>
5+
<%= devise_error_messages! %>
6+
<div class="control-group">
7+
<%= f.label :email, class: "control-label" %>
8+
<div class="controls">
9+
<%= f.email_field :email %>
10+
</div>
11+
</div>
12+
<div class="form-actions">
13+
<%= f.submit "Send me reset password instructions", class: "btn btn-primary" %>
14+
<%= render :partial => "devise/shared/links" %>
15+
</div>
16+
</fieldset>
17+
<% end %>
18+
</div>

app/views/devise/shared/_links.erb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
2+
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
3+
<% end -%>
4+
5+
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
6+
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
7+
<% end -%>
8+
9+
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
10+
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
11+
<% end -%>
12+
13+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
14+
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
15+
<% end -%>

0 commit comments

Comments
 (0)