luci-base: form.js: fix GridSection modals in JSONMap instances
authorJo-Philipp Wich <[email protected]>
Sat, 4 Feb 2023 20:03:51 +0000 (21:03 +0100)
committerJo-Philipp Wich <[email protected]>
Sat, 4 Feb 2023 20:08:31 +0000 (21:08 +0100)
commit66fc1ad1f5c2464979e534b6c86055a1dc436881
treed3e790bb2ccfae2a25bc378ae888a61bcd3a273b
parent09d68fb2e3061710be1b3b56467eb43c9c0dc32d
luci-base: form.js: fix GridSection modals in JSONMap instances

Since grid section edit modals construct a new Map instance internally,
we must take care of using the correct map constructor type for the
internal copy in order to end up with the correct data provider.

Ensure that the extended option modal of GridSection instances uses a
JSONMap when the grid section's owner map is a JSONMap to avoid stray
uci related errors.

Ref: https://forum.openwrt.org/t/luci-save-apply/149658/5
Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit 6fe34990265a02dac20f7b352e4039a90fed45ca)
modules/luci-base/htdocs/luci-static/resources/form.js