From: Jo-Philipp Wich Date: Wed, 18 Sep 2019 13:08:19 +0000 (+0200) Subject: luci-base: form.js: fix default click action of button options X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=53ac685092d62c84cc2add8ae726487b339d9576;p=oweals%2Fluci.git luci-base: form.js: fix default click action of button options Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index 7dc63ceb5..0fa0008c7 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -1822,7 +1822,7 @@ var CBIButtonValue = CBIValue.extend({ E('button', { 'class': 'cbi-button cbi-button-%s'.format(this.inputstyle || 'button'), 'click': L.ui.createHandlerFn(this, this.onclick || function(ev) { - ev.target.previousElementSibling.value = ev.target.value; + ev.currentTarget.parentNode.nextElementSibling.value = value; return this.map.save(); }) }, [ btn_title ])