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 <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2022-05-16 11:47:45 +02:00
parent 733ee9a7b6
commit 818776451d

View file

@ -2583,8 +2583,7 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
if (nodes.length == 0) if (nodes.length == 0)
tableEl.appendChild(E('tr', { 'class': 'tr cbi-section-table-row placeholder' }, tableEl.appendChild(E('tr', { 'class': 'tr cbi-section-table-row placeholder' },
E('td', { 'class': 'td' }, E('td', { 'class': 'td' }, this.renderSectionPlaceholder())));
E('em', {}, _('This section contains no values yet')))));
sectionEl.appendChild(tableEl); sectionEl.appendChild(tableEl);