From 4a9f784a2a075ecb96a7e45d6a60160038f968a9 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 5 Feb 2019 13:21:33 +0100 Subject: 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 --- modules/luci-base/htdocs/luci-static/resources/cbi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') 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'); -- cgit v1.2.3