diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-02-05 13:21:33 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-07-07 15:25:49 +0200 |
commit | 4a9f784a2a075ecb96a7e45d6a60160038f968a9 (patch) | |
tree | 09508ff0969660ae8efdf2873ad97c12080aaad3 /modules/luci-base/htdocs/luci-static/resources | |
parent | 6b8701c7bfac8962df12bbbf63c271892fb66530 (diff) |
luci-base: cbi.js: support field validation for formless inputs
JS CBI fields have no parent form element anymore.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/cbi.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js index 94686e13d..3131ccbaa 100644 --- a/modules/luci-base/htdocs/luci-static/resources/cbi.js +++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js @@ -260,7 +260,7 @@ var CBIValidatorPrototype = { validate: function() { /* element is detached */ - if (!findParent(this.field, 'form')) + if (!findParent(this.field, 'body')) return true; this.field.classList.remove('cbi-input-invalid'); |