summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-08-21 17:59:58 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-10 15:28:16 +0200
commitac56dc057d0a5dc0c9e014f6824bd63273eebe6e (patch)
treefa27b19e3351e5609adf524798e4836b63e0b363 /modules/luci-base/htdocs/luci-static/resources
parentc352fbf5e95b5f399810cd159b338783c093dcdf (diff)
luci-base: form.js: use createHandlerFn() for modal button 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/form.js18
1 files changed, 6 insertions, 12 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js
index 2d1d6960ba..31f6bd9616 100644
--- a/modules/luci-base/htdocs/luci-static/resources/form.js
+++ b/modules/luci-base/htdocs/luci-static/resources/form.js
@@ -1153,24 +1153,18 @@ var CBITableSection = CBITypedSection.extend({
}
}
- //ev.target.classList.add('spinning');
Promise.resolve(this.addModalOptions(s, section_id, ev)).then(L.bind(m.render, m)).then(L.bind(function(nodes) {
- //ev.target.classList.remove('spinning');
L.ui.showModal(title, [
nodes,
E('div', { 'class': 'right' }, [
- E('input', {
- 'type': 'button',
+ E('button', {
'class': 'btn',
- 'click': L.bind(this.handleModalCancel, this, m),
- 'value': _('Dismiss')
- }), ' ',
- E('input', {
- 'type': 'button',
+ 'click': L.ui.createHandlerFn(this, 'handleModalCancel', m)
+ }, _('Dismiss')), ' ',
+ E('button', {
'class': 'cbi-button cbi-button-positive important',
- 'click': L.bind(this.handleModalSave, this, m),
- 'value': _('Save')
- })
+ 'click': L.ui.createHandlerFn(this, 'handleModalSave', m)
+ }, _('Save'))
])
], 'cbi-modal');
}, this)).catch(L.error);