diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-03-11 23:36:01 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-03-11 23:45:06 +0100 |
commit | c0fca9901a634d53d8ee0bfb119b9b2e2f017d83 (patch) | |
tree | 127bbc1cd56097694d906d9b9245164436457a76 /src/main/kotlin/pl/treksoft/kvision/form | |
parent | 3577c10b5c3839a06f64cb19e72788401bd7406d (diff) | |
download | kvision-c0fca9901a634d53d8ee0bfb119b9b2e2f017d83.tar.gz kvision-c0fca9901a634d53d8ee0bfb119b9b2e2f017d83.tar.bz2 kvision-c0fca9901a634d53d8ee0bfb119b9b2e2f017d83.zip |
Change the name of content property in Tag component.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/form')
11 files changed, 26 insertions, 26 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/FieldLabel.kt b/src/main/kotlin/pl/treksoft/kvision/form/FieldLabel.kt index b4be8f8e..e6aad194 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/FieldLabel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/FieldLabel.kt @@ -30,16 +30,16 @@ import pl.treksoft.kvision.html.Tag * * @constructor * @param forId the value of *for* attribute - * @param text the text of the label - * @param rich determines if [text] can contain HTML code + * @param content the text of the label + * @param rich determines if [content] can contain HTML code * @param classes a set of CSS class names */ open class FieldLabel( - internal val forId: String, text: String? = null, rich: Boolean = false, + internal val forId: String, content: String? = null, rich: Boolean = false, classes: Set<String> = setOf("control-label") ) : Tag( TAG.LABEL, - text, rich, classes = classes + content, rich, classes = classes ) { override fun getSnAttrs(): List<StringPair> { diff --git a/src/main/kotlin/pl/treksoft/kvision/form/FormControl.kt b/src/main/kotlin/pl/treksoft/kvision/form/FormControl.kt index b74ae533..41d964fd 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/FormControl.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/FormControl.kt @@ -86,9 +86,9 @@ interface FormControl : Component { * Validator error message. */ var validatorError: String? - get() = validationInfo.text + get() = validationInfo.content set(value) { - validationInfo.text = value + validationInfo.content = value validationInfo.visible = value != null refresh() } diff --git a/src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt b/src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt index 5df2d299..1be29f31 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/FormPanel.kt @@ -73,9 +73,9 @@ open class FormPanel<K>( } internal var validatorError: String? - get() = validationAlert.text + get() = validationAlert.content set(value) { - validationAlert.text = value + validationAlert.content = value validationAlert.visible = value != null refresh() } diff --git a/src/main/kotlin/pl/treksoft/kvision/form/HelpBlock.kt b/src/main/kotlin/pl/treksoft/kvision/form/HelpBlock.kt index db9aebc5..9ec3d8ae 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/HelpBlock.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/HelpBlock.kt @@ -28,10 +28,10 @@ import pl.treksoft.kvision.html.Tag * Helper class for Bootstrap help block element. * * @constructor - * @param text the text of the label - * @param rich determines if [text] can contain HTML code + * @param content the text of the label + * @param rich determines if [content] can contain HTML code */ -open class HelpBlock(text: String? = null, rich: Boolean = false) : Tag( - TAG.SPAN, text, rich, +open class HelpBlock(content: String? = null, rich: Boolean = false) : Tag( + TAG.SPAN, content, rich, classes = setOf("help-block", "small") ) 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 f1d231c6..58033d3a 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/check/CheckBox.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/check/CheckBox.kt @@ -92,9 +92,9 @@ open class CheckBox( * The label text bound to the input element. */ var label - get() = flabel.text + get() = flabel.content set(value) { - flabel.text = value + flabel.content = value } /** * Determines if [label] can contain HTML code. 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 5b02938c..6e26fa5b 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/check/Radio.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/check/Radio.kt @@ -102,9 +102,9 @@ open class Radio( * The label text bound to the input element. */ var label - get() = flabel.text + get() = flabel.content set(value) { - flabel.text = value + flabel.content = value } /** * Determines if [label] can contain HTML code. 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 2ed8a36c..84e3d89f 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/check/RadioGroup.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/check/RadioGroup.kt @@ -75,9 +75,9 @@ open class RadioGroup( * The label text of the options group. */ var label - get() = flabel.text + get() = flabel.content set(value) { - flabel.text = value + flabel.content = value } /** * Determines if [label] can contain HTML code. diff --git a/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt b/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt index 8d443ecf..0c9cdb2e 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt @@ -166,9 +166,9 @@ open class Select( * The label text bound to the select element. */ var label - get() = flabel.text + get() = flabel.content set(value) { - flabel.text = value + flabel.content = value } /** * Determines if [label] can contain HTML code. diff --git a/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt b/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt index 0aa514b7..9d72f36b 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt @@ -159,9 +159,9 @@ open class Spinner( * The label text bound to the spinner input element. */ var label - get() = flabel.text + get() = flabel.content set(value) { - flabel.text = value + flabel.content = value } /** * Determines if [label] can contain HTML code. diff --git a/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractText.kt b/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractText.kt index 1d3b5e01..3c62d4a8 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractText.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractText.kt @@ -107,9 +107,9 @@ abstract class AbstractText(label: String? = null, rich: Boolean = false) : * The label text bound to the text input element. */ var label - get() = flabel.text + get() = flabel.content set(value) { - flabel.text = value + flabel.content = value } /** * Determines if [label] can contain HTML code. diff --git a/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt b/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt index dd6f222d..ecf930e2 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt @@ -158,9 +158,9 @@ open class DateTime( * The label text bound to the input element. */ var label - get() = flabel.text + get() = flabel.content set(value) { - flabel.text = value + flabel.content = value } /** * Determines if [label] can contain HTML code. |