diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-10-07 19:46:57 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-10-07 19:49:58 +0200 |
commit | e7ca163d7c227c573620d08b7c86a9e739c070ed (patch) | |
tree | a38d20a62bd2b712b82aa8817c2d1a20c0e1a3c8 /modules/luci-base/htdocs/luci-static | |
parent | 5cfad8d65bad19ab3188d3de190f22ae8cc07fd8 (diff) |
luci-base: form.js: fix anonymous section table titles
When no section title is defined, the table renderer is supposed to use
the uci section id as fallback when the table section is not declared
to be anonymous.
Fixes: #3147
Fixes: a90bf384b ("luci-base: form.js: harmonize title property handling")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/form.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index d5f9fe3c52..f4cce17fe1 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -1031,6 +1031,9 @@ var CBITableSection = CBITypedSection.extend({ for (var i = 0; i < nodes.length; i++) { var sectionname = this.titleFn('sectiontitle', cfgsections[i]); + if (sectionname == null) + sectionname = cfgsections[i]; + var trEl = E('div', { 'id': 'cbi-%s-%s'.format(config_name, cfgsections[i]), 'class': 'tr cbi-section-table-row', |