diff --git a/nodes/widgets/locales/en-US/ui_form.json b/nodes/widgets/locales/en-US/ui_form.json
index 16de15581..76baf3cc3 100644
--- a/nodes/widgets/locales/en-US/ui_form.json
+++ b/nodes/widgets/locales/en-US/ui_form.json
@@ -23,7 +23,6 @@
"switch": "Switch",
"date": "Date",
"time": "Time",
- "element": "element",
"buttons": "Buttons",
"submit": "submit",
"submitButtonText": "submit button text",
@@ -35,4 +34,4 @@
"resetOnSubmit": "Reset the form when submitted"
}
}
-}
\ No newline at end of file
+}
diff --git a/nodes/widgets/ui_form.html b/nodes/widgets/ui_form.html
index 98f58f0b4..19dfe43c1 100644
--- a/nodes/widgets/ui_form.html
+++ b/nodes/widgets/ui_form.html
@@ -88,114 +88,132 @@
// option.find(".node-input-option-key").width(newWidth);
}
- function generateOption (i, option) {
- const container = $('
').css('margin-left','28px')
+ .css('margin-right','28px')
+ .css('padding-right','0px')
+ .append($.parseHTML("
" + c_('label.label') + "
" +
+ "
" +
+ "
" + c_('label.type') + "
" +
+ "
" + c_('label.required') + "
" +
+ "
" + c_('label.rows') + "
")),
+ addItem: function(container, i, option) {
+ let row = $('
').appendTo(container)
- // key field
- let keyClass = 'node-input-option-key'
- if (!option.key) { keyClass = 'node-input-option-key input-error' }
- const keyField = $('
', { class: keyClass, type: 'text', style: 'margin-left:7px; width:20%;', placeholder: c_('label.egName2'), value: option.key }).appendTo(row)
- keyField.keyup(function () {
- if ($(this).val() && $(this).hasClass('input-error')) {
- $(this).removeClass('input-error')
- } else {
- if (!$(this).val()) {
- $(this).addClass('input-error')
- }
- }
- })
-
- // type field
- const typeField = $('
', { class: 'node-input-option-type', type: 'text', style: 'margin-left:7px; width:16%' }).appendTo(row)// .typedInput({default:'str',types:['str', 'num']});
-
- const arr = [
- { val: 'text', text: c_('label.text') },
- { val: 'multiline', text: c_('label.multiline') },
- { val: 'number', text: c_('label.number') },
- { val: 'email', text: c_('label.email') },
- { val: 'password', text: c_('label.password') },
- { val: 'checkbox', text: c_('label.checkbox') },
- { val: 'switch', text: c_('label.switch') },
- { val: 'date', text: c_('label.date') },
- { val: 'time', text: c_('label.time') }
- ]
-
- // var sel = $('
-