diff --git a/scripts/langindex.json b/scripts/langindex.json index 4d2070a51..8310db0c1 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -1913,6 +1913,7 @@ "core.login.changepasswordbutton": "local_moodlemobileapp", "core.login.changepasswordhelp": "local_moodlemobileapp", "core.login.changepasswordreconnectinstructions": "local_moodlemobileapp", + "core.login.changepasswordsupportsubject": "local_moodlemobileapp", "core.login.confirmdeletesite": "local_moodlemobileapp", "core.login.connect": "local_moodlemobileapp", "core.login.connecttomoodle": "local_moodlemobileapp", @@ -2347,8 +2348,10 @@ "core.user.address": "moodle", "core.user.city": "moodle", "core.user.completeprofile": "local_moodlemobileapp", + "core.user.completeprofilehelp": "local_moodlemobileapp", "core.user.completeprofilenotice": "local_moodlemobileapp", "core.user.completeprofilereconnectinstructions": "local_moodlemobileapp", + "core.user.completeprofilesupportsubject": "local_moodlemobileapp", "core.user.completeyourprofile": "local_moodlemobileapp", "core.user.contact": "local_moodlemobileapp", "core.user.country": "moodle", diff --git a/src/core/features/login/lang.json b/src/core/features/login/lang.json index bd53aaf6c..cfb363e58 100644 --- a/src/core/features/login/lang.json +++ b/src/core/features/login/lang.json @@ -6,8 +6,9 @@ "cancel": "Cancel", "changepassword": "Change password", "changepasswordbutton": "Change password", - "changepasswordhelp": "If you have problems changing your password, please contact your site administrator. \"Site Administrators\" are the people who manages the Moodle at your school/university/company or learning organisation. If you don't know how to contact them, please contact your teachers/trainers.", + "changepasswordhelp": "If you have problems changing your password, please contact your institution.", "changepasswordreconnectinstructions": "If you didn't change your password correctly, you'll be asked to do it again.", + "changepasswordsupportsubject": "Need help changing my password", "confirmdeletesite": "Are you sure you want to remove the account on {{sitename}}?", "connect": "Connect!", "connecttomoodle": "Connect to Moodle", diff --git a/src/core/features/login/pages/change-password/change-password.ts b/src/core/features/login/pages/change-password/change-password.ts index 26db139cf..8ba206d7f 100644 --- a/src/core/features/login/pages/change-password/change-password.ts +++ b/src/core/features/login/pages/change-password/change-password.ts @@ -21,6 +21,8 @@ import { Translate } from '@singletons'; import { CoreNavigator } from '@services/navigator'; import { CoreEventObserver, CoreEvents } from '@singletons/events'; import { CoreUtils } from '@services/utils/utils'; +import { CoreUserSupport } from '@features/user/services/support'; +import { AlertButton } from '@ionic/angular'; /** * Page that shows instructions to change the password. @@ -46,10 +48,26 @@ export class CoreLoginChangePasswordPage implements OnDestroy { * Show a help modal. */ showHelp(): void { - CoreDomUtils.showAlert( - Translate.instant('core.help'), - Translate.instant('core.login.changepasswordhelp'), - ); + const site = CoreSites.getRequiredCurrentSite(); + const buttons: (AlertButton | string)[] = []; + + if (site.canContactSupport()) { + buttons.push({ + text: Translate.instant('core.contactsupport'), + handler: () => CoreUserSupport.contact({ + supportPageUrl: site.getSupportPageUrl(), + subject: Translate.instant('core.login.changepasswordsupportsubject'), + }), + }); + } + + buttons.push(Translate.instant('core.ok')); + + CoreDomUtils.showAlertWithOptions({ + header: Translate.instant('core.help'), + message: Translate.instant('core.login.changepasswordhelp'), + buttons, + }); } /** diff --git a/src/core/features/user/lang.json b/src/core/features/user/lang.json index c2b42e2d1..29aa16be6 100644 --- a/src/core/features/user/lang.json +++ b/src/core/features/user/lang.json @@ -3,8 +3,10 @@ "useraccount": "User account", "city": "City/town", "completeprofile": "Complete profile", + "completeprofilehelp": "If you have problems completing your profile, please contact your institution.", "completeprofilenotice": "Before you continue, please fill in the required fields in your user profile.", "completeprofilereconnectinstructions": "If you didn't complete your profile correctly, you'll be asked to do it again.", + "completeprofilesupportsubject": "Need help completing my profile", "completeyourprofile": "Complete your profile", "contact": "Contact", "country": "Country", diff --git a/src/core/features/user/pages/complete-profile/complete-profile.ts b/src/core/features/user/pages/complete-profile/complete-profile.ts index 129be105d..33a14939f 100644 --- a/src/core/features/user/pages/complete-profile/complete-profile.ts +++ b/src/core/features/user/pages/complete-profile/complete-profile.ts @@ -21,6 +21,8 @@ import { Translate } from '@singletons'; import { CoreNavigator } from '@services/navigator'; import { CoreEventObserver, CoreEvents } from '@singletons/events'; import { CoreUtils } from '@services/utils/utils'; +import { AlertButton } from '@ionic/angular'; +import { CoreUserSupport } from '@features/user/services/support'; /** * Page that shows instructions to complete the profile. @@ -45,11 +47,26 @@ export class CoreUserCompleteProfilePage implements OnDestroy { * Show a help modal. */ showHelp(): void { - // @todo MOBILE-4059: Change this message. - CoreDomUtils.showAlert( - Translate.instant('core.help'), - Translate.instant('core.login.changepasswordhelp'), - ); + const site = CoreSites.getRequiredCurrentSite(); + const buttons: (AlertButton | string)[] = []; + + if (site.canContactSupport()) { + buttons.push({ + text: Translate.instant('core.contactsupport'), + handler: () => CoreUserSupport.contact({ + supportPageUrl: site.getSupportPageUrl(), + subject: Translate.instant('core.login.completeprofilesupportsubject'), + }), + }); + } + + buttons.push(Translate.instant('core.ok')); + + CoreDomUtils.showAlertWithOptions({ + header: Translate.instant('core.help'), + message: Translate.instant('core.user.completeprofilehelp'), + buttons, + }); } /**