Signed-off-by: Florian Eckert <fe@dev.tdt.de>
dom.append(createEl, [
E('div', {}, nameEl),
dom.append(createEl, [
E('div', {}, nameEl),
'class': 'cbi-button cbi-button-add',
'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'))
'title': btn_title || _('Add'),
'click': ui.createHandlerFn(this, function(ev) {
if (nameEl.classList.contains('cbi-input-invalid'))
return this.handleAdd(ev, nameEl.value);
}),
'disabled': this.map.readonly || null
return this.handleAdd(ev, nameEl.value);
}),
'disabled': this.map.readonly || null
+ }, [ btn_title || _('Add') ])
]);
ui.addValidator(nameEl, 'uciname', true, 'blur', 'keyup');
]);
ui.addValidator(nameEl, 'uciname', true, 'blur', 'keyup');