luci-base: fix button handling for named sections
authorFlorian Eckert <[email protected]>
Mon, 12 Dec 2022 13:58:38 +0000 (14:58 +0100)
committerFlorian Eckert <[email protected]>
Tue, 13 Dec 2022 12:38:40 +0000 (13:38 +0100)
commitd30ab7423830e66a07c0bb2190e34d7ea1af6421
tree0e782bbb57562ed059d85643c9d4f77ce3e7c990
parent0ecaf74ae3ce0b21d88f792c5fe9af6775b2a1e1
luci-base: fix button handling for named sections

If more than one named section is added to the page, it is currently the
case, that the first button is always switched on or off during input
validation of the uci section name. This is because the usage of the
'document.querySelector' function is to imprecise. Changing the search
start to the element to be created, fixes this.

Signed-off-by: Florian Eckert <[email protected]>
(cherry picked from commit 440a2e79a762b4152ccb7e41c90a2826d9fb3538)
modules/luci-base/htdocs/luci-static/resources/form.js