Thanks to Jeremy, the new version of Rodauth will include the public `verify_account_email_recently_sent?` method. We can use this to disable the resend button and provide a different explanation if the email was sent recently.
28 lines
1.0 KiB
Plaintext
28 lines
1.0 KiB
Plaintext
<% @page_title = "Resend Verification" %>
|
|
|
|
<% @page_message = "Resend account verification" %>
|
|
|
|
<form action="<%= rodauth.verify_account_resend_path %>" class="rodauth space-y-6" role="form" method="POST">
|
|
<%== rodauth.verify_account_resend_additional_form_tags %>
|
|
<%== rodauth.csrf_tag(rodauth.verify_account_resend_path) %>
|
|
|
|
<div class="leading-6 text-sm"><%== rodauth.verify_account_resend_explanatory_text %></div>
|
|
|
|
<% if rodauth.param_or_nil(rodauth.login_param) %>
|
|
<%== render("components/form/hidden", locals: { name: rodauth.login_param, value: rodauth.param(rodauth.login_param) }) %>
|
|
<% else %>
|
|
<%== render("components/rodauth/login_field") %>
|
|
<% end %>
|
|
|
|
<div class="flex flex-col text-center">
|
|
<%== render(
|
|
"components/form/submit_button",
|
|
locals: {
|
|
text: "Send Verification Again",
|
|
attributes: rodauth.verify_account_email_recently_sent? ? { disabled: true } : {}
|
|
}
|
|
) %>
|
|
<a href="/login" class="mt-2 text-sm font-semibold leading-6 text-gray-900">Sign in to another account</a>
|
|
</div>
|
|
</form>
|