ubicloud/views/project/create.erb
Jeremy Evans 1b8f49d507 Handle csrf tags implicitly using form method in Clover
This switches Clover to use the form method for forms, which
automatically handles adding the appropriate csrf tag, so you
don't need to duplicate the path in a separate csrf_tag call.
The form method comes from the forme_route_csrf plugin, which
is what CloverAdmin already uses.

While here, change some rodauth forms to use *_path
instead of "/" + *_route. Also, change some
"#{@project.path}#{@pg.path}" to path(@pg).
2025-09-06 01:06:18 +09:00

33 lines
1.1 KiB
Text

<% @page_title = "Create Project" %>
<%== part("components/page_header", breadcrumbs: [%w[Projects /project], %w[Create #]]) %>
<div class="grid gap-6">
<% form(action: "/project", method: :post) do %>
<!-- Create Card -->
<div class="overflow-hidden rounded-lg shadow ring-1 ring-black ring-opacity-5 bg-white divide-y divide-gray-200">
<div class="px-4 py-5 sm:p-6">
<div class="grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6">
<div class="sm:col-span-3">
<%== part(
"components/form/text",
name: "name",
label: "Name",
attributes: {
required: true,
placeholder: "Enter name"
}
) %>
</div>
</div>
</div>
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center justify-end gap-x-6">
<a href="/project" class="text-sm font-semibold leading-6 text-gray-900">Cancel</a>
<%== part("components/form/submit_button", text: "Create") %>
</div>
</div>
</div>
<% end %>
</div>