Skip to content

Commit

Permalink
move delete outside form
Browse files Browse the repository at this point in the history
  • Loading branch information
mwvolo committed Oct 8, 2024
1 parent a62c119 commit a44a05c
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions app/views/admin/users/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -395,20 +395,25 @@
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<%= f.submit 'Save', class: 'btn btn-primary' %>

<%= button_to('Delete',
admin_user_path,
class: 'btn btn-danger pull-right',
data: {
confirm: 'Are you sure you want to completely destroy this user account? This is irreversible!',
disable_with: 'Destroying...'
},
method: :delete)
%>
</div>
</div>
<% end %>

<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<%= link_to('Destroy User Account',
admin_user_path(@user),
class: 'btn btn-danger pull-right',
style: 'margin-top: -50px; padding-top: -50px;',
data: {
confirm: 'Are you sure you want to completely destroy this user account? This is irreversible!',
disable_with: 'Destroying...'
},
method: :delete)
%>
</div>
</div>

<% if @user.external_ids.any? %>
<h4>External IDs</h4>

Expand Down

0 comments on commit a44a05c

Please sign in to comment.