diff options
-rw-r--r-- | client/components/settings/peopleBody.js | 4 | ||||
-rw-r--r-- | client/components/users/userHeader.jade | 5 | ||||
-rw-r--r-- | client/components/users/userHeader.js | 6 | ||||
-rw-r--r-- | i18n/en.i18n.json | 3 |
4 files changed, 12 insertions, 6 deletions
diff --git a/client/components/settings/peopleBody.js b/client/components/settings/peopleBody.js index b09f6599..a9f2247c 100644 --- a/client/components/settings/peopleBody.js +++ b/client/components/settings/peopleBody.js @@ -243,8 +243,8 @@ Template.editUserPopup.events({ } else Popup.close(); }, - 'click #deleteButton'() { + 'click #deleteButton': Popup.afterConfirm('userDelete', function() { Users.remove(this.userId); Popup.close(); - }, + }), }); diff --git a/client/components/users/userHeader.jade b/client/components/users/userHeader.jade index 2a3d04cc..99540cc0 100644 --- a/client/components/users/userHeader.jade +++ b/client/components/users/userHeader.jade @@ -82,3 +82,8 @@ template(name="changeSettingsPopup") | {{_ 'show-cards-minimum-count'}} input#show-cards-count-at.inline-input.left(type="number" value="#{showCardsCountAt}" min="0" max="99" onkeydown="return false") input.js-apply-show-cards-at.left(type="submit" value="{{_ 'apply'}}") + + +template(name="userDeletePopup") + p {{_ 'delete-user-confirm-popup'}} + button.js-confirm.negate.full(type="submit") {{_ 'delete'}} diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js index 0434f647..9693d7cf 100644 --- a/client/components/users/userHeader.js +++ b/client/components/users/userHeader.js @@ -104,11 +104,11 @@ Template.editProfilePopup.events({ }); } else Popup.back(); }, - 'click #deleteButton'() { - Users.remove(Meteor.userId()); + 'click #deleteButton': Popup.afterConfirm('userDelete', function() { Popup.close(); + Users.remove(Meteor.userId()); AccountsTemplates.logout(); - }, + }), }); // XXX For some reason the useraccounts autofocus isnt working in this case. diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index 6274e08a..29777082 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -722,5 +722,6 @@ "act-almostdue": "was reminding the current due (__timeValue__) of __card__ is approaching", "act-pastdue": "was reminding the current due (__timeValue__) of __card__ is past", "act-duenow": "was reminding the current due (__timeValue__) of __card__ is now", - "act-atUserComment": "You were mentioned in [__board__] __card__" + "act-atUserComment": "You were mentioned in [__board__] __card__", + "delete-user-confirm-popup": "Are you sure you want to delete this account? There is no undo." } |