diff options
author | Florian Eckert <fe@dev.tdt.de> | 2021-06-21 13:48:40 +0200 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2021-07-01 13:09:37 +0200 |
commit | 97e673b72cc96f5f866df7e990a51fa65bff5b5f (patch) | |
tree | 2b27bf9078cd541ef408d944015b5e1658a8bdf6 | |
parent | b88157e69a060ade618e48b30947729310935d61 (diff) |
luci-base: use button tag instead of input tag on named section add
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/form.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index 52506d30e8..9477b3f3c6 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -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'); |