mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-14 08:07:11 +00:00
fix(calendar(js)): prevent duplicate event creation in case of an event conflict
In case of an calendar event conflict the form submit button was not disabled after use, allowing it to be clicked again. This could have resulted in a double creation of the submit event.
This commit is contained in:
1 parent
a5d4715e76
commit
f04c73d495
2 files changed
+16
-7
No files matched your search
@@ -547,10 +547,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);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -584,6 +587,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