'class': 'cbi-button cbi-button-add',
'title': btn_title || _('Add'),
'click': L.ui.createHandlerFn(this, 'handleAdd')
- }, btn_title || _('Add')));
+ }, [ btn_title || _('Add') ]));
}
else {
var nameEl = E('input', {
'name': 'cbi.rts.%s.%s'.format(config_name, cfgsections[i]),
'data-section-id': cfgsections[i],
'click': L.ui.createHandlerFn(this, 'handleRemove', cfgsections[i])
- }, _('Delete'))));
+ }, [ _('Delete') ])));
}
if (!this.anonymous)
}, this, section_id);
L.dom.append(tdEl.lastElementChild,
- E('input', {
- 'type': 'button',
- 'value': _('Edit'),
+ E('button', {
'title': _('Edit'),
'class': 'cbi-button cbi-button-edit',
'click': evFn
- })
+ }, [ _('Edit') ])
);
}
if (more_label) {
L.dom.append(tdEl.lastElementChild,
- E('input', {
- 'type': 'button',
- 'value': more_label,
+ E('button', {
'title': more_label,
'class': 'cbi-button cbi-button-edit',
'click': L.ui.createHandlerFn(this, 'renderMoreOptionsModal', section_id)
- })
+ }, [ more_label ])
);
}
E('button', {
'class': 'btn',
'click': L.ui.createHandlerFn(this, 'handleModalCancel', m)
- }, _('Dismiss')), ' ',
+ }, [ _('Dismiss') ]), ' ',
E('button', {
'class': 'cbi-button cbi-button-positive important',
'click': L.ui.createHandlerFn(this, 'handleModalSave', m)
- }, _('Save'))
+ }, [ _('Save') ])
])
], 'cbi-modal');
}, this)).catch(L.error);
E('button', {
'class': 'cbi-button',
'click': L.ui.createHandlerFn(this, 'handleRemove')
- }, _('Delete'))));
+ }, [ _('Delete') ])));
}
sectionEl.appendChild(E('div', {
E('button', {
'class': 'cbi-button cbi-button-add',
'click': L.ui.createHandlerFn(this, 'handleAdd')
- }, _('Add')));
+ }, [ _('Add') ]));
}
L.dom.bindClassInstance(sectionEl, this);
this.handleSaveApply ? E('button', {
'class': 'cbi-button cbi-button-apply',
'click': L.ui.createHandlerFn(this, 'handleSaveApply')
- }, _('Save & Apply')) : '', ' ',
+ }, [ _('Save & Apply') ]) : '', ' ',
this.handleSave ? E('button', {
'class': 'cbi-button cbi-button-save',
'click': L.ui.createHandlerFn(this, 'handleSave')
- }, _('Save')) : '', ' ',
+ }, [ _('Save') ]) : '', ' ',
this.handleReset ? E('button', {
'class': 'cbi-button cbi-button-reset',
'click': L.ui.createHandlerFn(this, 'handleReset')
- }, _('Reset')) : ''
+ }, [ _('Reset') ]) : ''
]));
}
else if (this.value != null)
label = [ this.iconForType('file'), ' %s (%s)'.format(this.truncatePath(this.value), _('File not accessible')) ];
else
- label = _('Select file…');
+ label = [ _('Select file…') ];
return this.bind(E('div', { 'id': this.options.id }, [
E('button', {
ev.preventDefault();
ev.target.previousElementSibling.click();
}
- }, _('Browse…')),
+ }, [ _('Browse…') ]),
E('div', {}, E('input', { 'type': 'text', 'placeholder': _('Filename') })),
E('button', {
'class': 'btn cbi-button-save',
'click': L.ui.createHandlerFn(this, 'handleUpload', path, list),
'disabled': true
- }, _('Upload file'))
+ }, [ _('Upload file') ])
])
]);
},
selected ? E('button', {
'class': 'btn',
'click': L.ui.createHandlerFn(this, 'handleReset')
- }, _('Deselect')) : '',
+ }, [ _('Deselect') ]) : '',
this.options.enable_remove ? E('button', {
'class': 'btn cbi-button-negative',
'click': L.ui.createHandlerFn(this, 'handleDelete', entrypath, list[i])
- }, _('Delete')) : ''
+ }, [ _('Delete') ]) : ''
])
]));
}
}
}, [
E('div', { 'style': 'flex:10' }),
- E('div', { 'style': 'flex:1; display:flex' }, [
+ E('div', { 'style': 'flex:1 1 auto; display:flex' }, [
E('button', {
'class': 'btn',
'style': 'margin-left:auto; margin-top:auto',
L.dom.parent(ev.target, '.alert-message').classList.add('fade-out');
},
- }, _('Dismiss'))
+ }, [ _('Dismiss') ])
])
]);
E('var', {}, E('del', ' ')), ' ', _('Option removed') ])]),
E('br'), list,
E('div', { 'class': 'right' }, [
- E('input', {
- 'type': 'button',
+ E('button', {
'class': 'btn',
- 'click': L.ui.hideModal,
- 'value': _('Dismiss')
- }), ' ',
- E('input', {
- 'type': 'button',
+ 'click': L.ui.hideModal
+ }, [ _('Dismiss') ]), ' ',
+ E('button', {
'class': 'cbi-button cbi-button-positive important',
- 'click': L.bind(this.apply, this, true),
- 'value': _('Save & Apply')
- }), ' ',
- E('input', {
- 'type': 'button',
+ 'click': L.bind(this.apply, this, true)
+ }, [ _('Save & Apply') ]), ' ',
+ E('button', {
'class': 'cbi-button cbi-button-reset',
- 'click': L.bind(this.revert, this),
- 'value': _('Revert')
- })])])
+ 'click': L.bind(this.revert, this)
+ }, [ _('Revert') ])])])
]);
for (var config in this.changes) {
E('h4', _('Configuration has been rolled back!')),
E('p', _('The device could not be reached within %d seconds after applying the pending changes, which caused the configuration to be rolled back for safety reasons. If you believe that the configuration changes are correct nonetheless, perform an unchecked configuration apply. Alternatively, you can dismiss this warning and edit changes before attempting to apply again, or revert all pending changes to keep the currently working configuration state.').format(L.env.apply_rollback)),
E('div', { 'class': 'right' }, [
- E('input', {
- 'type': 'button',
+ E('button', {
'class': 'btn',
- 'click': L.bind(L.ui.changes.displayStatus, L.ui.changes, false),
- 'value': _('Dismiss')
- }), ' ',
- E('input', {
- 'type': 'button',
+ 'click': L.bind(L.ui.changes.displayStatus, L.ui.changes, false)
+ }, [ _('Dismiss') ]), ' ',
+ E('button', {
'class': 'btn cbi-button-action important',
- 'click': L.bind(L.ui.changes.revert, L.ui.changes),
- 'value': _('Revert changes')
- }), ' ',
- E('input', {
- 'type': 'button',
+ 'click': L.bind(L.ui.changes.revert, L.ui.changes)
+ }, [ _('Revert changes') ]), ' ',
+ E('button', {
'class': 'btn cbi-button-negative important',
- 'click': L.bind(L.ui.changes.apply, L.ui.changes, false),
- 'value': _('Apply unchecked')
- })
+ 'click': L.bind(L.ui.changes.apply, L.ui.changes, false)
+ }, [ _('Apply unchecked') ])
])
]);