diff options
| author | Joe Carstairs <me@joeac.net> | 2026-06-18 19:21:59 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-06-18 19:21:59 +0100 |
| commit | ca8e6824eaa711105f4092365792720c9dde026b (patch) | |
| tree | 2b6493941352d11b799ee63d3f1311c13de649b8 /website/src/scripts/contact/post-error-message.ts | |
| parent | a0f25057283a397f006127b6f582d190d2c4294e (diff) | |
remove Astro website
Diffstat (limited to 'website/src/scripts/contact/post-error-message.ts')
| -rw-r--r-- | website/src/scripts/contact/post-error-message.ts | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/website/src/scripts/contact/post-error-message.ts b/website/src/scripts/contact/post-error-message.ts deleted file mode 100644 index 9846635..0000000 --- a/website/src/scripts/contact/post-error-message.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { Selectors } from "./selectors"; - -export function postErrorMessageOnContactForm( - { contactForm }: Selectors, - errorMsg: string, -) { - const errorElem = contactForm.errorElem(); - if (errorElem) { - errorElem.textContent = errorMsg; - errorElem.removeAttribute("hidden"); - } else { - alert(errorMsg); - } -} - -export function postErrorMessageOnOtpForm( - { otpDialog }: Selectors, - errorMsg: string, -) { - const errorElem = otpDialog.errorElem(); - if (errorElem) { - errorElem.textContent = errorMsg; - errorElem.removeAttribute("hidden"); - } else { - alert(errorMsg); - } - for (const input of otpDialog.allOtpInputs()) { - (input as HTMLInputElement).value = ""; - } -} |
