luci-base: form.js: handle SectionValue objects in GridSection modals
authorJo-Philipp Wich <jo@mein.io>
Mon, 16 May 2022 09:55:11 +0000 (11:55 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 16 May 2022 11:40:49 +0000 (13:40 +0200)
commitf24606b1ffd59cc82c7251243a18f4cfdc4f78d5
tree97abd85d35ccdceea892ab7539112ae6e359ebe8
parent0c81e25faa9ff9cb6edec477d56145d70be87cf3
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 <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/form.js