- Add authenticated layout with navigation to equipment/site forms and show pages - Remove remaining DaisyUI classes from detail pages - Update buttons to use proper component variants - Ensure consistent styling across all authenticated pages
33 lines
1.1 KiB
Text
33 lines
1.1 KiB
Text
<Layouts.authenticated flash={@flash} current_organization={@organization}>
|
|
<.header>
|
|
{@page_title}
|
|
<:subtitle>
|
|
{if @live_action == :new,
|
|
do: "Add a new site to your organization",
|
|
else: "Update site details"}
|
|
</:subtitle>
|
|
</.header>
|
|
|
|
<div class="max-w-2xl">
|
|
<.form for={@form} id="site-form" phx-change="validate" phx-submit="save">
|
|
<.input field={@form[:name]} type="text" label="Site Name" required />
|
|
|
|
<.input
|
|
field={@form[:parent_site_id]}
|
|
type="select"
|
|
label="Parent Site (optional)"
|
|
prompt="No parent site"
|
|
options={Enum.map(@available_parent_sites, &{&1.name, &1.id})}
|
|
/>
|
|
|
|
<.input field={@form[:location]} type="text" label="Location" />
|
|
|
|
<.input field={@form[:description]} type="textarea" label="Description" />
|
|
|
|
<div class="flex gap-3 mt-6">
|
|
<.button phx-disable-with="Saving..." variant="primary">Save Site</.button>
|
|
<.button navigate={~p"/orgs/#{@organization.slug}/sites"}>Cancel</.button>
|
|
</div>
|
|
</.form>
|
|
</div>
|
|
</Layouts.authenticated>
|