Skip to content

Commit 224b154

Browse files
Allow extensions to suppress the popups for jqueryValidation
This means that scripts can suppress the nasty js alert message. This isn't my ultimate preference - per long discussion here eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor#128 I think being able to output a summary of messages near, or in place of, the paypal checkout button makes more sense - open to better options @colemanw
1 parent 6dd1782 commit 224b154

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

templates/CRM/common/l10n.js.tpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@
118118
$.each(validator.errorList, function(k, error) {
119119
$(error.element).crmError(error.message);
120120
});
121-
} else {
121+
}
122+
else if (CRM.vars.form.suppressAlerts) {
123+
// Leaving it up to the script to display or otherwise.
124+
}
125+
else {
122126
alert({/literal}"{ts escape='js'}Please review and correct the highlighted fields before continuing.{/ts}"{literal});
123127
}
124128
};

0 commit comments

Comments
 (0)