aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/form/check
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-01-17 19:29:30 +0100
committerRobert Jaros <rjaros@finn.pl>2018-01-17 19:29:30 +0100
commit31c9d3c4121107974a8419752aa7face5c96f821 (patch)
tree77aaac10c5a120b028c14f53ab74eb5491f4a443 /src/main/kotlin/pl/treksoft/kvision/form/check
parent646e82e383850447fd4d10f71ecc0aeab11623e0 (diff)
downloadkvision-31c9d3c4121107974a8419752aa7face5c96f821.tar.gz
kvision-31c9d3c4121107974a8419752aa7face5c96f821.tar.bz2
kvision-31c9d3c4121107974a8419752aa7face5c96f821.zip
Code formatting (Kotlin Style Guide)
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/form/check')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/check/CheckBox.kt12
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/check/CheckInput.kt6
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/check/Radio.kt6
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/check/RadioGroup.kt8
4 files changed, 21 insertions, 11 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/check/CheckBox.kt b/src/main/kotlin/pl/treksoft/kvision/form/check/CheckBox.kt
index 62403f8a..4faee7e7 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/check/CheckBox.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/check/CheckBox.kt
@@ -17,8 +17,10 @@ enum class CHECKBOXSTYLE(val className: String) {
DANGER("checkbox-danger"),
}
-open class CheckBox(value: Boolean = false, label: String? = null,
- rich: Boolean = false) : SimplePanel(setOf("checkbox")), BoolFormControl {
+open class CheckBox(
+ value: Boolean = false, label: String? = null,
+ rich: Boolean = false
+) : SimplePanel(setOf("checkbox")), BoolFormControl {
override var value
get() = input.value
@@ -72,8 +74,10 @@ open class CheckBox(value: Boolean = false, label: String? = null,
}
private val idc = "kv_form_checkbox_" + counter
- final override val input: CheckInput = CheckInput(CHECKINPUTTYPE.CHECKBOX, value,
- setOf("styled")).apply { id = idc }
+ final override val input: CheckInput = CheckInput(
+ CHECKINPUTTYPE.CHECKBOX, value,
+ setOf("styled")
+ ).apply { id = idc }
final override val flabel: FieldLabel = FieldLabel(idc, label, rich, classes = setOf())
final override val validationInfo: HelpBlock = HelpBlock().apply { visible = false }
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/check/CheckInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/check/CheckInput.kt
index a2ebd06d..a3ccd126 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/check/CheckInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/check/CheckInput.kt
@@ -11,8 +11,10 @@ enum class CHECKINPUTTYPE(val type: String) {
RADIO("radio")
}
-open class CheckInput(type: CHECKINPUTTYPE = CHECKINPUTTYPE.CHECKBOX, value: Boolean = false,
- classes: Set<String> = setOf()) : Widget(classes) {
+open class CheckInput(
+ type: CHECKINPUTTYPE = CHECKINPUTTYPE.CHECKBOX, value: Boolean = false,
+ classes: Set<String> = setOf()
+) : Widget(classes) {
init {
this.setInternalEventListener<CheckInput> {
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 696e2264..1ec63f60 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/check/Radio.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/check/Radio.kt
@@ -17,8 +17,10 @@ enum class RADIOSTYLE(val className: String) {
DANGER("radio-danger"),
}
-open class Radio(value: Boolean = false, extraValue: String? = null, label: String? = null,
- rich: Boolean = false) : SimplePanel(), BoolFormControl {
+open class Radio(
+ value: Boolean = false, extraValue: String? = null, label: String? = null,
+ rich: Boolean = false
+) : SimplePanel(), BoolFormControl {
override var value
get() = input.value
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/check/RadioGroup.kt b/src/main/kotlin/pl/treksoft/kvision/form/check/RadioGroup.kt
index df99dedf..fdf0e6a9 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/check/RadioGroup.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/check/RadioGroup.kt
@@ -10,9 +10,11 @@ import pl.treksoft.kvision.panel.SimplePanel
import pl.treksoft.kvision.snabbdom.StringBoolPair
import pl.treksoft.kvision.snabbdom.StringPair
-open class RadioGroup(options: List<StringPair>? = null, value: String? = null, inline: Boolean = false,
- label: String? = null,
- rich: Boolean = false) : SimplePanel(setOf("form-group")), StringFormControl {
+open class RadioGroup(
+ options: List<StringPair>? = null, value: String? = null, inline: Boolean = false,
+ label: String? = null,
+ rich: Boolean = false
+) : SimplePanel(setOf("form-group")), StringFormControl {
internal var options = options
set(value) {