aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt1
-rw-r--r--src/main/resources/css/style.css5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt b/src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt
index 0decc5e9..aadd57cf 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt
@@ -239,6 +239,7 @@ open class FormPanel<K : Any>(
FormType.HORIZONTAL -> control.styleForHorizontalFormPanel(horizRatio)
else -> control.styleForVerticalFormPanel()
}
+ if (required) control.flabel.addCssClass("required-label")
super.add(control)
form.addInternal(key, control, required, requiredMessage, validatorMessage, validator)
return this
diff --git a/src/main/resources/css/style.css b/src/main/resources/css/style.css
index dbc65278..4adc61c0 100644
--- a/src/main/resources/css/style.css
+++ b/src/main/resources/css/style.css
@@ -104,6 +104,11 @@ trix-toolbar .trix-button-group {
min-width: 200px;
}
+label.required-label::after {
+ content: " *";
+ color: #dc3545;
+}
+
.kv-spinner-btn-none .input-group-btn-vertical {
display: none;
}