diff --git a/scripts/langindex.json b/scripts/langindex.json index 07dfc6c83..65bdc325e 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -2396,6 +2396,8 @@ "core.user.sendemail": "local_moodlemobileapp", "core.user.student": "moodle/defaultcoursestudent", "core.user.support": "local_moodlemobileapp", + "core.user.supportmessagesent": "user", + "core.user.supportsubject": "local_moodlemobileapp", "core.user.teacher": "moodle/noneditingteacher", "core.user.useraccount": "moodle", "core.user.userwithid": "local_moodlemobileapp", diff --git a/src/core/components/error-info/error-info.scss b/src/core/components/error-info/error-info.scss index 784457cf1..97922518f 100644 --- a/src/core/components/error-info/error-info.scss +++ b/src/core/components/error-info/error-info.scss @@ -12,24 +12,22 @@ margin-bottom: 0; } - .core-error-info--content { + .core-error-info--code { padding: var(--spacing-2) var(--spacing-2) 0 var(--spacing-2); + font-size: var(--font-size-normal); + } - .core-error-info--code { - font-size: var(--font-size-normal); - } - - .core-error-info--details { - color: var(--gray-500); - } - + .core-error-info--details p { + padding: var(--spacing-2) var(--spacing-2) 0 var(--spacing-2); + color: var(--gray-500); } .core-error-info--checkbox { display: none; - & + .core-error-info--content { - max-height: calc(var(--font-size-sm) + 2 * var(--spacing-2)); + & + .core-error-info--details, + & + .core-error-info--code + .core-error-info--details { + max-height: 0; overflow: hidden; transition: max-height 600ms ease-in-out; @@ -58,8 +56,9 @@ } - &:checked + .core-error-info--content { - max-height: 150px; + &:checked + .core-error-info--details, + &:checked + .core-error-info--code + .core-error-info--details { + max-height: 110px; & + .core-error-info--toggle .core-error-info--hide-content { display: flex; @@ -73,16 +72,4 @@ } - &.has-error-code .core-error-info--checkbox { - - & + .core-error-info--content { - max-height: calc(var(--font-size-normal) + 2 * var(--spacing-2)); - } - - &:checked + .core-error-info--content { - max-height: 170px; - } - - } - } diff --git a/src/core/components/error-info/error-info.ts b/src/core/components/error-info/error-info.ts index 6584653d9..948d27eb1 100644 --- a/src/core/components/error-info/error-info.ts +++ b/src/core/components/error-info/error-info.ts @@ -40,16 +40,16 @@ export class CoreErrorInfoComponent implements OnInit, OnChanges { */ static render(errorDetails: string, errorCode?: string): string { const toggleId = CoreForms.uniqueId('error-info-toggle'); - const errorCodeLabel = Translate.instant('core.errorcode'); + const errorCodeLabel = Translate.instant('core.errorcode', { errorCode }); const hideDetailsLabel = Translate.instant('core.errordetailshide'); const showDetailsLabel = Translate.instant('core.errordetailsshow'); return ` -
+
-
- ${errorCode ? `

${errorCodeLabel}: ${errorCode}

` : ''} -

${errorDetails}

+ ${errorCode ? `
${errorCodeLabel}
` : ''} +
+

${errorDetails}