File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 4747 // Toggle form state depending on if it has only valid inputs or not.
4848 $formsToDisable
4949 . addClass ( showErrorDialogs ? 'disabled-with-errors' : 'disabled-without-errors' )
50+ . on ( 'reset' , function ( ) {
51+ toggleFormState ( $ ( this ) , 'disabled' ) ;
52+ } )
5053 . find ( '*[data-validation]' )
5154 . valAttr ( 'event' , 'keyup change' )
5255 . on ( 'validation' , function ( evt , valid ) {
6265 }
6366 } )
6467 . on ( 'afterValidation' , afterValidationCallback )
65- . on ( 'reset' , function ( ) {
66- toggleFormState ( $ ( this ) , 'disabled' ) ;
67- } )
6868 . on ( 'blur' , function ( ) {
6969 $ ( this ) . valAttr ( 'have-been-blurred' , 1 ) ;
7070 } ) ;
Original file line number Diff line number Diff line change 3434
3535 < div class ="form-group ">
3636 < button type ="submit "> Login</ button >
37+ < button type ="reset "> Reset</ button >
3738 </ div >
3839
3940 </ form >
4041</ div >
4142
4243 < script src ="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js "> </ script >
43- < script src ="../form-validator/jquery.form-validator.js "> </ script >
44+ < script src ="../form-validator/jquery.form-validator.min. js "> </ script >
4445 < script >
4546
4647 $ . validate ( {
47- modules : 'toggleDisabled' ,
48+ modules : 'security, toggleDisabled' ,
4849 onSuccess : function ( ) {
4950 alert ( 'valid' ) ;
5051 return false ;
You can’t perform that action at this time.
0 commit comments