fix: datafield edit view was shown alongside othe relements
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
faf80bfb4b
commit
9751525a0c
8 changed files with 85 additions and 41 deletions
|
|
@ -29,27 +29,47 @@ defmodule MvWeb.DatafieldsLive do
|
|||
<.header>
|
||||
{gettext("Datafields")}
|
||||
<:subtitle>
|
||||
{gettext("Configure which data you want to save for your members. Define individual datafields.")}
|
||||
{gettext(
|
||||
"Configure which data you want to save for your members. Define individual datafields."
|
||||
)}
|
||||
</:subtitle>
|
||||
</.header>
|
||||
|
||||
<.form_section title={gettext("Member fields")}>
|
||||
<%!-- Overview: both sections with form_section wrappers --%>
|
||||
<div :if={@active_editing_section == nil} class="mt-6 space-y-6">
|
||||
<.form_section title={gettext("Personal Data")}>
|
||||
<.live_component
|
||||
module={MvWeb.MemberFieldLive.IndexComponent}
|
||||
id="member-fields-component"
|
||||
settings={@settings}
|
||||
/>
|
||||
</.form_section>
|
||||
|
||||
<.form_section title={gettext("Individual Datafields")}>
|
||||
<.live_component
|
||||
module={MvWeb.CustomFieldLive.IndexComponent}
|
||||
id="custom-fields-component"
|
||||
actor={@current_user}
|
||||
/>
|
||||
</.form_section>
|
||||
</div>
|
||||
|
||||
<%!-- Edit mode: only the active section, no section title/card wrapper --%>
|
||||
<div :if={@active_editing_section == :member_fields} class="mt-6">
|
||||
<.live_component
|
||||
:if={@active_editing_section != :custom_fields}
|
||||
module={MvWeb.MemberFieldLive.IndexComponent}
|
||||
id="member-fields-component"
|
||||
settings={@settings}
|
||||
/>
|
||||
</.form_section>
|
||||
</div>
|
||||
|
||||
<.form_section title={gettext("Custom fields")}>
|
||||
<div :if={@active_editing_section == :custom_fields} class="mt-6">
|
||||
<.live_component
|
||||
:if={@active_editing_section != :member_fields}
|
||||
module={MvWeb.CustomFieldLive.IndexComponent}
|
||||
id="custom-fields-component"
|
||||
actor={@current_user}
|
||||
/>
|
||||
</.form_section>
|
||||
</div>
|
||||
</Layouts.app>
|
||||
"""
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue