style: consistent save buttons and active tab
This commit is contained in:
parent
82962a2f2a
commit
ba08434604
15 changed files with 486 additions and 438 deletions
|
|
@ -77,7 +77,7 @@ defmodule MvWeb.GroupLive.Form do
|
|||
def render(assigns) do
|
||||
~H"""
|
||||
<Layouts.app flash={@flash} current_user={@current_user}>
|
||||
<.form for={@form} id="group-form" phx-change="validate" phx-submit="save">
|
||||
<.form class="max-w-2xl" for={@form} id="group-form" phx-change="validate" phx-submit="save">
|
||||
<.header>
|
||||
<:leading>
|
||||
<.button navigate={return_path(@return_to, @group)} variant="neutral">
|
||||
|
|
@ -86,11 +86,6 @@ defmodule MvWeb.GroupLive.Form do
|
|||
</.button>
|
||||
</:leading>
|
||||
{@page_title}
|
||||
<:actions>
|
||||
<.button phx-disable-with={gettext("Saving...")} variant="primary" type="submit">
|
||||
{gettext("Save")}
|
||||
</.button>
|
||||
</:actions>
|
||||
</.header>
|
||||
|
||||
<div class="mt-6 space-y-6">
|
||||
|
|
@ -104,6 +99,20 @@ defmodule MvWeb.GroupLive.Form do
|
|||
/>
|
||||
</div>
|
||||
|
||||
<%!-- Buttons: below all form fields, Abbrechen left (secondary), Speichern right (primary) --%>
|
||||
<div class="mt-6 flex items-center justify-end gap-4">
|
||||
<.button navigate={return_path(@return_to, @group)} variant="neutral" type="button">
|
||||
{gettext("Cancel")}
|
||||
</.button>
|
||||
<.button
|
||||
type="submit"
|
||||
phx-disable-with={gettext("Saving...")}
|
||||
variant="primary"
|
||||
>
|
||||
{gettext("Save group")}
|
||||
</.button>
|
||||
</div>
|
||||
|
||||
<%!-- Danger zone: canonical pattern (same as member form) --%>
|
||||
<%= if @group && can?(@current_user, :destroy, @group) do %>
|
||||
<section class="mt-8 mb-6" aria-labelledby="danger-zone-heading">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue