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
|
|
@ -19,7 +19,7 @@ defmodule MvWeb.CustomFieldLive.FormComponent do
|
|||
@impl true
|
||||
def render(assigns) do
|
||||
~H"""
|
||||
<div id={@id} class="mb-8 border shadow-xl card border-base-300">
|
||||
<div id={@id} class="mb-8 max-w-2xl border shadow-xl card border-base-300">
|
||||
<div class="card-body">
|
||||
<div class="flex items-center gap-4 mb-4">
|
||||
<.button
|
||||
|
|
@ -98,6 +98,20 @@ defmodule MvWeb.CustomFieldLive.FormComponent do
|
|||
label={gettext("Show in overview")}
|
||||
/>
|
||||
|
||||
<%!-- Buttons: below all form fields, above Danger zone --%>
|
||||
<div class="mt-6 flex items-center justify-end gap-4">
|
||||
<.button type="button" variant="neutral" phx-click="cancel" phx-target={@myself}>
|
||||
{gettext("Cancel")}
|
||||
</.button>
|
||||
<.button
|
||||
type="submit"
|
||||
phx-disable-with={gettext("Saving...")}
|
||||
variant="primary"
|
||||
>
|
||||
{gettext("Save Data Field")}
|
||||
</.button>
|
||||
</div>
|
||||
|
||||
<%= if @custom_field do %>
|
||||
<%!-- Danger zone: canonical pattern (same as member form) --%>
|
||||
<section class="mt-8 mb-6" aria-labelledby="danger-zone-heading">
|
||||
|
|
@ -125,15 +139,6 @@ defmodule MvWeb.CustomFieldLive.FormComponent do
|
|||
</div>
|
||||
</section>
|
||||
<% end %>
|
||||
|
||||
<div class="justify-end mt-4 card-actions">
|
||||
<.button type="button" variant="neutral" phx-click="cancel" phx-target={@myself}>
|
||||
{gettext("Cancel")}
|
||||
</.button>
|
||||
<.button phx-disable-with={gettext("Saving...")} variant="primary">
|
||||
{gettext("Save Data Field")}
|
||||
</.button>
|
||||
</div>
|
||||
</.form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue