Skip to content

Commit

Permalink
Merge pull request #14854 from eileenmcnaughton/validate
Browse files Browse the repository at this point in the history
Do not launch raw js alert  jqueryValidation fails
  • Loading branch information
colemanw authored Jul 28, 2019
2 parents 64b5ec1 + cd73f9c commit 84fcc93
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 84fcc93

Please sign in to comment.