From f3a80307809f4e003f51b822aacf798b0646d8c6 Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Mon, 28 Oct 2024 17:38:17 +0100 Subject: [PATCH] :lipstick: [open-formulieren/open-forms#4546] Add alert styling to the soft required errors component This enables it to be customized via NL DS design tokens, and provides some escape hatches to make it different from the standard warning alert appearance. --- src/formio/components/SoftRequiredErrors.js | 11 ++++++++++- src/formio/templates/missingFields.ejs | 2 +- src/scss/components/_soft-required-errors.scss | 17 +++++++++++++++++ src/styles.scss | 1 + 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 src/scss/components/_soft-required-errors.scss diff --git a/src/formio/components/SoftRequiredErrors.js b/src/formio/components/SoftRequiredErrors.js index cff14099f..bbf37a36d 100644 --- a/src/formio/components/SoftRequiredErrors.js +++ b/src/formio/components/SoftRequiredErrors.js @@ -43,7 +43,16 @@ class SoftRequiredErrors extends FormioContentField { missingFields: missingFieldsMarkup, }); - return `
${content}
`; + return ` +
+
+ +
+
+ ${content} +
+
+ `; } } diff --git a/src/formio/templates/missingFields.ejs b/src/formio/templates/missingFields.ejs index 2f85f9dc0..7790e35b1 100644 --- a/src/formio/templates/missingFields.ejs +++ b/src/formio/templates/missingFields.ejs @@ -1,7 +1,7 @@ {{ ctx.t('Empty fields') }} -