Browse Source

added alert confirmation when deleting account

Akira Laine 9 years ago
parent
commit
ee30840792
1 changed files with 4 additions and 1 deletions
  1. 4 1
      app/client/client.js

+ 4 - 1
app/client/client.js

@@ -96,7 +96,10 @@ Template.settings.events({
     "click #delete-account": function(){
         $("#delete-account").text("Click to confirm");
         $("#delete-account").click(function(){
-            Meteor.call("deleteAccount", Meteor.userId());
+            var bool = confirm("Are you sure you want to delete your account?");
+            if(bool) {
+                Meteor.call("deleteAccount", Meteor.userId());
+            }
         })
     },
     "click #change-password": function(){