/** * * customLoginPageJavascriptView * * brandon.longworth 12/02/2022 * * stokareva - 06/05/2023 - USMSPBA-5896 - During login, when Default User Role is Appellant, Agency Representative, or Appellant Representative, and "Service Method" from Person BTO is (U.S. Mail or blank) display a message and do not allow user to log in. * 05/18/2026 - USMSPBA-8729 - MSPB 508 Compliance Scan via WAVE Tool - Login Page - added contrast to text * 07/28/2026 - USMSPBA-8957 - Security Issue: User Without Email Successfully Accesses e-Appeal Without 2FA. Login attempt client-side are stopped before the password is submitted for such users. * 08/17/2026 - USMSPBA-8959 - core team provided fix * 09/16/2026 - USMSPBA-9003 - side-effect of USMSPBA-8959: Application not working when the users Password has expired for Internal User and 2FA is turned on in Test Environment **/ // ---------------- USMSPBA-8959 ------------------ // This view is shared by login.request.do/login.submit.do (the session-hijack scenario forceLogout guards against) // AND by login.reset.password. enforce.update.password. (legitimate flows for an already-identified user). // Only force the logout redirect on the actual login-entry pages. // // Original core-team fix (USMSPBA-8959), before USMSPBA-9003 scoped it to login-entry pages only - // it redirected on every page this view is shared by, including enforce.update.password.request.do: // //------------------------------------------------ var requiredIcon = jQuery(''); jQuery(document).ready( function() { // USMSPBA-9003 - scoped to login-entry pages only; // This guard was redirecting to logout on enforce.update.password.request.do for expired-password Internal Users with 2FA enabled, instead of letting the password-update page render. // Original 8959 code used "bold" GET to system.logout.do (window.location.replace) that NPEs in entellitrak's RequestProcessor/actionIdURL. // Need to use hidden com.tylertech.entellitrak.mvc.taglib.html.TOKEN field with a valid $csrfToken value on logout (like it is implemented in EfileLoginPageHtmlView.html and AeaFormUtilitiesJavascriptLibrary.getCoreCsrfToken() // Building our own POST to system.logout.do using that token. // This has to run here (DOM-ready) rather than at script-parse time, otherwise the token isn't in the DOM yet when it is needed. if(!(window.location.pathname.endsWith('login.request.do') && window.location.search === '?action=normal')){ setupLoginLook(); } if(window.location.pathname.endsWith('login.request.do') && window.location.search === '?action=normal'){ jQuery('body').css('align-items', 'center') } else if(window.location.pathname.endsWith('login.request.do') && window.location.search === '?action=login'){ setupLoginSection(); } else if(window.location.pathname.endsWith('login.request.do') && window.location.search === '?action=usernameRecovery'){ setupUsernameRecoverySection(); } else if(window.location.pathname.endsWith('login.request.do')){ setupInitialChoices(); } else if(window.location.pathname.endsWith('login.submit.do')) { setupLoginSection(); } else if(window.location.pathname.endsWith('login.reset.password.do') || window.location.pathname.endsWith('login.reset.password.do') || window.location.pathname.endsWith('login.reset.password.request.do') || window.location.pathname.endsWith('login.reset.password.change.request.do') || window.location.pathname.endsWith('login.enter.reset.code.do')) { setupPasswordResetSection(); } else if(window.location.pathname.endsWith('enforce.update.password.request.do') || window.location.pathname.endsWith('enforce.update.password.submit.do')) { setupPasswordExpirationSection(); } // USMSPBA-7208 if( window.location.href.indexOf("https://portal-eappeal.mspb.gov/") === -1 ) { if( jQuery("#signonFailure").text().indexOf("maximum number of concurrent") > -1 || (jQuery("#maxUsersFailure").length > 0 && jQuery("#maxUsersFailure").text().indexOf("maximum number of concurrent") > -1) ) { jQuery("#login-errors").hide(); } } jQuery('#submit').removeAttr('aria-describedby'); //USMSPBA-8729 }); function setupInitialChoices() { jQuery('form[name="signonForm"]').remove(); jQuery('#policy').after(jQuery('
'
+ '
| '
+ ' '
+ '
| '
+ '
Returning Users
')); if(jQuery('p[class="error"]').length){ jQuery('#loginDiv').append(jQuery('#login-errors')); } jQuery('label[for="username"] span').after(requiredIcon.clone()); jQuery('label[for="password"] span').after(requiredIcon.clone()); jQuery('#loginDiv').append(jQuery('form[name="signonForm"]')); jQuery('#username').after(jQuery('Forgot username?')); jQuery('#password').after(jQuery('#ResetPassword')); jQuery('#ResetPassword').text('Forgot password?'); jQuery('#submit').val('Log in'); jQuery('#submit').parent().css('margin', '0px'); jQuery('#submit').parent().before(jQuery('