Collapse verification resend form
mindflux-ci / build (push) Successful in 15s

This commit is contained in:
AliceDarkest
2026-07-15 11:30:38 +02:00
parent 305e3aa4b6
commit e875c9a7d3
2 changed files with 41 additions and 7 deletions
+24 -7
View File
@@ -92,13 +92,19 @@
<button class="neon-btn" type="submit">Account erstellen</button>
</form>
<form th:action="@{/verification/resend}" method="post" style="margin-top:1rem">
<label class="mf-label" for="resend-email">Bestätigungslink erneut senden</label>
<div style="display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.35rem">
<input id="resend-email" class="mf-input" type="email" name="email" placeholder="E-Mail-Adresse" required>
<button class="mf-btn outline" type="submit">Link senden</button>
</div>
</form>
<div class="auth-resend">
<button id="resend-toggle" class="auth-resend-toggle" type="button"
aria-expanded="false" aria-controls="resend-form">
Bestätigungslink erneut senden
</button>
<form id="resend-form" th:action="@{/verification/resend}" method="post" hidden>
<label class="mf-label" for="resend-email">E-Mail-Adresse</label>
<div class="auth-resend-fields">
<input id="resend-email" class="mf-input" type="email" name="email" placeholder="E-Mail-Adresse" required autocomplete="email">
<button class="mf-btn outline" type="submit">Link senden</button>
</div>
</form>
</div>
<p class="mobile-switch">Schon dabei? <a data-goto="login">Zum Login</a></p>
</div>
@@ -146,6 +152,17 @@
if (toSignup) toSignup.addEventListener('click', function () { c.classList.add('active'); });
if (toLogin) toLogin.addEventListener('click', function () { c.classList.remove('active'); });
var resendToggle = document.getElementById('resend-toggle');
var resendForm = document.getElementById('resend-form');
if (resendToggle && resendForm) {
resendToggle.addEventListener('click', function () {
var expand = resendForm.hidden;
resendForm.hidden = !expand;
resendToggle.setAttribute('aria-expanded', String(expand));
if (expand) resendForm.querySelector('input').focus();
});
}
document.querySelectorAll('[data-goto="signup"]').forEach(function (el) {
el.addEventListener('click', function (e) { e.preventDefault(); c.classList.add('active'); });
});