From f1175f325bc487430bc49a5c7ad74021f4f52179 Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Mon, 23 Oct 2023 08:55:18 +0200 Subject: [PATCH] :recycle: [#571] Use class/CSS approach for required field asterisk --- src/components/forms/Label.js | 2 +- src/formio/templates/checkbox.ejs | 2 +- src/formio/templates/field.ejs | 4 ++-- src/formio/templates/label.ejs | 2 +- src/scss/components/_formio-component.scss | 14 ++++++-------- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/components/forms/Label.js b/src/components/forms/Label.js index 960180535..d274d0414 100644 --- a/src/components/forms/Label.js +++ b/src/components/forms/Label.js @@ -13,7 +13,7 @@ export const LabelContent = ({id, disabled = false, isRequired = false, type, ch htmlFor={id} disabled={disabled} className={classNames({ - 'utrecht-form-label--openforms-required': isRequired, + 'utrecht-form-label--openforms-required': isRequired && requiredFieldsWithAsterisk, [`utrecht-form-label--${type}`]: type, })} > diff --git a/src/formio/templates/checkbox.ejs b/src/formio/templates/checkbox.ejs index 22121b09b..e4629e4fb 100644 --- a/src/formio/templates/checkbox.ejs +++ b/src/formio/templates/checkbox.ejs @@ -12,7 +12,7 @@