-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #192 from tosdr/fix-user-delete-account
Fix user delete account
- Loading branch information
Showing
3 changed files
with
31 additions
and
20 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,28 +1,34 @@ | ||
<h2>Edit <%= resource_name.to_s.humanize %></h2> | ||
<div class="container mwd"> | ||
<div class="row"> | ||
|
||
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> | ||
<%= f.error_notification %> | ||
|
||
<div class="form-inputs"> | ||
<%= f.input :username, required: true, autofocus: true %> | ||
<%= f.input :email, required: true, autofocus: true %> | ||
<h2>Edit <%= resource_name.to_s.humanize %></h2> | ||
|
||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> | ||
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> | ||
<%= f.error_notification %> | ||
|
||
<div class="form-inputs"> | ||
<%= f.input :username, required: true, autofocus: true %> | ||
<%= f.input :email, required: true, autofocus: true %> | ||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> | ||
<p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p> | ||
<% end %> | ||
<% end %> | ||
<%= f.input :password, autocomplete: "off", hint: "leave it blank if you don't want to change it", required: false %> | ||
<%= f.input :password_confirmation, required: false %> | ||
<%= f.input :current_password, hint: "we need your current password to confirm your changes", required: true %> | ||
</div> | ||
<%= f.input :password, autocomplete: "off", hint: "leave it blank if you don't want to change it", required: false %> | ||
<%= f.input :password_confirmation, required: false %> | ||
<%= f.input :current_password, hint: "we need your current password to confirm your changes", required: true %> | ||
</div> | ||
|
||
<div class="form-actions"> | ||
<%= f.button :submit, "Update" %> | ||
</div> | ||
<% end %> | ||
<div class="form-actions"> | ||
<%= f.button :submit, "Update" %> | ||
</div> | ||
<% end %> | ||
|
||
<h3>Cancel my account</h3> | ||
<h3>Cancel my account</h3> | ||
|
||
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p> | ||
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p> | ||
|
||
<%= link_to "Back", :back %> | ||
<%= link_to "Back", :back %> | ||
</div> | ||
</div> |
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