From ec8edb485840d9aee083379b344915de6eaabb35 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Thu, 12 Jun 2025 14:51:23 +0200 Subject: [PATCH] Revert "luci-base: override the load() function to return boolean for FlagValue" This reverts commit bedefb1803766f906ebb49d83740c10e9eb3db88. Signed-off-by: Paul Donald --- .../luci-base/htdocs/luci-static/resources/form.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index 3ad5a3cc2b..e1fc3ff3e9 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -4187,19 +4187,6 @@ const 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(section_id, option_index, cfgvalue) { let tooltip = null; -- 2.30.2