mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-03 11:11:48 +02:00
Improved delete request transaction
This commit is contained in:
parent
1b20a11bba
commit
59caf01443
15 changed files with 18 additions and 10343 deletions
|
@ -73,7 +73,7 @@ angular.module('rallly')
|
|||
}
|
||||
}
|
||||
})
|
||||
.directive('settingsForm', function(Event){
|
||||
.directive('settingsForm', function(Event, ConfirmModal){
|
||||
return {
|
||||
scope : {
|
||||
event : '=',
|
||||
|
@ -82,8 +82,14 @@ angular.module('rallly')
|
|||
templateUrl : 'templates/directives/eventForm/settingsForm.html',
|
||||
link : function(scope, el, attrs){
|
||||
scope.deleteEvent = function(){
|
||||
if (scope.deleteRequestSent) return;
|
||||
Event.delete({'id' : scope.event._id}, function(){
|
||||
console.log('delete');
|
||||
scope.deleteRequestSent = true;
|
||||
var modal = new ConfirmModal({
|
||||
title : 'Delete Request Sent',
|
||||
message : 'An email has been sent to the creator of this event with instructions to delete it.',
|
||||
cancelText : 'OK'
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue