summaryrefslogtreecommitdiff
path: root/app/views/users/_destroy_account.html.haml
blob: 66a7dc2775ab5e9aa7bb0ecd8c0c59ef3551aae9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-#
-# DESTROY ACCOUNT
-#

%legend
  = destroy_account_text
%p= t(:destroy_account_info)
= form_tag user_path(@user), method: :delete do
  .checkbox
    = label_tag do
      = check_box_tag 'block_username', 1, true
      = t(:keep_username_blocked)
  = submit_tag destroy_account_text, class: "btn btn-danger"

- if @user != current_user and @user.enabled?
  %legend
    = t(:deactivate_account, :username => @user.login)
  %p= t(:deactivate_description)
  = btn deactivate_user_path(@user), :method => :post, :type => "warning"  do
    %i.icon-pause.icon-white
    = t(:deactivate)
- elsif @user != current_user and !@user.enabled?
  %legend
    = t(:enable_account, :username => @user.login)
  %p= t(:enable_description)
  = btn enable_user_path(@user), :method => :post, :type => "warning"  do
    %i.icon-ok.icon-white
    = t(:enable)