Skip to content
Snippets Groups Projects
Commit 6860a518 authored by Joshua Walker's avatar Joshua Walker Committed by GitHub
Browse files

Merge pull request #154 from aghstrategies/ignore-back-button

Don't submit if the back button is clicked
parents 0951fc22 be8e7c44
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,11 @@
// If CiviDiscount button or field is submitted, flag the form.
$form.data('cividiscount-dont-handle', '0');
$form.find('input[type="submit"][formnovalidate="1"]').click( function() {
// This is an ugly hack. Really, the code should positively identify the
// "real" submit button(s) and only respond to them. Otherwise, we're
// chasing down a potentially endless number of exceptions. The problem
// is that it's unclear if CiviCRM consistently names its submit buttons.
$form.find('input[type="submit"][formnovalidate="1"], input[type="submit"].cancel').click( function() {
$form.data('cividiscount-dont-handle', 1);
});
$form.find('input#discountcode').keypress( function(e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment