Skip to content
Commit fcc9cd6a authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

luci-base: fix field section add button/input field names

Some CBI map models, mainly the Network -> VLAN page, expect a valid
previous section ID in their Section:create() callback.

Previous refactoring of the tblsection markup broke this behaviour as
the "section" loop variable was accidentally localized, causing it to
be undefined outside of the loop body which caused the section add
button and name input fields to get rendered with a wrong "name"
attribute.

Fix this by moving the "section" variable declaration out of the loop
and by readding references to it in the non-anonymous section add case.

Fixes FS#1657
Fixes 002c4d1d

 ("luci-base: add "Name" label to autogenerated title column")
Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
parent 251c5100
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment