luci-base: use button tag instead of input tag on named section add
authorFlorian Eckert <fe@dev.tdt.de>
Mon, 21 Jun 2021 11:48:40 +0000 (13:48 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 1 Jul 2021 11:09:37 +0000 (13:09 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
modules/luci-base/htdocs/luci-static/resources/form.js

index 52506d30e8a92ba600332e48c7f93dd3da0210eb..9477b3f3c6f444df5fb3784925fabc17b66632ad 100644 (file)
@@ -2203,10 +2203,8 @@ var CBITypedSection = CBIAbstractSection.extend(/** @lends LuCI.form.TypedSectio
 
                        dom.append(createEl, [
                                E('div', {}, nameEl),
-                               E('input', {
+                               E('button', {
                                        'class': 'cbi-button cbi-button-add',
-                                       'type': 'submit',
-                                       'value': btn_title || _('Add'),
                                        'title': btn_title || _('Add'),
                                        'click': ui.createHandlerFn(this, function(ev) {
                                                if (nameEl.classList.contains('cbi-input-invalid'))
@@ -2215,7 +2213,7 @@ var CBITypedSection = CBIAbstractSection.extend(/** @lends LuCI.form.TypedSectio
                                                return this.handleAdd(ev, nameEl.value);
                                        }),
                                        'disabled': this.map.readonly || null
-                               })
+                               }, [ btn_title || _('Add') ])
                        ]);
 
                        ui.addValidator(nameEl, 'uciname', true, 'blur', 'keyup');