Files
ubicloud/views/auth/create_account.erb
Jeremy Evans cb389c5144 Use Roda part plugin to simplify render calls with locals
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:]]'
```
2025-01-31 09:47:06 -08:00

31 lines
903 B
Plaintext

<% @page_title = "Create Account" %>
<% @page_message = "Create a new account" %>
<form class="rodauth space-y-6" role="form" method="POST">
<%== rodauth.create_account_additional_form_tags %>
<%== rodauth.csrf_tag %>
<%== part(
"components/form/text",
name: "name",
label: "Full Name",
attributes: {
required: true,
autocomplete: "name"
}
) %>
<%== render("components/rodauth/login_field") %>
<%== render("components/rodauth/password_field") %>
<%== part("components/rodauth/password_field", confirm: true) %>
<%== render("components/form/cloudflare_turnstile") %>
<div class="flex flex-col text-center">
<%== part("components/form/submit_button", text: "Create Account") %>
<a href="/login" class="mt-2 text-sm font-semibold leading-6 text-gray-900">Sign in to existing account</a>
</div>
</form>
<%== render("auth/social_buttons") %>