luci-base: form.js: handle SectionValue objects in GridSection modals
authorJo-Philipp Wich <[email protected]>
Mon, 16 May 2022 09:55:11 +0000 (11:55 +0200)
committerJo-Philipp Wich <[email protected]>
Mon, 1 Aug 2022 09:57:42 +0000 (11:57 +0200)
commit156009aae34d91db369cf3e0130e3c8a3dc53776
tree78e6f139b1df5a1935235e41bb64f9d4c741c267
parent9780bc01525128ee533f3ddb0d14ffe842477dde
luci-base: form.js: handle SectionValue objects in GridSection modals

The existing logic for cloning section options into the modal form section
container did not properly handle SectionValue objects. Introduce a new
`cloneOptions()` helper to recursively traverse and properly clowning
such nested sections.

Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit f24606b1ffd59cc82c7251243a18f4cfdc4f78d5)
modules/luci-base/htdocs/luci-static/resources/form.js