Skip to content
Snippets Groups Projects
Commit be8e7c44 authored by Andie Hunt's avatar Andie Hunt
Browse files

Don't submit if the back button is clicked

parent 0951fc22
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