diff options
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/form.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index 3ddabea22..b8d97c751 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -707,6 +707,13 @@ var CBITypedSection = CBIAbstractSection.extend({ return createEl; }, + renderSectionPlaceholder: function() { + return E([ + E('em', _('This section contains no values yet')), + E('br'), E('br') + ]); + }, + renderContents: function(cfgsections, nodes) { var section_id = null, config_name = this.uciconfig || this.map.config, @@ -749,10 +756,7 @@ var CBITypedSection = CBIAbstractSection.extend({ } if (nodes.length == 0) - L.dom.append(sectionEl, [ - E('em', _('This section contains no values yet')), - E('br'), E('br') - ]); + sectionEl.appendChild(this.renderSectionPlaceholder()); sectionEl.appendChild(this.renderSectionAdd()); |