mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
Previously all our error messages had the class `error-message`. Where we are using the components from GOV.UK Frontend they have the class `govuk-error-message`. This makes the code which jumps focus to the first error work in both cases.
27 lines
764 B
JavaScript
27 lines
764 B
JavaScript
window.GOVUK.Frontend.initAll();
|
|
|
|
var consentData = window.GOVUK.getConsentCookie();
|
|
window.GOVUK.Modules.CookieBanner.clearOldCookies(consentData);
|
|
|
|
if (window.GOVUK.hasConsentFor('analytics', consentData)) {
|
|
window.GOVUK.initAnalytics();
|
|
}
|
|
|
|
$(() => $("time.timeago").timeago());
|
|
|
|
$(() => GOVUK.stickAtTopWhenScrolling.init());
|
|
$(() => GOVUK.stickAtBottomWhenScrolling.init());
|
|
|
|
var showHideContent = new GOVUK.ShowHideContent();
|
|
showHideContent.init();
|
|
|
|
$(() => GOVUK.modules.start());
|
|
|
|
$(() => $('.error-message, .govuk-error-message').eq(0).parent('label').next('input').trigger('focus'));
|
|
|
|
$(() => $('.banner-dangerous').eq(0).trigger('focus'));
|
|
|
|
$(() => $('.govuk-header__container').on('click', function() {
|
|
$(this).css('border-color', '#005ea5');
|
|
}));
|