luci-base: form.js: allow overriding section placeholder of TableSections
authorJo-Philipp Wich <jo@mein.io>
Mon, 16 May 2022 09:47:45 +0000 (11:47 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 16 May 2022 11:35:18 +0000 (13:35 +0200)
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 <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/form.js

index 62fcc903e80e67c1489d655159cb8b233f760c0d..eb7a2572d48216482a5bfc845144b4c63b944dc1 100644 (file)
@@ -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);