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:]]' ```
34 lines
1.5 KiB
Plaintext
34 lines
1.5 KiB
Plaintext
<% @page_title = "Close Account" %>
|
|
|
|
<%== part("components/page_header", title: "My Account") %>
|
|
|
|
<main>
|
|
<div class="max-w-screen-xl pb-6 lg:pb-16">
|
|
<div class="overflow-hidden rounded-lg bg-white shadow">
|
|
<div class="divide-y divide-gray-200 lg:grid lg:grid-cols-12 lg:divide-x lg:divide-y-0">
|
|
<%== render("account/submenu") %>
|
|
<div class="divide-y divide-gray-200 lg:col-span-8 xl:col-span-9 2xl:col-span-10 pb-10">
|
|
<div class="px-4 py-6 sm:p-6 lg:pb-8 space-y-4">
|
|
<h2 class="text-lg font-medium leading-6 text-gray-900">Close Account</h2>
|
|
<p class="mt-1 text-sm text-gray-500">This action will permanently delete this account. Deleted data cannot be recovered. Use it carefully.</p>
|
|
<form action="/<%= rodauth.close_account_route %>" role="form" method="POST">
|
|
<%== rodauth.close_account_additional_form_tags %>
|
|
<%== rodauth.csrf_tag("/" + rodauth.close_account_route) %>
|
|
<div class="mt-6 grid grid-cols-6 gap-6">
|
|
<% if rodauth.close_account_requires_password? %>
|
|
<div class="col-span-6 sm:col-span-3 xl:col-span-2">
|
|
<%== render("components/rodauth/password_field") %>
|
|
</div>
|
|
<% end %>
|
|
<div class="col-span-6">
|
|
<%== part("components/form/submit_button", text: "Close Account") %>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|