Merge branch 'stable' into develop

This commit is contained in:
Jonne Haß 2015-05-04 03:31:34 +02:00
commit 8172eee43c
6 changed files with 82 additions and 83 deletions

View file

@ -31,6 +31,7 @@ Ruby 2.0 is no longer officially supported.
* Fix CSS for bold links [#5887](https://github.com/diaspora/diaspora/pull/5887) * 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) * 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 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 ## Features
* Hide post title of limited post in comment notification email [#5843](https://github.com/diaspora/diaspora/pull/5843) * Hide post title of limited post in comment notification email [#5843](https://github.com/diaspora/diaspora/pull/5843)

View 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") }

View file

@ -198,41 +198,8 @@
.span6 .span6
%h3 %h3
= t('.close_account_text') = t(".close_account_text")
=link_to t('.close_account_text'), '#close_account_pane', :rel => 'facebox', :class => "btn btn-danger", :id => "close_account" .btn.btn-danger{ id: "close_account", data: {toggle: "modal", target: "#closeAccountModal"}}
= t(".close_account_text")
.hidden#close_account_pane{:rel => 'facebox'} = render "close_account_modal"
#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

View file

@ -186,39 +186,11 @@
.span-5.last .span-5.last
%h4 %h4
= t('.close_account_text') = 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|
.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 = f.error_messages
%p %p
= f.label :close_account_password, t('.current_password'), :for => :close_account_password = f.label :close_account_password, t("users.edit.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_text'), :id => "close_account_confirm", :data => { :confirm => t('are_you_sure_delete_account') } = f.submit t('users.edit.close_account_text'), class: "btn btn-danger", id: "close_account_confirm", data: { confirm: t("are_you_sure_delete_account") }
%br

View file

@ -7,9 +7,9 @@ Feature: Close account
Scenario: user closes account Scenario: user closes account
Given I am signed in Given I am signed in
When I go to the users edit page When I go to the users edit page
And I follow "close_account" And I click on selector "#close_account"
And I put in my password in "close_account_password" in the modal window And I put in my password in "close_account_password"
And I press "close_account_confirm" in the modal window And I press "close_account_confirm"
And I confirm the alert And I confirm the alert
Then I should be on the new user session page Then I should be on the new user session page

View 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