form: actually link to the my account page

forgot to do this before. shown on the success modal.
This commit is contained in:
Harvey Tindall
2023-06-22 21:57:19 +01:00
parent f07c60afb0
commit 7aaafb90e3
5 changed files with 13 additions and 3 deletions
+3 -1
View File
@@ -36,6 +36,7 @@ interface formWindow extends Window {
reCAPTCHA: boolean;
reCAPTCHASiteKey: string;
userPageEnabled: boolean;
userPageAddress: string;
}
loadLangSelector("form");
@@ -348,7 +349,8 @@ const create = (event: SubmitEvent) => {
} else {
if (window.userPageEnabled) {
const userPageNoticeArea = document.getElementById("modal-success-user-page-area");
userPageNoticeArea.textContent = userPageNoticeArea.textContent.replace("{myAccount}", userPageNoticeArea.getAttribute("my-account-term"));
const link = `<a href="${window.userPageAddress}" target="_blank">${userPageNoticeArea.getAttribute("my-account-term")}</a>`;
userPageNoticeArea.innerHTML = userPageNoticeArea.textContent.replace("{myAccount}", link);
}
window.successModal.show();
}