From: Paul Donald Date: Thu, 12 Jun 2025 12:51:58 +0000 (+0200) Subject: Revert "luci-base: override the load() function to return boolean for FlagValue" X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=26086b53cea0680bb202feac5b7f7624fb4c69a7;p=project%2Fluci.git Revert "luci-base: override the load() function to return boolean for FlagValue" This reverts commit 4cca2c6e4b8e403632e8e47bd3b22afa2605eac1. Signed-off-by: Paul Donald --- diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index db3da638a3..13ca76450e 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -4000,19 +4000,6 @@ var CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */ { * @default 'ℹ️'; */ - /** - * Coerce the various forms of a 'boolean' string into a true/false value. - * - * @override - */ - load() { - // - let load = this.super('load', arguments); - if (typeof(load) == 'string') - load = ['1', 'on', 'true', 'yes', 'enabled'].includes(load.toLowerCase()); - return load; - }, - /** @private */ renderWidget: function(section_id, option_index, cfgvalue) { var tooltip = null;