From 28f0c4f131b02ab67bd9c254f9853168ec6a5b65 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 15 Apr 2012 14:31:54 +0000 Subject: Adds the ability for users to delete their own account (#10664). Can be disabled in application settings. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9417 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/my/_sidebar.html.erb | 3 +++ app/views/my/destroy.html.erb | 11 +++++++++++ app/views/settings/_authentication.html.erb | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 app/views/my/destroy.html.erb (limited to 'app/views') diff --git a/app/views/my/_sidebar.html.erb b/app/views/my/_sidebar.html.erb index 407fe990f..c89e6f3b4 100644 --- a/app/views/my/_sidebar.html.erb +++ b/app/views/my/_sidebar.html.erb @@ -3,6 +3,9 @@

<%=l(:field_login)%>: <%= link_to_user(@user, :format => :username) %>
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %>

+<% if @user.own_account_deletable? %> +

<%= link_to(l(:button_delete_my_account), {:action => 'destroy'}, :class => 'icon icon-del') %>

+<% end %>

<%= l(:label_feeds_access_key) %>

diff --git a/app/views/my/destroy.html.erb b/app/views/my/destroy.html.erb new file mode 100644 index 000000000..5d6eaa004 --- /dev/null +++ b/app/views/my/destroy.html.erb @@ -0,0 +1,11 @@ +

<%=l(:label_confirmation)%>

+
+

<%= simple_format l(:text_account_destroy_confirmation)%>

+

+ <% form_tag({}) do %> + + <%= submit_tag l(:button_delete_my_account) %> | + <%= link_to l(:button_cancel), :action => 'account' %> + <% end %> +

+
diff --git a/app/views/settings/_authentication.html.erb b/app/views/settings/_authentication.html.erb index bec373805..14396e274 100644 --- a/app/views/settings/_authentication.html.erb +++ b/app/views/settings/_authentication.html.erb @@ -10,6 +10,8 @@ [l(:label_registration_manual_activation), "2"], [l(:label_registration_automatic_activation), "3"]] %>

+

<%= setting_check_box :unsubscribe %>

+

<%= setting_text_field :password_min_length, :size => 6 %>

<%= setting_check_box :lost_password, :label => :label_password_lost %>

-- cgit v1.2.3