"use strict"; var bc2Page = ""; (function() { var pageTitle = ""; var emailDescriptionText = ""; if (window.location.pathname.indexOf("PasswordResetFlow") > -1) { bc2Page = "PasswordReset"; pageTitle = "Reset Password - NHS England Customer Portal"; emailDescriptionText = "To reset your password, you'll need to verify your email address. A verification code will be sent to the email address associated with your account. Enter the code to proceed with resetting your password."; } else if (window.location.pathname.indexOf("CombinedSigninAndSignup") > -1) { bc2Page = "Signup"; pageTitle = "Sign up for NHS England Customer Portal"; emailDescriptionText = "We need to email a verification code to the same address we sent your invitation. Enter this email and click 'Send verification code' to create the code - which should then be entered and verified below.

Once verified, you can set your chosen password to complete the account creation process." } if (pageTitle) { document.title = pageTitle; var pageheader = document.querySelector(".page-header"); if (pageheader) { pageheader.innerHTML = "

" + pageTitle + "

"; } var breadcrumbActive = document.querySelector(".breadcrumb .active"); if (breadcrumbActive) { breadcrumbActive.innerHTML = pageTitle; } } if (emailDescriptionText) { var emailLabel = document.querySelector("#email_label"); if (emailLabel) { emailLabel.insertAdjacentHTML("afterend", "

" + emailDescriptionText + "

") } } })(); //password toggler Show or hide a password setupPwdTogglers(); function setupPwdTogglers() { var pwdInputs = document.querySelectorAll("input[type=password]"); pwdInputs.forEach(function(pwdInput, i) { pwdInput.insertAdjacentHTML("afterend", ""); var passwordToggleButtons = document.getElementsByClassName("password-toggler"); var passwordToggleButton = passwordToggleButtons[i]; passwordToggleButton.onclick = function() { if (pwdInput.type === "password") { pwdInput.type = "text"; passwordToggleButton.title = "Hide Password"; passwordToggleButton.classList.add("active"); } else { pwdInput.type = "password"; passwordToggleButton.title = "Show Password"; passwordToggleButton.classList.remove("active"); } }; }); }