MOBILE-2890 calendar: Confirm delete reminder
parent
9884da00d4
commit
922429e0d1
|
@ -344,10 +344,22 @@ export class AddonCalendarEventPage implements OnDestroy {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
||||||
|
const message = this.translate.instant('core.areyousure');
|
||||||
|
const okText = this.translate.instant('core.delete');
|
||||||
|
|
||||||
|
this.domUtils.showConfirm(message, undefined, okText).then(() => {
|
||||||
|
const modal = this.domUtils.showModalLoading('core.deleting', true);
|
||||||
this.calendarProvider.deleteEventReminder(id).then(() => {
|
this.calendarProvider.deleteEventReminder(id).then(() => {
|
||||||
this.calendarProvider.getEventReminders(this.eventId).then((reminders) => {
|
this.calendarProvider.getEventReminders(this.eventId).then((reminders) => {
|
||||||
this.reminders = reminders;
|
this.reminders = reminders;
|
||||||
});
|
});
|
||||||
|
}).catch((error) => {
|
||||||
|
this.domUtils.showErrorModalDefault(error, 'Error deleting reminder');
|
||||||
|
}).finally(() => {
|
||||||
|
modal.dismiss();
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
// Cancelled.
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue