Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not launch raw js alert jqueryValidation fails #14854

Merged
merged 1 commit into from
Jul 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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