mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-27 09:02:43 +00:00
Merge pull request #337 from helsinki-systems/prevent-double-event-creation
fix(calendar(js)): prevent duplicate event creation in case of an event conflict (@leonklingele)
This commit is contained in:
@@ -551,10 +551,13 @@
|
||||
$mdDialog.cancel = vm.originalModalCancel;
|
||||
$mdDialog.hide();
|
||||
}, function(response) {
|
||||
if (response.status == CalendarSettings.ConflictHTTPErrorCode)
|
||||
vm.allowResubmit(form);
|
||||
|
||||
if (response.status == CalendarSettings.ConflictHTTPErrorCode) {
|
||||
vm.attendeeConflictError = _.isObject(response.data.message) ? response.data.message : { reject: response.data.message };
|
||||
else
|
||||
} else {
|
||||
vm.edit(form);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -588,6 +591,11 @@
|
||||
form.$setDirty();
|
||||
};
|
||||
|
||||
this.allowResubmit = function (form) {
|
||||
form.$setPristine();
|
||||
form.$setDirty();
|
||||
};
|
||||
|
||||
function getHours() {
|
||||
var hours = [];
|
||||
for (var i = 0; i <= 23; i++) {
|
||||
|
||||
Reference in New Issue
Block a user