Merge pull request #6102 from svbergerem/close-account-regression
Fix Bootstrap 3 regression: close account
This commit is contained in:
commit
50dbe0db80
7 changed files with 45 additions and 90 deletions
|
|
@ -13,6 +13,7 @@
|
||||||
//= require fileuploader-custom
|
//= require fileuploader-custom
|
||||||
//= require rails-timeago
|
//= require rails-timeago
|
||||||
//= require underscore
|
//= require underscore
|
||||||
|
//= require bootstrap
|
||||||
//= require diaspora
|
//= require diaspora
|
||||||
//= require helpers/i18n
|
//= require helpers/i18n
|
||||||
//= require widgets/timeago
|
//= require widgets/timeago
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,44 @@
|
||||||
.modal.hide.fade{ id: "closeAccountModal", tabindex: "-1", role: "dialog", aria: { labelledby: "closeAccountModalLabel", hidden: "true" }}
|
.modal.fade{ id: "closeAccountModal",
|
||||||
|
tabindex: "-1",
|
||||||
|
role: "dialog",
|
||||||
|
aria: { labelledby: "closeAccountModalLabel", hidden: "true" }}
|
||||||
|
.modal-dialog
|
||||||
|
.modal-content
|
||||||
.modal-header
|
.modal-header
|
||||||
%button.close{type: "button", data: {dismiss: "modal"}, aria: {hidden: "true" }}
|
%button.close{type: "button", data: {dismiss: "modal"}, aria: {hidden: "true" }}
|
||||||
×
|
×
|
||||||
%h3{ id:"closeAccountModalLabel"}
|
%h3.modal-title{ id:"closeAccountModalLabel"}
|
||||||
= t("users.edit.close_account.dont_go")
|
= t("users.edit.close_account.dont_go")
|
||||||
|
= form_for "user", url: user_path, html: { method: :delete } do |f|
|
||||||
.modal-body
|
.modal-body
|
||||||
.row-fluid
|
|
||||||
.text-center
|
.text-center
|
||||||
= image_tag "sadcat.jpg"
|
= image_tag "sadcat.jpg", class: "img-responsive center-block"
|
||||||
%h4
|
%h4
|
||||||
%strong
|
%strong
|
||||||
= t("users.edit.close_account.mr_wiggles")
|
= t("users.edit.close_account.mr_wiggles")
|
||||||
|
|
||||||
.small-horizontal-spacer
|
|
||||||
|
|
||||||
.row-fluid
|
|
||||||
.span12
|
|
||||||
= t("users.edit.close_account.make_diaspora_better")
|
= t("users.edit.close_account.make_diaspora_better")
|
||||||
|
|
||||||
.small-horizontal-spacer
|
%ol
|
||||||
|
|
||||||
%ul
|
|
||||||
%li
|
%li
|
||||||
= t("users.edit.close_account.what_we_delete")
|
= t("users.edit.close_account.what_we_delete")
|
||||||
%li
|
%li
|
||||||
= t("users.edit.close_account.locked_out")
|
= t("users.edit.close_account.locked_out")
|
||||||
%li
|
%li
|
||||||
= t("users.edit.close_account.lock_username")
|
= t("users.edit.close_account.lock_username")
|
||||||
%p
|
|
||||||
%strong
|
%strong
|
||||||
= t("users.edit.close_account.no_turning_back")
|
= t("users.edit.close_account.no_turning_back")
|
||||||
|
|
||||||
= form_for "user", url: user_path, html: { method: :delete } do |f|
|
.small-horizontal-spacer
|
||||||
= f.error_messages
|
= f.error_messages
|
||||||
|
.form-group
|
||||||
%p
|
|
||||||
= f.label :close_account_password, t("users.edit.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, class: "form-control"
|
||||||
%p
|
.modal-footer
|
||||||
= f.submit t('users.edit.close_account_text'), class: "btn btn-danger", id: "close_account_confirm", data: { confirm: t("are_you_sure_delete_account") }
|
.btn.btn-default{type: "button", data: {dismiss: "modal"}, aria: {hidden: "true"}}
|
||||||
|
= t("cancel")
|
||||||
|
= f.submit t("users.edit.close_account_text"),
|
||||||
|
class: "btn btn-danger",
|
||||||
|
id: "close_account_confirm",
|
||||||
|
data: { confirm: t("are_you_sure_delete_account") }
|
||||||
|
|
|
||||||
|
|
@ -191,56 +191,6 @@
|
||||||
.col-lg-5
|
.col-lg-5
|
||||||
%h3.text-right
|
%h3.text-right
|
||||||
= t('.close_account_text')
|
= t('.close_account_text')
|
||||||
|
.btn.btn-danger.pull-right{ id: "close_account", data: {toggle: "modal", target: "#closeAccountModal"}}
|
||||||
- if mobile
|
= t(".close_account_text")
|
||||||
= form_for "user", url: user_path, html: { method: :delete } do |f|
|
= render "close_account_modal"
|
||||||
= f.error_messages
|
|
||||||
.form-group
|
|
||||||
.clearfix= f.label :close_account_password, t("users.edit.current_password"), for: :close_account_password,
|
|
||||||
class: "pull-right", style: "padding-top: 9px;"
|
|
||||||
.small-horizontal-spacer
|
|
||||||
.clearfix= f.password_field :current_password, id: :close_account_password, class: "form-control"
|
|
||||||
%p
|
|
||||||
.clearfix= f.submit t('users.edit.close_account_text'), class: "btn btn-danger pull-right",
|
|
||||||
id: "close_account_confirm", data: { confirm: t("are_you_sure_delete_account") }
|
|
||||||
|
|
||||||
- if not mobile
|
|
||||||
=link_to t('.close_account_text'), '#close_account_pane', rel: 'facebox',
|
|
||||||
class: "btn btn-danger pull-right", id: "close_account"
|
|
||||||
|
|
||||||
.hidden#close_account_pane{rel: 'facebox'}
|
|
||||||
#inner_account_delete
|
|
||||||
%h1
|
|
||||||
= t('.close_account.dont_go')
|
|
||||||
%p
|
|
||||||
= t('.close_account.make_diaspora_better')
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= image_tag 'sadcat.jpg'
|
|
||||||
.small-horizontal-spacer
|
|
||||||
%small
|
|
||||||
%b
|
|
||||||
= t('.close_account.mr_wiggles')
|
|
||||||
.col-md-6
|
|
||||||
%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
|
|
||||||
.small-horizontal-spacer
|
|
||||||
= f.submit t('.close_account_text'), class: "btn btn-danger", id: "close_account_confirm",
|
|
||||||
data: { confirm: t('are_you_sure_delete_account') }
|
|
||||||
.small-horizontal-spacer
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
= render "edit", mobile: false
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
= render "edit", mobile: true
|
|
||||||
|
|
@ -8,7 +8,8 @@ Feature: Close 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 click on selector "#close_account"
|
And I click on selector "#close_account"
|
||||||
And I put in my password in "close_account_password"
|
Then I should see "Hey, please don’t go!" within "#closeAccountModal"
|
||||||
|
When I put in my password in "close_account_password"
|
||||||
And I press "close_account_confirm"
|
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
|
||||||
|
|
|
||||||
|
|
@ -7,7 +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 put in my password in "close_account_password"
|
And I click on selector "#close_account"
|
||||||
|
Then I should see "Hey, please don’t go!" within "#closeAccountModal"
|
||||||
|
When I put in my password in "close_account_password"
|
||||||
And I press "close_account_confirm"
|
And I press "close_account_confirm"
|
||||||
And I confirm the alert
|
And I confirm the alert
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue