luci-base: form.js: fix default click action of button options

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-09-18 15:08:19 +02:00
parent 934fa275b2
commit 53ac685092

View file

@ -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 ])