projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dcf53bd
)
libs/cbi: always reset class name in validation handler
author
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 26 Apr 2010 00:00:33 +0000
(
00:00
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 26 Apr 2010 00:00:33 +0000
(
00:00
+0000)
libs/cbi/htdocs/luci-static/resources/cbi.js
patch
|
blob
|
history
diff --git
a/libs/cbi/htdocs/luci-static/resources/cbi.js
b/libs/cbi/htdocs/luci-static/resources/cbi.js
index 200016d6e67fa492a198f5aa91855cd31e9ceaa0..3840456ca4bcace6d5fdff1b6e6c42f958ead12d 100644
(file)
--- a/
libs/cbi/htdocs/luci-static/resources/cbi.js
+++ b/
libs/cbi/htdocs/luci-static/resources/cbi.js
@@
-461,6
+461,8
@@
function cbi_validate_disable_form(form, onoff)
function cbi_validate_field(type, optional, field)
{
function cbi_validate_field(type, optional, field)
{
+ field.className = field.className.replace(/ cbi-input-invalid/g, '');
+
var vldcb = cbi_validators[type];
if( vldcb )
{
var vldcb = cbi_validators[type];
if( vldcb )
{
@@
-469,7
+471,6
@@
function cbi_validate_field(type, optional, field)
if( ((value.length == 0) && optional) || vldcb(value) )
{
// OK
if( ((value.length == 0) && optional) || vldcb(value) )
{
// OK
- field.className = field.className.replace(/ cbi-input-invalid/g, '');
cbi_validate_disable_form(field.form, false);
}
else
cbi_validate_disable_form(field.form, false);
}
else
@@
-482,7
+483,6
@@
function cbi_validate_field(type, optional, field)
else
{
// OK
else
{
// OK
- field.className = field.className.replace(/ cbi-input-invalid/g, '');
cbi_validate_disable_form(field.form, false);
}
}
cbi_validate_disable_form(field.form, false);
}
}