feat(idaa/recovery_meetings): collapse Admin Options section by default
Admin Options are rarely changed; collapsing by default reduces visual noise on the long edit form. Hidden inputs preserve status/enable/hide/ priority/sort/group values when the section is collapsed so a save never silently resets admin fields. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -76,6 +76,9 @@
|
|||||||
// Trusted+ users see no lock UI; new meetings start unlocked.
|
// Trusted+ users see no lock UI; new meetings start unlocked.
|
||||||
let contact_1_locked = $state(!!$idaa_slct.event_id && !$ae_loc.trusted_access);
|
let contact_1_locked = $state(!!$idaa_slct.event_id && !$ae_loc.trusted_access);
|
||||||
|
|
||||||
|
// Admin Options section collapsed by default — trusted users rarely need these fields.
|
||||||
|
let show_admin_options = $state(false);
|
||||||
|
|
||||||
// Auto-expand Contact 2 if the meeting already has data in that slot,
|
// Auto-expand Contact 2 if the meeting already has data in that slot,
|
||||||
// so existing contact info is never silently hidden on load.
|
// so existing contact info is never silently hidden on load.
|
||||||
let show_contact_2 = $state(
|
let show_contact_2 = $state(
|
||||||
@@ -1634,7 +1637,7 @@ Copy and paste link: <a href="${link_base_url}?event_id=${event_do.event_id}">${
|
|||||||
onclick={() => (show_contact_2 = !show_contact_2)}
|
onclick={() => (show_contact_2 = !show_contact_2)}
|
||||||
>
|
>
|
||||||
<span class="fas fa-{show_contact_2 ? 'caret-down' : 'caret-right'} text-xs opacity-60"></span>
|
<span class="fas fa-{show_contact_2 ? 'caret-down' : 'caret-right'} text-xs opacity-60"></span>
|
||||||
<h4 class="subsection-heading !mb-0">
|
<h4 class="subsection-heading mb-0!">
|
||||||
<span class="fas fa-user-plus"></span> Contact 2 (Optional)
|
<span class="fas fa-user-plus"></span> Contact 2 (Optional)
|
||||||
</h4>
|
</h4>
|
||||||
</button>
|
</button>
|
||||||
@@ -1724,11 +1727,19 @@ Copy and paste link: <a href="${link_base_url}?event_id=${event_do.event_id}">${
|
|||||||
============================================================ -->
|
============================================================ -->
|
||||||
{#if $ae_loc.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<div class="section-card section-card--admin" id="section__admin_options">
|
<div class="section-card section-card--admin" id="section__admin_options">
|
||||||
<h3 class="section-heading">
|
<button
|
||||||
|
type="button"
|
||||||
|
class="flex flex-row items-center gap-2 text-left w-full"
|
||||||
|
onclick={() => (show_admin_options = !show_admin_options)}
|
||||||
|
>
|
||||||
|
<span class="fas fa-{show_admin_options ? 'caret-down' : 'caret-right'} text-xs opacity-60"></span>
|
||||||
|
<h3 class="section-heading mb-0!">
|
||||||
<span class="fas fa-cogs"></span>
|
<span class="fas fa-cogs"></span>
|
||||||
Admin Options
|
Admin Options
|
||||||
</h3>
|
</h3>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{#if show_admin_options}
|
||||||
<!-- Status -->
|
<!-- Status -->
|
||||||
<label class="field-label" for="status">
|
<label class="field-label" for="status">
|
||||||
Status
|
Status
|
||||||
@@ -1814,6 +1825,18 @@ Copy and paste link: <a href="${link_base_url}?event_id=${event_do.event_id}">${
|
|||||||
placeholder="Internal notes about this meeting"
|
placeholder="Internal notes about this meeting"
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
{:else}
|
||||||
|
<!-- Hidden inputs preserve admin field values when section is collapsed.
|
||||||
|
Checkboxes are omitted from FormData when unchecked, so we use
|
||||||
|
hidden inputs with '1'/'0' string values that the submit handler
|
||||||
|
already converts via form_data.get(). -->
|
||||||
|
<input type="hidden" name="status" value={$lq__event_obj?.status ?? ''} />
|
||||||
|
<input type="hidden" name="enable" value={$lq__event_obj?.enable ? 'true' : 'false'} />
|
||||||
|
<input type="hidden" name="hide" value={$lq__event_obj?.hide ? 'true' : 'false'} />
|
||||||
|
<input type="hidden" name="priority" value={$lq__event_obj?.priority ? 'true' : 'false'} />
|
||||||
|
<input type="hidden" name="sort" value={$lq__event_obj?.sort ?? ''} />
|
||||||
|
<input type="hidden" name="group" value={$lq__event_obj?.group ?? ''} />
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user