diff options
author | guillaume <guillaume.cassou@orange.fr> | 2019-07-30 11:42:43 +0200 |
---|---|---|
committer | guillaume <guillaume.cassou@orange.fr> | 2019-07-30 11:42:43 +0200 |
commit | 84ba42f42e01f4f1c03bb29b8b92ab2b7f802e64 (patch) | |
tree | 753f2fecec29815d8495167fcc23ec3f21f77df7 /client/components | |
parent | 7cc1ffcab2a16588a930c10de2405bc4fc5067af (diff) | |
download | wekan-84ba42f42e01f4f1c03bb29b8b92ab2b7f802e64.tar.gz wekan-84ba42f42e01f4f1c03bb29b8b92ab2b7f802e64.tar.bz2 wekan-84ba42f42e01f4f1c03bb29b8b92ab2b7f802e64.zip |
add popup to confirm deleting one account
Diffstat (limited to 'client/components')
-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 |
3 files changed, 10 insertions, 5 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. |