luci-base: use button tag instead of input tag on named section add
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
b88157e69a
commit
97e673b72c
1 changed files with 2 additions and 4 deletions
|
@ -2203,10 +2203,8 @@ var CBITypedSection = CBIAbstractSection.extend(/** @lends LuCI.form.TypedSectio
|
||||||
|
|
||||||
dom.append(createEl, [
|
dom.append(createEl, [
|
||||||
E('div', {}, nameEl),
|
E('div', {}, nameEl),
|
||||||
E('input', {
|
E('button', {
|
||||||
'class': 'cbi-button cbi-button-add',
|
'class': 'cbi-button cbi-button-add',
|
||||||
'type': 'submit',
|
|
||||||
'value': btn_title || _('Add'),
|
|
||||||
'title': btn_title || _('Add'),
|
'title': btn_title || _('Add'),
|
||||||
'click': ui.createHandlerFn(this, function(ev) {
|
'click': ui.createHandlerFn(this, function(ev) {
|
||||||
if (nameEl.classList.contains('cbi-input-invalid'))
|
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);
|
return this.handleAdd(ev, nameEl.value);
|
||||||
}),
|
}),
|
||||||
'disabled': this.map.readonly || null
|
'disabled': this.map.readonly || null
|
||||||
})
|
}, [ btn_title || _('Add') ])
|
||||||
]);
|
]);
|
||||||
|
|
||||||
ui.addValidator(nameEl, 'uciname', true, 'blur', 'keyup');
|
ui.addValidator(nameEl, 'uciname', true, 'blur', 'keyup');
|
||||||
|
|
Loading…
Reference in a new issue