luci-base: form.js: forward section ID in CBISectionValue methods
authorJo-Philipp Wich <jo@mein.io>
Mon, 4 May 2020 19:34:12 +0000 (21:34 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 17:40:49 +0000 (19:40 +0200)
This is useful for custom subclasses that want to perform conditional
rendering of contents, depending on the parent section ID.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f0a0d28fdd22b7904ea9a4efb53a7b791dc6dead)

modules/luci-base/htdocs/luci-static/resources/form.js

index 2cd06d1901bb86054cedca3518e26f8f30a4fe0e..01c9ba8cdf7f93e6c0d1d89f32bc3567ac981ac5 100644 (file)
@@ -4074,22 +4074,22 @@ var CBISectionValue = CBIValue.extend(/** @lends LuCI.form.SectionValue.prototyp
 
        /** @override */
        load: function(section_id) {
-               return this.subsection.load();
+               return this.subsection.load(section_id);
        },
 
        /** @override */
        parse: function(section_id) {
-               return this.subsection.parse();
+               return this.subsection.parse(section_id);
        },
 
        /** @private */
        renderWidget: function(section_id, option_index, cfgvalue) {
-               return this.subsection.render();
+               return this.subsection.render(section_id);
        },
 
        /** @private */
        checkDepends: function(section_id) {
-               this.subsection.checkDepends();
+               this.subsection.checkDepends(section_id);
                return CBIValue.prototype.checkDepends.apply(this, [ section_id ]);
        },