From e7ca163d7c227c573620d08b7c86a9e739c070ed Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 7 Oct 2019 19:46:57 +0200 Subject: 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 --- modules/luci-base/htdocs/luci-static/resources/form.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/luci-base/htdocs/luci-static/resources') 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', -- cgit v1.2.3