diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 4f47ee730..aea10ee1d 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -83,8 +83,7 @@ class UsersController < ApplicationController if params[:user] && params[:user][:current_password] && current_user.valid_password?(params[:user][:current_password]) current_user.close_account! sign_out current_user - flash[:notice] = I18n.t 'users.destroy.success' - redirect_to multi_path + redirect_to(multi_path, :notice => I18n.t('users.destroy.success')) else if params[:user].present? && params[:user][:current_password].present? flash[:error] = t 'users.destroy.wrong_password' diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index d0e6ac949..751fdcea9 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -166,11 +166,42 @@ .span-5.last %h3 = t('.close_account') - = form_for 'user', :url => user_path, :html => { :method => :delete } do |f| - = f.error_messages + .button + =link_to 'Close Account', '#close_account_pane', :rel => 'facebox' - %p - = f.label :close_account_password, t('.current_password'), :for => :close_account_password - = f.password_field :current_password, :id => :close_account_password - %p - = f.submit t('.close_account'), :confirm => t('are_you_sure') + .hidden#close_account_pane{:rel => 'facebox'} + #inner_account_delete + %h1 + Hey, please don't go! + %p + We want you to help us make Diaspora better, so you should help us out instead of leaving. + if you do want to leave, we want you to know what happens next. + .span-10 + = image_tag 'http://itstrulyrandom.com/wp-content/uploads/2008/03/sadcat.jpg' + %br + %small + %b + Mr Wiggles will be sad to see you go + .span-10.last + %ul + %li + We delete all of your posts, profile data, as soon as humanly possible. + Your comments will hang around, but be associated with your Diaspora Handle. + %li + You will get signed out and locked out of your account. + %li + This will lock your username if you decided to sign back up. + %li + Currently, there is no turning back + %p + %b + If you really want this, type in your password below and click 'Close Account' + + = form_for 'user', :url => user_path, :html => { :method => :delete } do |f| + = f.error_messages + + %p + = f.label :close_account_password, t('.current_password'), :for => :close_account_password + = f.password_field :current_password, :id => :close_account_password + %p + = f.submit t('.close_account'), :confirm => t('are_you_sure_delete_account') diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 1d6871384..21624ef2e 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -27,6 +27,7 @@ en: password: "Password" password_confirmation: "Password confirmation" are_you_sure: "Are you sure?" + are_you_sure_delete_account: "Are you sure you want to close your account? This can't be undone!" fill_me_out: "Fill me out" back: "Back" public: "Public" diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 2910d0af6..43b1767f0 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -2281,6 +2281,9 @@ ul.show_comments, :position relative :top 10px +#inner_account_delete + :width 810px + #aspect_edit_pane :width 810px .person_tiles