@@ -140,6 +140,16 @@ javaxt.dhtml.Form = function (parent, config) {
140
140
backgroundColor : "white" ,
141
141
padding : "0 5px 0 5px" ,
142
142
color : "rgb(0, 70, 138)"
143
+ } ,
144
+
145
+
146
+ //Style for the error popup
147
+ error : {
148
+ input : "form-input-error" ,
149
+ callout : {
150
+ panel : "error-callout-panel" ,
151
+ arrow : "error-callout-arrow"
152
+ }
143
153
}
144
154
}
145
155
} ;
@@ -563,6 +573,7 @@ javaxt.dhtml.Form = function (parent, config) {
563
573
var formInput = addInput ( name , label , input , getValue , setValue , icon ) ;
564
574
565
575
input . oninput = function ( ) {
576
+ me . hideError ( formInput ) ;
566
577
me . onChange ( formInput , input . value ) ;
567
578
} ;
568
579
input . onpaste = input . oninput ;
@@ -1324,7 +1335,7 @@ javaxt.dhtml.Form = function (parent, config) {
1324
1335
if ( inputs . length == 0 ) inputs = td . getElementsByTagName ( "textarea" ) ;
1325
1336
if ( inputs . length > 0 ) {
1326
1337
inputs [ 0 ] . blur ( ) ;
1327
- var cls = "form-input- error" ;
1338
+ var cls = config . style . error . input ;
1328
1339
if ( inputs [ 0 ] . className ) {
1329
1340
if ( inputs [ 0 ] . className . indexOf ( cls ) == - 1 ) inputs [ 0 ] . className += " " + cls ;
1330
1341
}
@@ -1342,10 +1353,7 @@ javaxt.dhtml.Form = function (parent, config) {
1342
1353
var callout = javaxt . dhtml . Form . Error ;
1343
1354
if ( ! callout ) {
1344
1355
callout = new javaxt . dhtml . Callout ( document . body , {
1345
- style :{
1346
- panel : "error-callout-panel" ,
1347
- arrow : "error-callout-arrow"
1348
- }
1356
+ style : config . style . error . callout
1349
1357
} ) ;
1350
1358
javaxt . dhtml . Form . Error = callout ;
1351
1359
}
0 commit comments