Skip to content

Commit

Permalink
Remove the js alert message when jqueryValidation fails on frontend p…
Browse files Browse the repository at this point in the history
…ages

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
  • Loading branch information
eileenmcnaughton committed Jul 25, 2019
1 parent 39a2630 commit cd73f9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/CRM/common/l10n.js.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@
// use civicrm notifications when there are errors
params.invalidHandler = function(form, validator) {
// If there is no container for display then red text will still show next to the invalid fields
// but there will be no overall message. Currently the container is only available on backoffice pages.
if ($('#crm-notification-container').length) {
$.each(validator.errorList, function(k, error) {
$(error.element).crmError(error.message);
});
} else {
alert({/literal}"{ts escape='js'}Please review and correct the highlighted fields before continuing.{/ts}"{literal});
}
};
Expand Down

0 comments on commit cd73f9c

Please sign in to comment.