This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<div>
|
||||
<h2 class="mb-8 text-xl text-center title text-primary-400">
|
||||
<%= @title %>
|
||||
{@title}
|
||||
</h2>
|
||||
<.form
|
||||
:let={f}
|
||||
@ -16,38 +16,38 @@
|
||||
:if={@changeset.action && not @changeset.valid?}
|
||||
class="col-span-3 text-center invalid-feedback"
|
||||
>
|
||||
<%= changeset_errors(@changeset) %>
|
||||
{changeset_errors(@changeset)}
|
||||
</div>
|
||||
|
||||
<%= label(f, :name, gettext("name"),
|
||||
{label(f, :name, gettext("name"),
|
||||
class: "title text-lg text-primary-400",
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
<%= text_input(f, :name,
|
||||
)}
|
||||
{text_input(f, :name,
|
||||
class: "input input-primary col-span-2",
|
||||
phx_debounce: 300,
|
||||
required: true
|
||||
) %>
|
||||
<%= error_tag(f, :name, "col-span-3") %>
|
||||
)}
|
||||
{error_tag(f, :name, "col-span-3")}
|
||||
|
||||
<%= label(f, :uses_left, gettext("uses left"),
|
||||
{label(f, :uses_left, gettext("uses left"),
|
||||
class: "title text-lg text-primary-400",
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
<%= number_input(f, :uses_left,
|
||||
)}
|
||||
{number_input(f, :uses_left,
|
||||
min: 0,
|
||||
class: "input input-primary col-span-2",
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
<%= error_tag(f, :uses_left, "col-span-3") %>
|
||||
)}
|
||||
{error_tag(f, :uses_left, "col-span-3")}
|
||||
|
||||
<span class="col-span-3 italic text-center text-primary-500">
|
||||
<%= gettext(~s/leave "uses left" blank to make invite unlimited/) %>
|
||||
{gettext(~s/leave "uses left" blank to make invite unlimited/)}
|
||||
</span>
|
||||
|
||||
<%= submit(dgettext("actions", "save"),
|
||||
{submit(dgettext("actions", "save"),
|
||||
class: "mx-auto btn btn-primary col-span-3",
|
||||
phx_disable_with: dgettext("prompts", "saving...")
|
||||
) %>
|
||||
)}
|
||||
</.form>
|
||||
</div>
|
||||
|
@ -1,15 +1,15 @@
|
||||
<div class="flex flex-col justify-center items-stretch mx-auto space-y-4 max-w-3xl">
|
||||
<h1 class="text-xl title title-primary-500">
|
||||
<%= gettext("invites") %>
|
||||
{gettext("invites")}
|
||||
</h1>
|
||||
|
||||
<%= if @invites |> Enum.empty?() do %>
|
||||
<h1 class="text-xl text-center title text-primary-400">
|
||||
<%= gettext("no invites 😔") %>
|
||||
{gettext("no invites 😔")}
|
||||
</h1>
|
||||
|
||||
<.link patch={~p"/invites/new"} class="ml-auto btn btn-primary">
|
||||
<%= dgettext("actions", "new invite") %>
|
||||
{dgettext("actions", "new invite")}
|
||||
</.link>
|
||||
<% end %>
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
dgettext("actions", "copy invite link for %{invite_name}", invite_name: invite.name)
|
||||
}
|
||||
>
|
||||
<%= dgettext("actions", "copy") %>
|
||||
{dgettext("actions", "copy")}
|
||||
</button>
|
||||
</form>
|
||||
</:code_actions>
|
||||
@ -67,7 +67,7 @@
|
||||
phx-click={if invite.disabled_at, do: "enable_invite", else: "disable_invite"}
|
||||
phx-value-id={invite.id}
|
||||
>
|
||||
<%= if invite.disabled_at, do: gettext("enable"), else: gettext("disable") %>
|
||||
{if invite.disabled_at, do: gettext("enable"), else: gettext("disable")}
|
||||
</.link>
|
||||
|
||||
<.link
|
||||
@ -82,12 +82,12 @@
|
||||
)
|
||||
}
|
||||
>
|
||||
<%= gettext("set unlimited") %>
|
||||
{gettext("set unlimited")}
|
||||
</.link>
|
||||
</.invite_card>
|
||||
|
||||
<.link :if={@invites != []} patch={~p"/invites/new"} class="ml-auto btn btn-primary">
|
||||
<%= dgettext("actions", "create invite") %>
|
||||
{dgettext("actions", "create invite")}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
<hr class="hr" />
|
||||
|
||||
<h1 class="text-xl title text-primary-400">
|
||||
<%= gettext("admins") %>
|
||||
{gettext("admins")}
|
||||
</h1>
|
||||
|
||||
<div class="flex flex-col justify-center items-stretch space-y-4">
|
||||
@ -123,7 +123,7 @@
|
||||
<hr class="hr" />
|
||||
|
||||
<h1 class="text-xl title text-primary-400">
|
||||
<%= gettext("users") %>
|
||||
{gettext("users")}
|
||||
</h1>
|
||||
|
||||
<div class="flex flex-col justify-center items-stretch space-y-4">
|
||||
|
Reference in New Issue
Block a user