diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-12-02 10:03:42 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-12-02 10:03:42 +0100 |
commit | 1cb9cc8ff1378171280f07f8143145d78e61dab4 (patch) | |
tree | eb15948309af473f0a9ba6ed55de9f461b6abc0b /src/main/kotlin | |
parent | ff01aaf8ca434488a8566dc48314e933347628ef (diff) | |
download | kvision-1cb9cc8ff1378171280f07f8143145d78e61dab4.tar.gz kvision-1cb9cc8ff1378171280f07f8143145d78e61dab4.tar.bz2 kvision-1cb9cc8ff1378171280f07f8143145d78e61dab4.zip |
Auto marking of required form fields
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt | 1 |
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 |