summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-system/htdocs/luci-static
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-10-07 19:55:31 +0200
committerJo-Philipp Wich <jo@mein.io>2019-10-07 19:55:31 +0200
commit5ccbda54e810f51d7ab343815c6b80928eecfcbd (patch)
tree1129413c50e29d48c403ba1fd76eeed1460ddf25 /modules/luci-mod-system/htdocs/luci-static
parente7ca163d7c227c573620d08b7c86a9e739c070ed (diff)
luci-mod-system: flash.js: fix passing sysupgrade opts
Instead of binding the checked state to the button handler function, bind the underlying checkboxes instead to observe the actual user choice instead of the initial value. This fixes forcing sysupgrade or deselecting keep settings. Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-system/htdocs/luci-static')
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js
index 915c3c7fa..61e021c28 100644
--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js
@@ -342,7 +342,7 @@ return L.view.extend({
var cntbtn = E('button', {
'class': 'btn cbi-button-action important',
- 'click': L.ui.createHandlerFn(this, 'handleSysupgradeConfirm', btn, keep.checked, force.checked),
+ 'click': L.ui.createHandlerFn(this, 'handleSysupgradeConfirm', btn, keep, force),
'disabled': (!is_valid || is_too_big) ? true : null
}, [ _('Continue') ]);
@@ -376,10 +376,10 @@ return L.view.extend({
var opts = [];
- if (!keep)
+ if (!keep.checked)
opts.push('-n');
- if (force)
+ if (force.checked)
opts.push('--force');
opts.push('/tmp/firmware.bin');