basic page for deleting account with temporary text and cute cat picture

This commit is contained in:
Maxwell Salzberg 2011-11-11 12:12:49 -08:00
parent ee12f19ff6
commit 90458381f5
4 changed files with 43 additions and 9 deletions

View file

@ -83,8 +83,7 @@ class UsersController < ApplicationController
if params[:user] && params[:user][:current_password] && current_user.valid_password?(params[:user][:current_password]) if params[:user] && params[:user][:current_password] && current_user.valid_password?(params[:user][:current_password])
current_user.close_account! current_user.close_account!
sign_out current_user sign_out current_user
flash[:notice] = I18n.t 'users.destroy.success' redirect_to(multi_path, :notice => I18n.t('users.destroy.success'))
redirect_to multi_path
else else
if params[:user].present? && params[:user][:current_password].present? if params[:user].present? && params[:user][:current_password].present?
flash[:error] = t 'users.destroy.wrong_password' flash[:error] = t 'users.destroy.wrong_password'

View file

@ -166,6 +166,37 @@
.span-5.last .span-5.last
%h3 %h3
= t('.close_account') = t('.close_account')
.button
=link_to 'Close Account', '#close_account_pane', :rel => 'facebox'
.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| = form_for 'user', :url => user_path, :html => { :method => :delete } do |f|
= f.error_messages = f.error_messages
@ -173,4 +204,4 @@
= f.label :close_account_password, t('.current_password'), :for => :close_account_password = f.label :close_account_password, t('.current_password'), :for => :close_account_password
= f.password_field :current_password, :id => :close_account_password = f.password_field :current_password, :id => :close_account_password
%p %p
= f.submit t('.close_account'), :confirm => t('are_you_sure') = f.submit t('.close_account'), :confirm => t('are_you_sure_delete_account')

View file

@ -27,6 +27,7 @@ en:
password: "Password" password: "Password"
password_confirmation: "Password confirmation" password_confirmation: "Password confirmation"
are_you_sure: "Are you sure?" 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" fill_me_out: "Fill me out"
back: "Back" back: "Back"
public: "Public" public: "Public"

View file

@ -2281,6 +2281,9 @@ ul.show_comments,
:position relative :position relative
:top 10px :top 10px
#inner_account_delete
:width 810px
#aspect_edit_pane #aspect_edit_pane
:width 810px :width 810px
.person_tiles .person_tiles