Skip to content

Commit 0ba2b1e

Browse files
authored
fix #88
1 parent d0fa10a commit 0ba2b1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/js/brutusin-json-forms.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ if (typeof brutusin === "undefined") {
177177
} else if (s.media) {
178178
input = document.createElement("input");
179179
input.type = "file";
180-
appendChild(input, option, s);
181180
// XXX TODO, encode the SOB properly.
182181
} else if (s.enum) {
183182
input = document.createElement("select");
@@ -345,8 +344,8 @@ if (typeof brutusin === "undefined") {
345344
if (s.required) {
346345
input = document.createElement("input");
347346
input.type = "checkbox";
348-
if (value === true) {
349-
input.checked = true;
347+
if (value === true || value !== false && s.default) {
348+
input.checked = true;
350349
}
351350
} else {
352351
input = document.createElement("select");
@@ -747,6 +746,7 @@ if (typeof brutusin === "undefined") {
747746
if (s.readOnly)
748747
addButton.disabled = true;
749748
addButton.setAttribute('type', 'button');
749+
addButton.className = "addItem";
750750
addButton.getValidationError = function () {
751751
if (s.minItems && s.minItems > table.rows.length) {
752752
return BrutusinForms.messages["minItems"].format(s.minItems);

0 commit comments

Comments
 (0)