-
Notifications
You must be signed in to change notification settings - Fork 48
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 #2544 from pat-son/noUserSelfDelete
Removed the ability to delete your own account
- Loading branch information
Showing
1 changed file
with
30 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,46 @@ | ||
<%= devise_error_messages! %><br> | ||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> | ||
<div class="row"> | ||
<div class="col-lg-6 col-lg-offset-3"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h3>Account Update</h3> | ||
</div> | ||
<div class="row"> | ||
<div class="col-lg-6 col-lg-offset-3"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h3>Account Update</h3> | ||
</div> | ||
|
||
<div class="panel-body"> | ||
|
||
|
||
<div class="form-group"> | ||
<%= f.label :email %><br /> | ||
<%= f.email_field :email, autofocus: true, class: "form-control" %> | ||
</div> | ||
<div class="panel-body"> | ||
|
||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> | ||
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> | ||
<% end %> | ||
|
||
<div class="form-group"> | ||
<%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br /> | ||
<%= f.password_field :current_password, autocomplete: "off", class: "form-control" %> | ||
</div> | ||
<hr> | ||
<div class="form-group"> | ||
<%= f.label :password %> <i>(8 character minimum)</i><br /> | ||
<%= f.password_field :password, autocomplete: "off", class: "form-control", placeholder: "Leave blank if you don't want to change it" %> | ||
</div> | ||
<div class="form-group"> | ||
<%= f.label :email %><br /> | ||
<%= f.email_field :email, autofocus: true, class: "form-control" %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :password_confirmation %><br /> | ||
<%= f.password_field :password_confirmation, autocomplete: "off", class: "form-control" %> | ||
</div> | ||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> | ||
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> | ||
<% end %> | ||
|
||
<div class="form-group"> | ||
<%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br /> | ||
<%= f.password_field :current_password, autocomplete: "off", class: "form-control" %> | ||
</div> | ||
<div class="panel-footer"> | ||
<hr> | ||
<div class="form-group"> | ||
<%= f.submit "Update", class: "mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--blue" %> | ||
<%= f.label :password %> <i>(8 character minimum)</i><br /> | ||
<%= f.password_field :password, autocomplete: "off", class: "form-control", placeholder: "Leave blank if you don't want to change it" %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> | ||
<div class="row"> | ||
<div class="col-lg-6 col-lg-offset-3"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h3>Cancel my account</h3> | ||
|
||
<div class="form-group"> | ||
<%= f.label :password_confirmation %><br /> | ||
<%= f.password_field :password_confirmation, autocomplete: "off", class: "form-control" %> | ||
</div> | ||
<div class="panel-body"> | ||
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: "mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--red" %></p> | ||
|
||
</div> | ||
<div class="panel-footer"> | ||
<div class="form-group"> | ||
<%= f.submit "Update", class: "mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--blue" %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> |