From 10e5af68471f98cbe1e8b0fca89334aa131559ed Mon Sep 17 00:00:00 2001 From: Juanfran Date: Tue, 1 Mar 2016 10:33:47 +0100 Subject: [PATCH] projects block warning --- app/coffee/modules/user-settings/lightboxes.coffee | 4 ++-- app/locales/taiga/locale-en.json | 6 ++++-- .../user/lightbox/lightbox-delete-account.jade | 13 +++++++------ app/styles/modules/common/lightbox.scss | 3 +++ 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/app/coffee/modules/user-settings/lightboxes.coffee b/app/coffee/modules/user-settings/lightboxes.coffee index 4906c7e9..68545809 100644 --- a/app/coffee/modules/user-settings/lightboxes.coffee +++ b/app/coffee/modules/user-settings/lightboxes.coffee @@ -53,11 +53,11 @@ DeleteUserDirective = ($repo, $rootscope, $auth, $location, $navUrls, lightboxSe promise.then null, -> console.log "FAIL" - $el.on "click", ".button-red", (event) -> + $el.on "click", ".button-green", (event) -> event.preventDefault() lightboxService.close($el) - $el.on "click", ".button-green", debounce 2000, (event) -> + $el.on "click", ".button-red", debounce 2000, (event) -> event.preventDefault() submit() diff --git a/app/locales/taiga/locale-en.json b/app/locales/taiga/locale-en.json index 11a0ec7a..9ab57ff9 100644 --- a/app/locales/taiga/locale-en.json +++ b/app/locales/taiga/locale-en.json @@ -826,8 +826,10 @@ "SECTION_NAME": "Delete Taiga Account", "CONFIRM": "Are you sure you want to delete your Taiga account?", "SUBTITLE": "We're going to miss you! :-(", - "NEWSLETTER_LABEL_TEXT": "I don't wanna receive your newsletter anymore" - + "NEWSLETTER_LABEL_TEXT": "I don't wanna receive your newsletter anymore", + "CANCEL": "Back to settings", + "ACCEPT": "Delete account", + "BLOCK_PROJECT": "Note that all your projects owned will be blocked. If you do not want to block your projects before deleting your account you can transfer ownership of the project to someone else." }, "DELETE_PROJECT": { "TITLE": "Delete project", diff --git a/app/partials/user/lightbox/lightbox-delete-account.jade b/app/partials/user/lightbox/lightbox-delete-account.jade index f7915fdd..b59670cb 100644 --- a/app/partials/user/lightbox/lightbox-delete-account.jade +++ b/app/partials/user/lightbox/lightbox-delete-account.jade @@ -2,12 +2,13 @@ a.close(href="", title="{{'close' | translate}}") svg.icon.icon-close use(xlink:href="#icon-close") form - h2.title(translate="LIGHTBOX.DELETE_ACCOUNT.SECTION_NAME") + h2.title(translate="LIGHTBOX.DELETE_ACCOUNT.CONFIRM") p - span.question(translate="LIGHTBOX.DELETE_ACCOUNT.CONFIRM") span.subtitle(translate="LIGHTBOX.DELETE_ACCOUNT.SUBTITLE") + + p(ng-bind-html="'LIGHTBOX.DELETE_ACCOUNT.BLOCK_PROJECT' | translate") div.options - a.button-green(href="", title="{{'COMMON.ACCEPT' | translate}}") - span(translate="COMMON.ACCEPT") - a.button-red(href="", title="{{'Cancel' | translate}}", ) - span(translate="COMMON.CANCEL") + a.button-green(href="", title="{{'LIGHTBOX.DELETE_ACCOUNT.CANCEL' | translate}}") + span(translate="LIGHTBOX.DELETE_ACCOUNT.CANCEL") + a.button-red(href="", title="{{'LIGHTBOX.DELETE_ACCOUNT.ACCEPT' | translate}}") + span(translate="LIGHTBOX.DELETE_ACCOUNT.ACCEPT") diff --git a/app/styles/modules/common/lightbox.scss b/app/styles/modules/common/lightbox.scss index e2cf502c..2cc9ed85 100644 --- a/app/styles/modules/common/lightbox.scss +++ b/app/styles/modules/common/lightbox.scss @@ -325,6 +325,9 @@ } .lightbox-delete-account { + p { + text-align: center; + } form { flex-basis: 420px; flex-grow: 0;