This uses the new part plugin to simplify and optimize render calls with locals. ```ruby render(:template, locals: {foo: 'bar'}) part(:template, foo: 'bar') ``` This simplifies a large number of calls in Clover, since rendering with locals is one of the most common method calls in the templates. The main advantage of this is simplicity, but the part method is also more optimized, and will be even more optimized when we upgrade to Ruby 3.4. Diff best reviewed with: ``` git diff -b --color-words --word-diff-regex='\\w+|[^[:space:]]' ```
29 lines
1.1 KiB
Plaintext
29 lines
1.1 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) %>
|
|
<% recently_sent = rodauth.verify_account_email_recently_sent? if rodauth.account %>
|
|
|
|
<% if !rodauth.account || recently_sent %>
|
|
<div class="leading-6 text-sm"><%== rodauth.verify_account_resend_explanatory_text %></div>
|
|
<% end %>
|
|
|
|
<% if rodauth.param_or_nil(rodauth.login_param) %>
|
|
<%== part("components/form/hidden", name: rodauth.login_param, value: rodauth.param(rodauth.login_param)) %>
|
|
<% else %>
|
|
<%== render("components/rodauth/login_field") %>
|
|
<% end %>
|
|
|
|
<div class="flex flex-col text-center">
|
|
<%== part(
|
|
"components/form/submit_button",
|
|
text: "Send Verification Again",
|
|
attributes: 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>
|