aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/check/Radio.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/check/Radio.kt b/src/main/kotlin/pl/treksoft/kvision/form/check/Radio.kt
index 1ec63f60..4dc0ac90 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/check/Radio.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/check/Radio.kt
@@ -18,7 +18,7 @@ enum class RADIOSTYLE(val className: String) {
}
open class Radio(
- value: Boolean = false, extraValue: String? = null, label: String? = null,
+ value: Boolean = false, extraValue: String? = null, name: String? = null, label: String? = null,
rich: Boolean = false
) : SimplePanel(), BoolFormControl {
@@ -82,6 +82,7 @@ open class Radio(
final override val input: CheckInput = CheckInput(CHECKINPUTTYPE.RADIO, value).apply {
this.id = idc
this.extraValue = extraValue
+ this.name = name
}
final override val flabel: FieldLabel = FieldLabel(idc, label, rich, classes = setOf())
final override val validationInfo: HelpBlock = HelpBlock().apply { visible = false }
@@ -127,6 +128,7 @@ open class Radio(
}
} else {
cl.add("checkbox" to true)
+ cl.add("kv-radio-checkbox" to true)
style?.let {
cl.add(it.className.replace("radio", "checkbox") to true)
}