From 4e30374961048d5512e63fa08400697baec94c0e Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Wed, 6 Aug 2025 12:07:46 +0100 Subject: [PATCH] Fix material icon in hydrate form message (#27511) GitOrigin-RevId: 5775f89ee625a7346ccbce8c1103dfa650ff94e3 --- .../web/frontend/js/features/form-helpers/hydrate-form.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/frontend/js/features/form-helpers/hydrate-form.js b/services/web/frontend/js/features/form-helpers/hydrate-form.js index 3d546203fc..f3d968b89e 100644 --- a/services/web/frontend/js/features/form-helpers/hydrate-form.js +++ b/services/web/frontend/js/features/form-helpers/hydrate-form.js @@ -4,7 +4,7 @@ import { canSkipCaptcha, validateCaptchaV2 } from './captcha' import inputValidator from './input-validator' import { disableElement, enableElement } from '../utils/disableElement' import { isBootstrap5 } from '@/features/utils/bootstrap-5' -import { materialIcon } from '@/features/utils/material-icon' +import { materialIcon as createMaterialIcon } from '@/features/utils/material-icon' // Form helper(s) to handle: // - Attaching to the relevant form elements @@ -165,7 +165,7 @@ function createNotificationFromMessageBS5(message) { if (materialIcon) { const iconEl = document.createElement('div') iconEl.className = 'notification-icon' - const iconSpan = materialIcon(materialIcon) + const iconSpan = createMaterialIcon(materialIcon) iconEl.append(iconSpan) messageEl.append(iconEl) } @@ -313,7 +313,7 @@ function showMessagesNewStyle(formEl, messageBag) { } // create the left icon - const icon = materialIcon( + const icon = createMaterialIcon( message.type === 'error' ? 'error' : 'check_circle' ) const messageIcon = document.createElement('div')