Skip to content
Extraits de code Groupes Projets
Valider 90458381 rédigé par Maxwell Salzberg's avatar Maxwell Salzberg
Parcourir les fichiers

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

parent ee12f19f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -83,8 +83,7 @@ class UsersController < ApplicationController ...@@ -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'
......
...@@ -166,11 +166,42 @@ ...@@ -166,11 +166,42 @@
.span-5.last .span-5.last
%h3 %h3
= t('.close_account') = t('.close_account')
= form_for 'user', :url => user_path, :html => { :method => :delete } do |f| .button
= f.error_messages =link_to 'Close Account', '#close_account_pane', :rel => 'facebox'
%p .hidden#close_account_pane{:rel => 'facebox'}
= f.label :close_account_password, t('.current_password'), :for => :close_account_password #inner_account_delete
= f.password_field :current_password, :id => :close_account_password %h1
%p Hey, please don't go!
= f.submit t('.close_account'), :confirm => t('are_you_sure') %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')
...@@ -27,6 +27,7 @@ en: ...@@ -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"
......
...@@ -2281,6 +2281,9 @@ ul.show_comments, ...@@ -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
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter