aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-12-02 10:03:42 +0100
committerRobert Jaros <rjaros@finn.pl>2019-12-02 10:03:42 +0100
commit1cb9cc8ff1378171280f07f8143145d78e61dab4 (patch)
treeeb15948309af473f0a9ba6ed55de9f461b6abc0b /src/main/kotlin/pl/treksoft
parentff01aaf8ca434488a8566dc48314e933347628ef (diff)
downloadkvision-1cb9cc8ff1378171280f07f8143145d78e61dab4.tar.gz
kvision-1cb9cc8ff1378171280f07f8143145d78e61dab4.tar.bz2
kvision-1cb9cc8ff1378171280f07f8143145d78e61dab4.zip
Auto marking of required form fields
Diffstat (limited to 'src/main/kotlin/pl/treksoft')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt1
1 files changed, 1 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