Fix contact/enroll confirmation being hidden along with the form it lived inside
deploy / deploy (push) Successful in 3s
deploy / deploy (push) Successful in 3s
Both forms nested their status message as a child of the <form>, so form.hidden = true on success hid the confirmation right along with it — looked like nothing happened. Contact form now resets and stays usable (you can send another message) instead of disappearing; enroll form still hides after signup (no reason to sign up twice), but its confirmation is now a sibling so it actually stays visible. Also generalized the privacy policy's language from being anchored on email courses specifically to covering any use of the site.
This commit is contained in:
@@ -18,8 +18,8 @@
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn">Send message</button>
|
||||
<p id="contact-status" role="status" style="margin-top:1rem;"></p>
|
||||
</form>
|
||||
<p id="contact-status" role="status" style="margin-top:1rem;"></p>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
@@ -43,7 +43,7 @@
|
||||
}).then(function (res) {
|
||||
if (!res.ok) throw new Error("request failed");
|
||||
form.reset();
|
||||
form.hidden = true;
|
||||
submitBtn.disabled = false;
|
||||
status.textContent = "Thanks — I'll get back to you soon.";
|
||||
}).catch(function () {
|
||||
submitBtn.disabled = false;
|
||||
|
||||
Reference in New Issue
Block a user