From: Jo-Philipp Wich Date: Mon, 7 Oct 2019 17:46:57 +0000 (+0200) Subject: luci-base: form.js: fix anonymous section table titles X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e7ca163d7c227c573620d08b7c86a9e739c070ed;p=oweals%2Fluci.git 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 --- diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index d5f9fe3c5..f4cce17fe 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',