Explorar el Código

added alert confirmation when deleting account

Akira Laine hace 9 años
padre
commit
ee30840792
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  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(){