Fix close account for mobile view
and use Bootstrap modal for desktop close account
This commit is contained in:
parent
02cdf803b6
commit
1fc31cc313
6 changed files with 82 additions and 83 deletions
|
|
@ -17,6 +17,7 @@
|
|||
* Fix CSS for bold links [#5887](https://github.com/diaspora/diaspora/pull/5887)
|
||||
* Correctly handle IE8 in the chrome frame middleware [#5878](https://github.com/diaspora/diaspora/pull/5878)
|
||||
* Fix code reloading for PostPresenter [#5888](https://github.com/diaspora/diaspora/pull/5888)
|
||||
* Fix closing account from mobile view [#5913](https://github.com/diaspora/diaspora/pull/5913)
|
||||
|
||||
## Features
|
||||
* Hide post title of limited post in comment notification email [#5843](https://github.com/diaspora/diaspora/pull/5843)
|
||||
|
|
|
|||
41
app/views/users/_close_account_modal.haml
Normal file
41
app/views/users/_close_account_modal.haml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
.modal.hide.fade{ id: "closeAccountModal", tabindex: "-1", role: "dialog", aria: { labelledby: "closeAccountModalLabel", hidden: "true" }}
|
||||
.modal-header
|
||||
%button.close{type: "button", data: {dismiss: "modal"}, aria: {hidden: "true" }}
|
||||
×
|
||||
%h3{ id:"closeAccountModalLabel"}
|
||||
= t("users.edit.close_account.dont_go")
|
||||
.modal-body
|
||||
.row-fluid
|
||||
.text-center
|
||||
= image_tag "sadcat.jpg"
|
||||
%h4
|
||||
%strong
|
||||
= t("users.edit.close_account.mr_wiggles")
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
= t("users.edit.close_account.make_diaspora_better")
|
||||
|
||||
.small-horizontal-spacer
|
||||
|
||||
%ul
|
||||
%li
|
||||
= t("users.edit.close_account.what_we_delete")
|
||||
%li
|
||||
= t("users.edit.close_account.locked_out")
|
||||
%li
|
||||
= t("users.edit.close_account.lock_username")
|
||||
%p
|
||||
%strong
|
||||
= t("users.edit.close_account.no_turning_back")
|
||||
|
||||
= form_for "user", url: user_path, html: { method: :delete } do |f|
|
||||
= f.error_messages
|
||||
|
||||
%p
|
||||
= f.label :close_account_password, t("users.edit.current_password"), for: :close_account_password
|
||||
= f.password_field :current_password, id: :close_account_password
|
||||
%p
|
||||
= f.submit t('users.edit.close_account_text'), class: "btn btn-danger", id: "close_account_confirm", data: { confirm: t("are_you_sure_delete_account") }
|
||||
|
|
@ -198,41 +198,8 @@
|
|||
|
||||
.span6
|
||||
%h3
|
||||
= t('.close_account_text')
|
||||
=link_to t('.close_account_text'), '#close_account_pane', :rel => 'facebox', :class => "btn btn-danger", :id => "close_account"
|
||||
= t(".close_account_text")
|
||||
.btn.btn-danger{ id: "close_account", data: {toggle: "modal", target: "#closeAccountModal"}}
|
||||
= t(".close_account_text")
|
||||
|
||||
.hidden#close_account_pane{:rel => 'facebox'}
|
||||
#inner_account_delete
|
||||
%h1
|
||||
= t('.close_account.dont_go')
|
||||
%p
|
||||
= t('.close_account.make_diaspora_better')
|
||||
.row-fluid
|
||||
.span6
|
||||
= image_tag 'sadcat.jpg'
|
||||
.small-horizontal-spacer
|
||||
%small
|
||||
%b
|
||||
= t('.close_account.mr_wiggles')
|
||||
.span6
|
||||
%ul
|
||||
%li
|
||||
= t('.close_account.what_we_delete')
|
||||
%li
|
||||
= t('.close_account.locked_out')
|
||||
%li
|
||||
= t('.close_account.lock_username')
|
||||
%p
|
||||
%b
|
||||
= t('.close_account.no_turning_back')
|
||||
|
||||
= 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_text'), :class => "btn btn-danger", :id => "close_account_confirm", :data => { :confirm => t('are_you_sure_delete_account') }
|
||||
|
||||
.span3
|
||||
= render "close_account_modal"
|
||||
|
|
|
|||
|
|
@ -87,12 +87,12 @@
|
|||
= f.submit t('.change'), :class => 'button'
|
||||
|
||||
%hr
|
||||
|
||||
|
||||
%h4#auto-follow-back-preferences
|
||||
= t('.following')
|
||||
= form_for current_user, :url => user_path, :html => { :method => :put } do |f|
|
||||
= f.error_messages
|
||||
|
||||
|
||||
%p.checkbox_select
|
||||
= f.label :auto_follow_back, t('.auto_follow_back')
|
||||
= f.check_box :auto_follow_back
|
||||
|
|
@ -117,7 +117,7 @@
|
|||
%p.checkbox_select
|
||||
= type.label :someone_reported, t('.someone_reported')
|
||||
= type.check_box :someone_reported, {:checked => @email_prefs['someone_reported']}, false, true
|
||||
|
||||
|
||||
%br
|
||||
%p.checkbox_select
|
||||
= type.label :started_sharing, t('.started_sharing')
|
||||
|
|
@ -128,27 +128,27 @@
|
|||
= type.label :mentioned, t('.mentioned')
|
||||
= type.check_box :mentioned, {:checked => @email_prefs['mentioned']}, false, true
|
||||
%br
|
||||
|
||||
|
||||
%p.checkbox_select
|
||||
= type.label :liked, t('.liked')
|
||||
= type.check_box :liked, {:checked => @email_prefs['liked']}, false, true
|
||||
%br
|
||||
|
||||
|
||||
%p.checkbox_select
|
||||
= type.label :reshared, t('.reshared')
|
||||
= type.check_box :reshared, {:checked => @email_prefs['reshared']}, false, true
|
||||
%br
|
||||
|
||||
|
||||
%p.checkbox_select
|
||||
= type.label :comment_on_post, t('.comment_on_post')
|
||||
= type.check_box :comment_on_post, {:checked => @email_prefs['comment_on_post']}, false, true
|
||||
%br
|
||||
|
||||
|
||||
%p.checkbox_select
|
||||
= type.label :also_commented, t('.also_commented')
|
||||
= type.check_box :also_commented, {:checked => @email_prefs['also_commented']}, false, true
|
||||
%br
|
||||
|
||||
|
||||
%p.checkbox_select
|
||||
= type.label :private_message, t('.private_message')
|
||||
= type.check_box :private_message, {:checked => @email_prefs['private_message']}, false, true
|
||||
|
|
@ -186,39 +186,11 @@
|
|||
.span-5.last
|
||||
%h4
|
||||
= t('.close_account_text')
|
||||
=link_to t('.close_account_text'), '#close_account_pane', :rel => 'facebox', :class => "btn btn-danger", :id => "close_account"
|
||||
= form_for "user", url: user_path, html: { method: :delete } do |f|
|
||||
= f.error_messages
|
||||
|
||||
.hidden#close_account_pane{:rel => 'facebox'}
|
||||
#inner_account_delete
|
||||
%h1
|
||||
= t('.close_account.dont_go')
|
||||
%p
|
||||
= t('.close_account.make_diaspora_better')
|
||||
.span-10
|
||||
= image_tag 'http://itstrulyrandom.com/wp-content/uploads/2008/03/sadcat.jpg'
|
||||
%br
|
||||
%small
|
||||
%b
|
||||
= t('.close_account.mr_wiggles')
|
||||
.span-10.last
|
||||
%ul
|
||||
%li
|
||||
= t('.close_account.what_we_delete')
|
||||
%li
|
||||
= t('.close_account.locked_out')
|
||||
%li
|
||||
= t('.close_account.lock_username')
|
||||
%p
|
||||
%b
|
||||
= t('.close_account.no_turning_back')
|
||||
|
||||
|
||||
= 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_text'), :id => "close_account_confirm", :data => { :confirm => t('are_you_sure_delete_account') }
|
||||
%br
|
||||
%p
|
||||
= f.label :close_account_password, t("users.edit.current_password"), for: :close_account_password
|
||||
= f.password_field :current_password, id: :close_account_password
|
||||
%p
|
||||
= f.submit t('users.edit.close_account_text'), class: "btn btn-danger", id: "close_account_confirm", data: { confirm: t("are_you_sure_delete_account") }
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ Feature: Close account
|
|||
Scenario: user closes account
|
||||
Given I am signed in
|
||||
When I go to the users edit page
|
||||
And I follow "close_account"
|
||||
And I put in my password in "close_account_password" in the modal window
|
||||
And I press "close_account_confirm" in the modal window
|
||||
And I click on selector "#close_account"
|
||||
And I put in my password in "close_account_password"
|
||||
And I press "close_account_confirm"
|
||||
And I confirm the alert
|
||||
Then I should be on the new user session page
|
||||
|
||||
|
|
|
|||
18
features/mobile/closes_account.feature
Normal file
18
features/mobile/closes_account.feature
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
@javascript
|
||||
Feature: Close account
|
||||
In order to close an existing account
|
||||
As a user
|
||||
I want to sign in, close my account and try to log in again
|
||||
|
||||
Scenario: user closes account
|
||||
Given I am signed in
|
||||
When I toggle the mobile view
|
||||
And I go to the users edit page
|
||||
And I put in my password in "close_account_password"
|
||||
And I press "close_account_confirm"
|
||||
And I confirm the alert
|
||||
|
||||
When I am on the new user session page
|
||||
And I try to sign in manually
|
||||
Then I should be on the new user session page
|
||||
And I should see a flash message with a warning
|
||||
Loading…
Reference in a new issue