From: Jo-Philipp Wich Date: Mon, 16 May 2022 09:47:45 +0000 (+0200) Subject: luci-base: form.js: allow overriding section placeholder of TableSections X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=818776451d96e8f1a187eafca4a5ebbf0770fbde;p=openwrt-luci.git luci-base: form.js: allow overriding section placeholder of TableSections The existing implementation was hardcoding the empty TableSection placeholder instead of invoking `renderSectionPlaceholder()` which might be overridden by various forms. 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 62fcc903e8..eb7a2572d4 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -2583,8 +2583,7 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p if (nodes.length == 0) tableEl.appendChild(E('tr', { 'class': 'tr cbi-section-table-row placeholder' }, - E('td', { 'class': 'td' }, - E('em', {}, _('This section contains no values yet'))))); + E('td', { 'class': 'td' }, this.renderSectionPlaceholder()))); sectionEl.appendChild(tableEl);