diff --git a/src/addons/calendar/pages/day/day.ts b/src/addons/calendar/pages/day/day.ts index 65af26e37..9a84da8f1 100644 --- a/src/addons/calendar/pages/day/day.ts +++ b/src/addons/calendar/pages/day/day.ts @@ -313,7 +313,7 @@ export class AddonCalendarDayPage implements OnInit, OnDestroy { const result = await AddonCalendarSync.syncEvents(); if (result.warnings && result.warnings.length) { - CoreDomUtils.showErrorModal(result.warnings[0]); + CoreDomUtils.showAlert(undefined, result.warnings[0]); } if (result.updated) { diff --git a/src/addons/calendar/pages/event/event.ts b/src/addons/calendar/pages/event/event.ts index ffe9f4092..8104f7621 100644 --- a/src/addons/calendar/pages/event/event.ts +++ b/src/addons/calendar/pages/event/event.ts @@ -328,7 +328,7 @@ export class AddonCalendarEventPage implements OnInit, OnDestroy { try { const result = await AddonCalendarSync.syncEvents(); if (result.warnings && result.warnings.length) { - CoreDomUtils.showErrorModal(result.warnings[0]); + CoreDomUtils.showAlert(undefined, result.warnings[0]); } if (result.deleted && result.deleted.indexOf(this.eventId) != -1) { diff --git a/src/addons/calendar/pages/index/index.ts b/src/addons/calendar/pages/index/index.ts index f9890caf5..07e4545a8 100644 --- a/src/addons/calendar/pages/index/index.ts +++ b/src/addons/calendar/pages/index/index.ts @@ -200,7 +200,7 @@ export class AddonCalendarIndexPage implements OnInit, OnDestroy { try { const result = await AddonCalendarSync.syncEvents(); if (result.warnings && result.warnings.length) { - CoreDomUtils.showErrorModal(result.warnings[0]); + CoreDomUtils.showAlert(undefined, result.warnings[0]); } if (result.updated) { diff --git a/src/addons/messages/pages/discussion/discussion.ts b/src/addons/messages/pages/discussion/discussion.ts index acb9aa30d..30b13b8c0 100644 --- a/src/addons/messages/pages/discussion/discussion.ts +++ b/src/addons/messages/pages/discussion/discussion.ts @@ -131,7 +131,7 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView // Show first warning if any. if (data.warnings && data.warnings[0]) { - CoreDomUtils.showErrorModal(data.warnings[0]); + CoreDomUtils.showAlert(undefined, data.warnings[0]); } } }, this.siteId); @@ -252,7 +252,7 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView try { const syncResult = await AddonMessagesSync.syncDiscussion(this.conversationId, this.userId); if (syncResult.warnings && syncResult.warnings[0]) { - CoreDomUtils.showErrorModal(syncResult.warnings[0]); + CoreDomUtils.showAlert(undefined, syncResult.warnings[0]); } } catch { // Ignore errors; diff --git a/src/addons/mod/assign/components/index/index.ts b/src/addons/mod/assign/components/index/index.ts index 411090e5c..e63a1f1a5 100644 --- a/src/addons/mod/assign/components/index/index.ts +++ b/src/addons/mod/assign/components/index/index.ts @@ -372,7 +372,7 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo if (syncEventData.warnings && syncEventData.warnings.length) { // Show warnings. - CoreDomUtils.showErrorModal(syncEventData.warnings[0]); + CoreDomUtils.showAlert(undefined, syncEventData.warnings[0]); } return true; diff --git a/src/addons/mod/forum/pages/discussion/discussion.ts b/src/addons/mod/forum/pages/discussion/discussion.ts index 94289080d..bb06dcce1 100644 --- a/src/addons/mod/forum/pages/discussion/discussion.ts +++ b/src/addons/mod/forum/pages/discussion/discussion.ts @@ -611,7 +611,7 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes .syncDiscussionReplies(this.discussionId) .then((result) => { if (result.warnings && result.warnings.length) { - CoreDomUtils.showErrorModal(result.warnings[0]); + CoreDomUtils.showAlert(undefined, result.warnings[0]); } if (result && result.updated && this.forumId) { @@ -632,7 +632,7 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes .syncRatings(this.cmId, this.discussionId) .then((result) => { if (result.warnings && result.warnings.length) { - CoreDomUtils.showErrorModal(result.warnings[0]); + CoreDomUtils.showAlert(undefined, result.warnings[0]); } return; diff --git a/src/addons/mod/lesson/pages/player/player.ts b/src/addons/mod/lesson/pages/player/player.ts index 8e742a5a1..2edc3daf7 100644 --- a/src/addons/mod/lesson/pages/player/player.ts +++ b/src/addons/mod/lesson/pages/player/player.ts @@ -402,7 +402,7 @@ export class AddonModLessonPlayerPage implements OnInit, OnDestroy, CanLeave { } // Retake hasn't changed, show the warning and finish the retake in offline. - CoreDomUtils.showErrorModal(result.warnings[0]); + CoreDomUtils.showAlert(undefined, result.warnings[0]); } this.offline = false; diff --git a/src/addons/mod/wiki/components/index/index.ts b/src/addons/mod/wiki/components/index/index.ts index 3b724896a..7ed9d1ca3 100644 --- a/src/addons/mod/wiki/components/index/index.ts +++ b/src/addons/mod/wiki/components/index/index.ts @@ -809,7 +809,7 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp if (this.isCurrentView && syncEventData.warnings && syncEventData.warnings.length) { // Show warnings. - CoreDomUtils.showErrorModal(syncEventData.warnings[0]); + CoreDomUtils.showAlert(undefined, syncEventData.warnings[0]); } // Check if current page was created or discarded. diff --git a/src/addons/notes/pages/list/list.ts b/src/addons/notes/pages/list/list.ts index 951f764e6..c59455cc7 100644 --- a/src/addons/notes/pages/list/list.ts +++ b/src/addons/notes/pages/list/list.ts @@ -290,7 +290,7 @@ export class AddonNotesListPage implements OnInit, OnDestroy { const message = CoreTextUtils.buildMessage(warnings); if (message) { - CoreDomUtils.showErrorModal(message); + CoreDomUtils.showAlert(undefined, message); } } diff --git a/src/core/features/comments/pages/viewer/viewer.ts b/src/core/features/comments/pages/viewer/viewer.ts index 72ef4d97a..f1e35112d 100644 --- a/src/core/features/comments/pages/viewer/viewer.ts +++ b/src/core/features/comments/pages/viewer/viewer.ts @@ -267,7 +267,7 @@ export class CoreCommentsViewerPage implements OnInit, OnDestroy { private showSyncWarnings(warnings: string[]): void { const message = CoreTextUtils.buildMessage(warnings); if (message) { - CoreDomUtils.showErrorModal(message); + CoreDomUtils.showAlert(undefined, message); } } diff --git a/src/core/features/course/classes/main-activity-component.ts b/src/core/features/course/classes/main-activity-component.ts index 4e8a8764e..e2a8d20fd 100644 --- a/src/core/features/course/classes/main-activity-component.ts +++ b/src/core/features/course/classes/main-activity-component.ts @@ -216,7 +216,7 @@ export class CoreCourseModuleMainActivityComponent extends CoreCourseModuleMainR const result = await this.sync(); if (result.warnings.length) { - CoreDomUtils.showErrorModal(result.warnings[0]); + CoreDomUtils.showAlert(undefined, result.warnings[0]); } return this.hasSyncSucceed(result); diff --git a/src/core/features/course/pages/contents/contents.ts b/src/core/features/course/pages/contents/contents.ts index 36249b1dc..45a36e8c0 100644 --- a/src/core/features/course/pages/contents/contents.ts +++ b/src/core/features/course/pages/contents/contents.ts @@ -152,7 +152,7 @@ export class CoreCourseContentsPage implements OnInit, OnDestroy, CoreRefreshCon this.showLoadingAndRefresh(false, false); if (data.warnings && data.warnings[0]) { - CoreDomUtils.showErrorModal(data.warnings[0]); + CoreDomUtils.showAlert(undefined, data.warnings[0].message); } }); } @@ -183,7 +183,7 @@ export class CoreCourseContentsPage implements OnInit, OnDestroy, CoreRefreshCon this.course.displayname || this.course.fullname, )); if (result?.warnings?.length) { - CoreDomUtils.showErrorModal(result.warnings[0]); + CoreDomUtils.showAlert(undefined, result.warnings[0].message); } }