Skip to content

Commit cd73f9c

Browse files
Remove the js alert message when jqueryValidation fails on frontend pages
It's really really ugly & as discussed without it a) extensions can still opt to display the errors themselves and b) the inline errors still appear. Note this will have no real affect on existing code - the ugliness of this has been a blocker to getting into front end validation & at this stage only the omnipay extension is trying to work in this space. eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor#128 I think ideally with Omnipay it DOES makes sense to display messages near the checkout button - which might be a future step
1 parent 39a2630 commit cd73f9c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

templates/CRM/common/l10n.js.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@
114114
115115
// use civicrm notifications when there are errors
116116
params.invalidHandler = function(form, validator) {
117+
// If there is no container for display then red text will still show next to the invalid fields
118+
// but there will be no overall message. Currently the container is only available on backoffice pages.
117119
if ($('#crm-notification-container').length) {
118120
$.each(validator.errorList, function(k, error) {
119121
$(error.element).crmError(error.message);
120122
});
121-
} else {
122-
alert({/literal}"{ts escape='js'}Please review and correct the highlighted fields before continuing.{/ts}"{literal});
123123
}
124124
};
125125

0 commit comments

Comments
 (0)