aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-02-24 15:56:10 +0100
committerRobert Jaros <rjaros@finn.pl>2018-02-24 15:56:10 +0100
commit1fc045c97511d8c888af3ac441c27bfb7a35ef43 (patch)
treee8bf433734bd60a73301ea8f1109ed74bca74197 /src
parent852eb4b2d0df2475f45642534bbe1d9d2352aa61 (diff)
downloadkvision-1fc045c97511d8c888af3ac441c27bfb7a35ef43.tar.gz
kvision-1fc045c97511d8c888af3ac441c27bfb7a35ef43.tar.bz2
kvision-1fc045c97511d8c888af3ac441c27bfb7a35ef43.zip
Snabbdom upgrade to v0.7.1
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/check/CheckInput.kt4
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt4
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/select/SelectOptGroup.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/select/SelectOption.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/text/AbstractTextInput.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckInputSpec.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt2
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt4
21 files changed, 29 insertions, 29 deletions
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 7c67c957..9e0c1fa9 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/check/CheckInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/check/CheckInput.kt
@@ -111,13 +111,13 @@ open class CheckInput(
val sn = super.getSnAttrs().toMutableList()
sn.add("type" to type.type)
if (startValue) {
- sn.add("checked" to "true")
+ sn.add("checked" to "checked")
}
name?.let {
sn.add("name" to it)
}
if (disabled) {
- sn.add("disabled" to "true")
+ sn.add("disabled" to "disabled")
}
extraValue?.let {
sn.add("value" to it)
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt
index b0b7f4b3..dd8fcabd 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt
@@ -245,7 +245,7 @@ open class SelectInput(
sn.add("name" to it)
}
if (multiple) {
- sn.add("multiple" to "true")
+ sn.add("multiple" to "multiple")
}
maxOptions?.let {
sn.add("data-max-options" to "" + it)
@@ -262,7 +262,7 @@ open class SelectInput(
}
}
if (disabled) {
- sn.add("disabled" to "true")
+ sn.add("disabled" to "disabled")
}
val btnStyle = style?.className ?: "btn-default"
when (size) {
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOptGroup.kt b/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOptGroup.kt
index 95d8f178..3b523314 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOptGroup.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOptGroup.kt
@@ -84,7 +84,7 @@ open class SelectOptGroup(
sn.add("data-max-options" to "" + it)
}
if (disabled) {
- sn.add("disabled" to "true")
+ sn.add("disabled" to "disabled")
}
return sn
}
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOption.kt b/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOption.kt
index 141eff28..5cd23582 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOption.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOption.kt
@@ -93,7 +93,7 @@ open class SelectOption(
}
}
if (disabled) {
- sn.add("disabled" to "true")
+ sn.add("disabled" to "disabled")
}
} else {
sn.add("data-divider" to "true")
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt
index a5565d2a..23c48a80 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt
@@ -191,7 +191,7 @@ open class SpinnerInput(
}
}
if (disabled) {
- sn.add("disabled" to "true")
+ sn.add("disabled" to "disabled")
value?.let {
sn.add("value" to it.toString())
}
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractTextInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractTextInput.kt
index 8467dab8..c43f94ba 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractTextInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractTextInput.kt
@@ -117,7 +117,7 @@ abstract class AbstractTextInput(
}
}
if (disabled) {
- sn.add("disabled" to "true")
+ sn.add("disabled" to "disabled")
}
return sn
}
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
index 9e6e61b0..de8bb320 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
@@ -57,7 +57,7 @@ open class RichTextInput(value: String? = null, classes: Set<String> = setOf())
}
}
if (disabled) {
- sn.add("disabled" to "true")
+ sn.add("disabled" to "disabled")
}
return sn
}
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt
index 6004b320..9fa87195 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt
@@ -150,7 +150,7 @@ open class DateTimeInput(
}
}
if (disabled) {
- sn.add("disabled" to "true")
+ sn.add("disabled" to "disabled")
value?.let {
sn.add("value" to it.toStringF(format))
}
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt
index 67928181..3aa427ed 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckBoxSpec.kt
@@ -46,7 +46,7 @@ class CheckBoxSpec : DomSpec {
val element = document.getElementById("test")
val id = ci.input.id
assertEquals(
- "<div class=\"checkbox checkbox-danger checkbox-circle checkbox-inline\"><input class=\"styled\" id=\"$id\" type=\"checkbox\" checked=\"\" name=\"name\" disabled=\"\"><label for=\"$id\">Label</label></div>",
+ "<div class=\"checkbox checkbox-danger checkbox-circle checkbox-inline\"><input class=\"styled\" id=\"$id\" type=\"checkbox\" checked=\"checked\" name=\"name\" disabled=\"disabled\"><label for=\"$id\">Label</label></div>",
element?.innerHTML,
"Should render correct checkbox form control"
)
@@ -54,7 +54,7 @@ class CheckBoxSpec : DomSpec {
ci.circled = false
ci.inline = false
assertEquals(
- "<div class=\"checkbox checkbox-info\"><input class=\"styled\" id=\"$id\" type=\"checkbox\" checked=\"\" name=\"name\" disabled=\"\"><label for=\"$id\">Label</label></div>",
+ "<div class=\"checkbox checkbox-info\"><input class=\"styled\" id=\"$id\" type=\"checkbox\" checked=\"checked\" name=\"name\" disabled=\"disabled\"><label for=\"$id\">Label</label></div>",
element?.innerHTML,
"Should render correct checkbox form control"
)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckInputSpec.kt
index bb13479f..960dad56 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/CheckInputSpec.kt
@@ -43,7 +43,7 @@ class CheckInputSpec : DomSpec {
root.add(ci)
val element = document.getElementById("test")
assertEquals(
- "<input id=\"idti\" type=\"checkbox\" checked=\"\" name=\"name\" disabled=\"\">",
+ "<input id=\"idti\" type=\"checkbox\" checked=\"checked\" name=\"name\" disabled=\"disabled\">",
element?.innerHTML,
"Should render correct checkbox control"
)
@@ -62,7 +62,7 @@ class CheckInputSpec : DomSpec {
root.add(ci)
val element = document.getElementById("test")
assertEquals(
- "<input id=\"idti\" type=\"radio\" checked=\"\" name=\"name\" value=\"abc\">",
+ "<input id=\"idti\" type=\"radio\" checked=\"checked\" name=\"name\" value=\"abc\">",
element?.innerHTML,
"Should render correct radio button control"
)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt
index 80616f5a..62b10f68 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioGroupSpec.kt
@@ -45,7 +45,7 @@ class RadioGroupSpec : DomSpec {
val rid1 = ci.getChildren().filterIsInstance<Radio>().first().input.id
val rid2 = ci.getChildren().filterIsInstance<Radio>().last().input.id
assertEquals(
- "<div class=\"form-group kv-radiogroup-inline\"><label class=\"control-label\" for=\"$id\">Label</label><div class=\"radio\"><input id=\"$rid1\" type=\"radio\" name=\"$id\" disabled=\"\" value=\"a\"><label for=\"$rid1\">A</label></div><div class=\"radio\"><input id=\"$rid2\" type=\"radio\" name=\"$id\" disabled=\"\" value=\"b\"><label for=\"$rid2\">B</label></div></div>",
+ "<div class=\"form-group kv-radiogroup-inline\"><label class=\"control-label\" for=\"$id\">Label</label><div class=\"radio\"><input id=\"$rid1\" type=\"radio\" name=\"$id\" disabled=\"disabled\" value=\"a\"><label for=\"$rid1\">A</label></div><div class=\"radio\"><input id=\"$rid2\" type=\"radio\" name=\"$id\" disabled=\"disabled\" value=\"b\"><label for=\"$rid2\">B</label></div></div>",
element?.innerHTML,
"Should render correct radio button group form control"
)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt
index 20fff041..f7020d09 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/check/RadioSpec.kt
@@ -45,7 +45,7 @@ class RadioSpec : DomSpec {
val element = document.getElementById("test")
val id = ci.input.id
assertEquals(
- "<div class=\"radio radio-danger radio-inline\"><input id=\"$id\" type=\"radio\" checked=\"\" name=\"name\" disabled=\"\" value=\"abc\"><label for=\"$id\">Label</label></div>",
+ "<div class=\"radio radio-danger radio-inline\"><input id=\"$id\" type=\"radio\" checked=\"checked\" name=\"name\" disabled=\"disabled\" value=\"abc\"><label for=\"$id\">Label</label></div>",
element?.innerHTML,
"Should render correct radio button form control"
)
@@ -53,7 +53,7 @@ class RadioSpec : DomSpec {
ci.squared = true
ci.inline = false
assertEquals(
- "<div class=\"checkbox kv-radio-checkbox checkbox-info\"><input id=\"$id\" type=\"radio\" checked=\"\" name=\"name\" disabled=\"\" value=\"abc\"><label for=\"$id\">Label</label></div>",
+ "<div class=\"checkbox kv-radio-checkbox checkbox-info\"><input id=\"$id\" type=\"radio\" checked=\"checked\" name=\"name\" disabled=\"disabled\" value=\"abc\"><label for=\"$id\">Label</label></div>",
element?.innerHTML,
"Should render correct radio button form control"
)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
index 055ef020..c51a6b43 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
@@ -44,7 +44,7 @@ class SelectInputSpec : DomSpec {
root.add(selectInput)
val element = document.getElementById("test")
assertTrue(
- true == element?.innerHTML?.endsWith("<select class=\"selectpicker\" multiple=\"\" data-live-search=\"true\" title=\"Choose ...\" data-style=\"btn-default\" data-width=\"fit\" tabindex=\"-98\"><option value=\"#kvnull\"></option><option value=\"test1\">Test 1</option><option value=\"test2\">Test 2</option></select></div>"),
+ true == element?.innerHTML?.endsWith("<select class=\"selectpicker\" multiple=\"multiple\" data-live-search=\"true\" title=\"Choose ...\" data-style=\"btn-default\" data-width=\"fit\" tabindex=\"-98\"><option value=\"#kvnull\"></option><option value=\"test1\">Test 1</option><option value=\"test2\">Test 2</option></select></div>"),
"Should render correct select input"
)
}
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
index 3f44c3ed..ae07199c 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
@@ -49,7 +49,7 @@ class SelectSpec : DomSpec {
"Should render correct select form control"
)
assertTrue(
- true == element?.innerHTML?.endsWith("<select class=\"form-control selectpicker\" id=\"$id\" multiple=\"\" data-live-search=\"true\" title=\"Choose ...\" data-style=\"btn-default\" data-width=\"fit\" tabindex=\"-98\"><option value=\"#kvnull\"></option><option value=\"test1\">Test 1</option><option value=\"test2\">Test 2</option></select></div></div>"),
+ true == element?.innerHTML?.endsWith("<select class=\"form-control selectpicker\" id=\"$id\" multiple=\"multiple\" data-live-search=\"true\" title=\"Choose ...\" data-style=\"btn-default\" data-width=\"fit\" tabindex=\"-98\"><option value=\"#kvnull\"></option><option value=\"test1\">Test 1</option><option value=\"test2\">Test 2</option></select></div></div>"),
"Should render correct select form control"
)
}
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt
index c309d526..a8474790 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/spinner/SpinnerSpec.kt
@@ -43,13 +43,13 @@ class SpinnerSpec : DomSpec {
val element = document.getElementById("test")
val id = ti.input.id
assertEquals(
- "<div class=\"form-group\"><label class=\"control-label\" for=\"$id\">Label</label><div class=\"input-group kv-spinner-btn-vertical\"><span><div class=\"input-group bootstrap-touchspin\"><span class=\"input-group-addon bootstrap-touchspin-prefix\" style=\"display: none;\"></span><input class=\"form-control\" id=\"$id\" type=\"text\" value=\"13\" placeholder=\"place\" name=\"name\" disabled=\"\" style=\"display: block;\"><span class=\"input-group-addon bootstrap-touchspin-postfix\" style=\"display: none;\"></span><span class=\"input-group-btn-vertical\"><button class=\"btn btn-default bootstrap-touchspin-up\" type=\"button\"><i class=\"glyphicon glyphicon-chevron-up\"></i></button><button class=\"btn btn-default bootstrap-touchspin-down\" type=\"button\"><i class=\"glyphicon glyphicon-chevron-down\"></i></button></span></div></span></div></div>",
+ "<div class=\"form-group\"><label class=\"control-label\" for=\"$id\">Label</label><div class=\"input-group kv-spinner-btn-vertical\"><span><div class=\"input-group bootstrap-touchspin\"><span class=\"input-group-addon bootstrap-touchspin-prefix\" style=\"display: none;\"></span><input class=\"form-control\" id=\"$id\" type=\"text\" value=\"13\" placeholder=\"place\" name=\"name\" disabled=\"disabled\" style=\"display: block;\"><span class=\"input-group-addon bootstrap-touchspin-postfix\" style=\"display: none;\"></span><span class=\"input-group-btn-vertical\"><button class=\"btn btn-default bootstrap-touchspin-up\" type=\"button\"><i class=\"glyphicon glyphicon-chevron-up\"></i></button><button class=\"btn btn-default bootstrap-touchspin-down\" type=\"button\"><i class=\"glyphicon glyphicon-chevron-down\"></i></button></span></div></span></div></div>",
element?.innerHTML,
"Should render correct spinner input form control"
)
ti.validatorError = "Validation Error"
assertEquals(
- "<div class=\"form-group has-error\"><label class=\"control-label\" for=\"$id\">Label</label><div class=\"input-group kv-spinner-btn-vertical\"><span><div class=\"input-group bootstrap-touchspin\"><span class=\"input-group-addon bootstrap-touchspin-prefix\" style=\"display: none;\"></span><input class=\"form-control\" id=\"$id\" type=\"text\" value=\"13\" placeholder=\"place\" name=\"name\" disabled=\"\" style=\"display: block;\"><span class=\"input-group-addon bootstrap-touchspin-postfix\" style=\"display: none;\"></span><span class=\"input-group-btn-vertical\"><button class=\"btn btn-default bootstrap-touchspin-up\" type=\"button\"><i class=\"glyphicon glyphicon-chevron-up\"></i></button><button class=\"btn btn-default bootstrap-touchspin-down\" type=\"button\"><i class=\"glyphicon glyphicon-chevron-down\"></i></button></span></div></span></div><span class=\"help-block small\">Validation Error</span></div>",
+ "<div class=\"form-group has-error\"><label class=\"control-label\" for=\"$id\">Label</label><div class=\"input-group kv-spinner-btn-vertical\"><span><div class=\"input-group bootstrap-touchspin\"><span class=\"input-group-addon bootstrap-touchspin-prefix\" style=\"display: none;\"></span><input class=\"form-control\" id=\"$id\" type=\"text\" value=\"13\" placeholder=\"place\" name=\"name\" disabled=\"disabled\" style=\"display: block;\"><span class=\"input-group-addon bootstrap-touchspin-postfix\" style=\"display: none;\"></span><span class=\"input-group-btn-vertical\"><button class=\"btn btn-default bootstrap-touchspin-up\" type=\"button\"><i class=\"glyphicon glyphicon-chevron-up\"></i></button><button class=\"btn btn-default bootstrap-touchspin-down\" type=\"button\"><i class=\"glyphicon glyphicon-chevron-down\"></i></button></span></div></span></div><span class=\"help-block small\">Validation Error</span></div>",
element?.innerHTML,
"Should render correct spinner input form control with validation error"
)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt
index 47d757f1..f30111b1 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/PasswordSpec.kt
@@ -44,7 +44,7 @@ class PasswordSpec : DomSpec {
val element = document.getElementById("test")
val id = ti.input.id
assertEquals(
- "<div class=\"form-group\"><label class=\"control-label\" for=\"$id\">Label</label><input class=\"form-control\" id=\"$id\" placeholder=\"place\" name=\"name\" maxlength=\"15\" disabled=\"\" type=\"password\" value=\"abc\"></div>",
+ "<div class=\"form-group\"><label class=\"control-label\" for=\"$id\">Label</label><input class=\"form-control\" id=\"$id\" placeholder=\"place\" name=\"name\" maxlength=\"15\" disabled=\"disabled\" type=\"password\" value=\"abc\"></div>",
element?.innerHTML,
"Should render correct input form control"
)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt
index 21c440a6..ff7ed0b0 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaInputSpec.kt
@@ -44,7 +44,7 @@ class TextAreaInputSpec : DomSpec {
root.add(ti)
val element = document.getElementById("test")
assertEquals(
- "<textarea class=\"form-control\" id=\"idti\" placeholder=\"place\" name=\"name\" maxlength=\"15\" disabled=\"\" cols=\"5\" rows=\"2\">abc</textarea>",
+ "<textarea class=\"form-control\" id=\"idti\" placeholder=\"place\" name=\"name\" maxlength=\"15\" disabled=\"disabled\" cols=\"5\" rows=\"2\">abc</textarea>",
element?.innerHTML,
"Should render correct input control"
)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt
index e75a651e..1b34f7d2 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextAreaSpec.kt
@@ -44,7 +44,7 @@ class TextAreaSpec : DomSpec {
val element = document.getElementById("test")
val id = ti.input.id
assertEquals(
- "<div class=\"form-group\"><label class=\"control-label\" for=\"$id\">Label</label><textarea class=\"form-control\" id=\"$id\" placeholder=\"place\" name=\"name\" maxlength=\"15\" disabled=\"\" cols=\"5\" rows=\"2\">abc</textarea></div>",
+ "<div class=\"form-group\"><label class=\"control-label\" for=\"$id\">Label</label><textarea class=\"form-control\" id=\"$id\" placeholder=\"place\" name=\"name\" maxlength=\"15\" disabled=\"disabled\" cols=\"5\" rows=\"2\">abc</textarea></div>",
element?.innerHTML,
"Should render correct input form control"
)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt
index 9b88b84e..de3bd486 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextInputSpec.kt
@@ -45,7 +45,7 @@ class TextInputSpec : DomSpec {
root.add(ti)
val element = document.getElementById("test")
assertEquals(
- "<input class=\"form-control\" id=\"idti\" placeholder=\"place\" name=\"name\" maxlength=\"15\" disabled=\"\" type=\"password\" value=\"abc\">",
+ "<input class=\"form-control\" id=\"idti\" placeholder=\"place\" name=\"name\" maxlength=\"15\" disabled=\"disabled\" type=\"password\" value=\"abc\">",
element?.innerHTML,
"Should render correct input control"
)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt
index a78be2d0..baa2b20f 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/text/TextSpec.kt
@@ -44,13 +44,13 @@ class TextSpec : DomSpec {
val element = document.getElementById("test")
val id = ti.input.id
assertEquals(
- "<div class=\"form-group\"><label class=\"control-label\" for=\"$id\">Label</label><input class=\"form-control\" id=\"$id\" placeholder=\"place\" name=\"name\" maxlength=\"15\" disabled=\"\" type=\"text\" value=\"abc\"></div>",
+ "<div class=\"form-group\"><label class=\"control-label\" for=\"$id\">Label</label><input class=\"form-control\" id=\"$id\" placeholder=\"place\" name=\"name\" maxlength=\"15\" disabled=\"disabled\" type=\"text\" value=\"abc\"></div>",
element?.innerHTML,
"Should render correct input form control"
)
ti.validatorError = "Validation Error"
assertEquals(
- "<div class=\"form-group has-error\"><label class=\"control-label\" for=\"$id\">Label</label><input class=\"form-control\" id=\"$id\" placeholder=\"place\" name=\"name\" maxlength=\"15\" disabled=\"\" type=\"text\" value=\"abc\"><span class=\"help-block small\">Validation Error</span></div>",
+ "<div class=\"form-group has-error\"><label class=\"control-label\" for=\"$id\">Label</label><input class=\"form-control\" id=\"$id\" placeholder=\"place\" name=\"name\" maxlength=\"15\" disabled=\"disabled\" type=\"text\" value=\"abc\"><span class=\"help-block small\">Validation Error</span></div>",
element?.innerHTML,
"Should render correct input form control with validation error"
)
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt
index aa0c2d8f..fa158b68 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/form/time/DateTimeSpec.kt
@@ -47,13 +47,13 @@ class DateTimeSpec : DomSpec {
val id = ti.input.id
val datastr = data.toStringF(ti.format)
assertEquals(
- "<div class=\"form-group\"><label class=\"control-label\" for=\"$id\">Label</label><input class=\"form-control\" id=\"$id\" type=\"text\" placeholder=\"place\" name=\"name\" disabled=\"\" value=\"$datastr\"></div>",
+ "<div class=\"form-group\"><label class=\"control-label\" for=\"$id\">Label</label><input class=\"form-control\" id=\"$id\" type=\"text\" placeholder=\"place\" name=\"name\" disabled=\"disabled\" value=\"$datastr\"></div>",
element?.innerHTML,
"Should render correct date time input form control"
)
ti.validatorError = "Validation Error"
assertEquals(
- "<div class=\"form-group has-error\"><label class=\"control-label\" for=\"$id\">Label</label><input class=\"form-control\" id=\"$id\" type=\"text\" placeholder=\"place\" name=\"name\" disabled=\"\" value=\"$datastr\"><span class=\"help-block small\">Validation Error</span></div>",
+ "<div class=\"form-group has-error\"><label class=\"control-label\" for=\"$id\">Label</label><input class=\"form-control\" id=\"$id\" type=\"text\" placeholder=\"place\" name=\"name\" disabled=\"disabled\" value=\"$datastr\"><span class=\"help-block small\">Validation Error</span></div>",
element?.innerHTML,
"Should render correct date time input form control with validation error"
)