-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix registration code form button from disabling on invalid entry
Problem was code disabling the button right away rather than waiting and disabling it after the form is validated to prevent multiple submissions For the submitHandler in the Jquery Validation Plugin to get called, it requires a button inside the form with the type='submit'. This was missing. In the implementation.py file, the function get_ajax_check_ffq_code validates the form entry, and it needs to return a JSON value of true or false since it is returning the value to a JavaScript function that doesn't understand python True or False. This function was changed to return a JSON dump of a True or False value. Put the submitHandler of the validator outside the 'rules' object in order for it to be called. Test using a return value of True in the function get_ajax_check_ffq_code in the implementation.py file to call the submit handler function. Add comment in submit handler function to add code to call a function in the submit handler.
- Loading branch information
Showing
2 changed files
with
20 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters