summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-09-09 11:25:08 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-10 15:28:16 +0200
commiteac8316e0dffbcee6ca2d20a9b4e2c8383d1d137 (patch)
treecf90e1ffec69d50724939c59633595bd98e5931e /modules/luci-base/htdocs/luci-static/resources
parente14b884771b223452ec066606f7c7cb5f5dd31b1 (diff)
luci-base: luci.js: use createHandlerFn() for page actions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/luci.js24
1 files changed, 9 insertions, 15 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/luci.js b/modules/luci-base/htdocs/luci-static/resources/luci.js
index b4c727a399..80648633df 100644
--- a/modules/luci-base/htdocs/luci-static/resources/luci.js
+++ b/modules/luci-base/htdocs/luci-static/resources/luci.js
@@ -1306,24 +1306,18 @@
if (mc.querySelector('.cbi-map')) {
footer.appendChild(E('div', { 'class': 'cbi-page-actions' }, [
- E('input', {
+ E('button', {
'class': 'cbi-button cbi-button-apply',
- 'type': 'button',
- 'value': _('Save & Apply'),
- 'click': L.bind(this.handleSaveApply, this)
- }), ' ',
- E('input', {
+ 'click': L.ui.createHandlerFn(this, 'handleSaveApply')
+ }, _('Save & Apply')), ' ',
+ E('button', {
'class': 'cbi-button cbi-button-save',
- 'type': 'submit',
- 'value': _('Save'),
- 'click': L.bind(this.handleSave, this)
- }), ' ',
- E('input', {
+ 'click': L.ui.createHandlerFn(this, 'handleSave')
+ }, _('Save')), ' ',
+ E('button', {
'class': 'cbi-button cbi-button-reset',
- 'type': 'button',
- 'value': _('Reset'),
- 'click': L.bind(this.handleReset, this)
- })
+ 'click': L.ui.createHandlerFn(this, 'handleReset')
+ }, _('Reset'))
]));
}