From 9a183373507ec5f5b6f9f2bd6f405477f21d5825 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 16 May 2022 11:47:45 +0200 Subject: [PATCH] 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 (cherry picked from commit 818776451d96e8f1a187eafca4a5ebbf0770fbde) --- modules/luci-base/htdocs/luci-static/resources/form.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index 4dc1a7c5b7..6f6a423d5f 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -2584,8 +2584,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); -- 2.30.2