emails: move edit email flow to emails controller.
This commit is contained in:
15
app/views/emails/edit.html.erb
Normal file
15
app/views/emails/edit.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
<% page_title "Change Email" %>
|
||||
|
||||
<div id="c-emails">
|
||||
<div id="a-edit">
|
||||
<h1>Change Email</h1>
|
||||
|
||||
<p>You must confirm your password in order to change your email address.</p>
|
||||
|
||||
<%= edit_form_for(@user, url: user_email_path(@user)) do |f| %>
|
||||
<%= f.input :password %>
|
||||
<%= f.input :email %>
|
||||
<%= f.submit "Save" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,23 +0,0 @@
|
||||
<div id="c-maintenance-user-email-changes">
|
||||
<div id="a-new">
|
||||
<h1>Change Email</h1>
|
||||
|
||||
<p>You must confirm your password in order to change your email address.</p>
|
||||
|
||||
<%= form_tag(maintenance_user_email_change_path, :class => "simple_form") do %>
|
||||
<div class="input">
|
||||
<label>New Email</label>
|
||||
<%= email_field :email_change, :email %>
|
||||
</div>
|
||||
|
||||
<div class="input">
|
||||
<label>Password</label>
|
||||
<%= password_field :email_change, :password %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= submit_tag "Submit" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -31,7 +31,7 @@
|
||||
<em>blank</em>
|
||||
<% end %>
|
||||
|
||||
- <%= link_to "Change your email", new_maintenance_user_email_change_path %>
|
||||
- <%= link_to "Change your email", edit_user_email_path(@user) %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user