41 lines
1.5 KiB
Text
41 lines
1.5 KiB
Text
<Layouts.authenticated
|
|
flash={@flash}
|
|
current_scope={@current_scope}
|
|
current_organization={nil}
|
|
timezone={@timezone}
|
|
>
|
|
<.header>
|
|
{@page_title}
|
|
<:subtitle>Create a new organization to manage your sites and devices</:subtitle>
|
|
</.header>
|
|
|
|
<%= if not @can_create_free do %>
|
|
<div class="max-w-2xl mb-6 rounded-lg bg-orange-50 dark:bg-orange-900/20 p-4 border border-orange-200 dark:border-orange-800">
|
|
<div class="flex">
|
|
<.icon name="hero-exclamation-triangle" class="h-5 w-5 text-orange-400" />
|
|
<div class="ml-3">
|
|
<h3 class="text-sm font-medium text-orange-800 dark:text-orange-400">
|
|
Free organization limit reached
|
|
</h3>
|
|
<p class="mt-1 text-sm text-orange-700 dark:text-orange-300">
|
|
You already have {@free_org_count} free {if @free_org_count == 1,
|
|
do: "organization",
|
|
else: "organizations"}.
|
|
To create additional organizations, you'll need to upgrade your existing organization to a paid plan.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="max-w-2xl">
|
|
<.form for={@form} id="organization-form" phx-change="validate" phx-submit="save">
|
|
<.input field={@form[:name]} type="text" label="Organization Name" required />
|
|
|
|
<div class="flex gap-3 mt-6">
|
|
<.button phx-disable-with="Creating..." variant="primary">Create Organization</.button>
|
|
<.button navigate={~p"/orgs"}>Cancel</.button>
|
|
</div>
|
|
</.form>
|
|
</div>
|
|
</Layouts.authenticated>
|