summaryrefslogtreecommitdiff
path: root/app/views/users/_destroy_account.html.haml
blob: de1fd64f3cba846d8c1f97b03a996e6311694156 (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
29
30
-#
-# 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)
  = button_tag class: "btn btn-danger" do
    = icon(:remove)
    = @user == current_user ? destroy_account_text : t(:destroy)

- 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
    = icon :pause
    = 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
    = icon :ok
    = t(:enable)