Making the admin options consistent
This commit is contained in:
@@ -462,6 +462,7 @@ async function handle_submit_form(event) {
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section class="ae_section archive_content__original border border-gray-200 rounded p-2 space-y-2">
|
||||
|
||||
<h3 class="h3">Original</h3>
|
||||
|
||||
@@ -177,7 +177,7 @@ onMount(() => {
|
||||
>
|
||||
<span class="ae_label">Original date/time:</span>
|
||||
{#if idaa_archive_content_obj.original_datetime}
|
||||
<span class="ae_value ae_prop prop_original_datetime fs_smaller">{ae_util.iso_datetime_formatter(idaa_archive_content_obj.original_datetime, 'datetime_long')}</span>
|
||||
<span class="ae_value ae_prop prop_original_datetime fs_smaller">{ae_util.iso_datetime_formatter(idaa_archive_content_obj.original_datetime, 'datetime_12_long')}</span>
|
||||
{/if}
|
||||
{#if idaa_archive_content_obj.original_timezone}
|
||||
<span class="ae_label">Timezone:</span>
|
||||
@@ -189,12 +189,12 @@ onMount(() => {
|
||||
|
||||
|
||||
<section
|
||||
class="ae_section ae_footer ae_meta archive_content__meta"
|
||||
class:ae_d_none={!$ae_loc.administrator_access}
|
||||
class="ae_section ae_footer ae_meta archive_content__meta text-sm text-gray-500 mt-4 flex flex-row gap-2 items-center justify-center"
|
||||
class:hidden={!$ae_loc.administrator_access}
|
||||
>
|
||||
<span
|
||||
class="archive_content__archive_content_type"
|
||||
class:ae_d_none={!idaa_archive_content_obj.archive_content_type}
|
||||
class:hidden={!idaa_archive_content_obj.archive_content_type}
|
||||
>
|
||||
Type: {idaa_archive_content_obj.archive_content_type}
|
||||
</span>
|
||||
@@ -206,7 +206,7 @@ onMount(() => {
|
||||
</span>
|
||||
<span
|
||||
class="archive_content__updated_on"
|
||||
class:ae_d_none={!idaa_archive_content_obj.updated_on}
|
||||
class:hidden={!idaa_archive_content_obj.updated_on}
|
||||
>
|
||||
Updated on: {ae_util.iso_datetime_formatter(idaa_archive_content_obj.updated_on, 'datetime_short')}
|
||||
</span>
|
||||
|
||||
@@ -77,11 +77,11 @@ async function handle_delete_post_obj({post_id, method}: key_val) {
|
||||
</button>
|
||||
</section> <!-- END: section post__options -->
|
||||
|
||||
<h3 class="h3">Post</h3>
|
||||
<!-- <h3 class="h3">Post</h3> -->
|
||||
|
||||
<input type="hidden" value={$idaa_slct.post_id} />
|
||||
|
||||
<section class="ae_section post__general_information space-y-1"> <!-- BEGIN: section post__general_information -->
|
||||
<section class="ae_section post__general_information border border-gray-200 rounded p-2 space-y-2"> <!-- BEGIN: section post__general_information -->
|
||||
|
||||
<label for="title">Title of BB Post:
|
||||
<input type="text" id="title" name="title" required max="200" value={$lq__post_obj?.title} placeholder="Title of Post" autocomplete="off" class="input w-96" />
|
||||
@@ -213,89 +213,84 @@ async function handle_delete_post_obj({post_id, method}: key_val) {
|
||||
|
||||
</section> <!-- END: section post__general_information -->
|
||||
|
||||
|
||||
{#if $ae_loc.trusted_access}
|
||||
<button
|
||||
type="button"
|
||||
class="ae_btn ae_d_none_toggle ae_float_right ae_smallest btn btn-xs btn-info btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
||||
class="btn btn-sm variant-soft-secondary float-right"
|
||||
on:click={() => {
|
||||
// document.querySelector('.ae_d_none_content').classList.toggle('ae_fade_out'); document.querySelector('.ae_d_none_content').classList.toggle('ae_fade_in');
|
||||
$idaa_loc.show__admin_options = !$idaa_loc.show__admin_options;
|
||||
$idaa_loc.bb.show__admin_options = !$idaa_loc.bb.show__admin_options;
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-eye m-1"></span>
|
||||
{$idaa_loc.show__admin_options ? 'Hide' : ''} Admin Options?
|
||||
{$idaa_loc.bb.show__admin_options ? 'Hide' : 'Show'} Admin
|
||||
</button>
|
||||
|
||||
<section
|
||||
class="ae_section post__admin_options"
|
||||
class:hidden={!$ae_loc.trusted_access || !$idaa_loc.show__admin_options}
|
||||
class="ae_section post__admin_options border border-gray-200 rounded p-2 space-y-2"
|
||||
class:hidden={!$idaa_loc.bb.show__admin_options}
|
||||
> <!-- BEGIN: section post__admin_options -->
|
||||
|
||||
<h3 class="h4">
|
||||
<h3 class="h3">
|
||||
Admin Options
|
||||
|
||||
</h3>
|
||||
|
||||
<span
|
||||
|
||||
class="flex flex-row flex-wrap items-center justify-between"
|
||||
>
|
||||
<label>Hide
|
||||
<input
|
||||
type="checkbox"
|
||||
name="hide"
|
||||
id="hide"
|
||||
bind:checked={$idaa_slct.post_obj.hide}
|
||||
class="checkbox"
|
||||
>
|
||||
</label>
|
||||
|
||||
<span
|
||||
class="flex flex-row flex-wrap items-center justify-between"
|
||||
>
|
||||
<label>Hide
|
||||
<input
|
||||
type="checkbox"
|
||||
name="hide"
|
||||
id="hide"
|
||||
bind:checked={$idaa_slct.post_obj.hide}
|
||||
class="checkbox"
|
||||
>
|
||||
</label>
|
||||
<label>Priority
|
||||
<input
|
||||
type="checkbox"
|
||||
name="priority"
|
||||
id="priority"
|
||||
bind:checked={$idaa_slct.post_obj.priority}
|
||||
class="checkbox"
|
||||
>
|
||||
</label>
|
||||
|
||||
<label>Priority
|
||||
<input
|
||||
type="checkbox"
|
||||
name="priority"
|
||||
id="priority"
|
||||
bind:checked={$idaa_slct.post_obj.priority}
|
||||
class="checkbox"
|
||||
>
|
||||
</label>
|
||||
<label>Sort <input type="number" name="sort" value={$lq__post_obj?.sort} class="input w-24" /></label>
|
||||
|
||||
<label>Sort <input type="number" name="sort" value={$lq__post_obj?.sort} class="input w-24" /></label>
|
||||
<label>Group <input type="text" name="group" value={$lq__post_obj?.group ? $lq__post_obj?.group : ''} max="100" class="input w-40" /></label>
|
||||
|
||||
<label>Group <input type="text" name="group" value={$lq__post_obj?.group ? $lq__post_obj?.group : ''} max="100" class="input w-40" /></label>
|
||||
|
||||
{#if $ae_loc.administrator_access}
|
||||
<label>Enable
|
||||
<input
|
||||
type="checkbox"
|
||||
name="enable"
|
||||
id="enable"
|
||||
bind:checked={$idaa_slct.post_obj.enable}
|
||||
class="checkbox"
|
||||
>
|
||||
</label>
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
{#if $ae_loc.trusted_access}
|
||||
<label
|
||||
for="notes"
|
||||
>
|
||||
Internal Staff Notes
|
||||
<Tiptap_editor
|
||||
default_minimal={true}
|
||||
bind:html_text={$idaa_slct.post_obj.notes}
|
||||
show_button_kv={{'heading__h1': false, 'heading__h2': false, 'heading__h3': false}}
|
||||
bind:new_html={$idaa_slct.post_obj.notes_new_html}
|
||||
/>
|
||||
{#if $ae_loc.administrator_access}
|
||||
<label>Enable
|
||||
<input
|
||||
type="checkbox"
|
||||
name="enable"
|
||||
id="enable"
|
||||
bind:checked={$idaa_slct.post_obj.enable}
|
||||
class="checkbox"
|
||||
>
|
||||
</label>
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
</span> <!-- END: span ae_show_hide_content -->
|
||||
{#if $ae_loc.trusted_access}
|
||||
<label
|
||||
for="notes"
|
||||
>
|
||||
Internal Staff Notes
|
||||
<Tiptap_editor
|
||||
default_minimal={true}
|
||||
bind:html_text={$idaa_slct.post_obj.notes}
|
||||
show_button_kv={{'heading__h1': false, 'heading__h2': false, 'heading__h3': false}}
|
||||
bind:new_html={$idaa_slct.post_obj.notes_new_html}
|
||||
/>
|
||||
</label>
|
||||
{/if}
|
||||
|
||||
</section> <!-- END: section post__admin_options -->
|
||||
{/if}
|
||||
|
||||
|
||||
<section class="ae_section ae_options ae_row ae_actions post__options post__actions flex flex-row gap-1 items-center justify-between">
|
||||
|
||||
@@ -567,7 +567,7 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
||||
|
||||
<input type="hidden" value={$idaa_slct.event_id} />
|
||||
|
||||
<section class="ae_section event__general_information"> <!-- BEGIN: section event__general_information -->
|
||||
<section class="ae_section event__general_information border border-gray-200 rounded p-2 space-y-2"> <!-- BEGIN: section event__general_information -->
|
||||
|
||||
<label for="name">Name of Recovery Meeting
|
||||
<input type="text" id="name" name="name" required max="200" value={$lq__event_obj?.name} placeholder="Name of Recovery Meeting" autocomplete="off" class="input w-96" />
|
||||
@@ -630,9 +630,8 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
||||
|
||||
</section> <!-- END: section event__general_information -->
|
||||
|
||||
<hr>
|
||||
|
||||
<section class="ae_section event__how_to_attend"> <!-- BEGIN: section event__how_to_attend -->
|
||||
<section class="ae_section event__how_to_attend border border-gray-200 rounded p-2 space-y-2"> <!-- BEGIN: section event__how_to_attend -->
|
||||
<h3 class="h2">How to Attended</h3>
|
||||
|
||||
<fieldset class="event__physical_virtual">
|
||||
@@ -817,10 +816,10 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
||||
|
||||
</section> <!-- END: section event__how_to_attend -->
|
||||
|
||||
<hr>
|
||||
|
||||
<section class="ae_section event__timing"> <!-- BEGIN: section event__timing -->
|
||||
<h3 class="h2">Recurring and When</h3>
|
||||
<section class="ae_section event__timing border border-gray-200 rounded p-2 space-y-2"> <!-- BEGIN: section event__timing -->
|
||||
|
||||
<h3 class="h3">Recurring and When</h3>
|
||||
|
||||
<!-- <fieldset class="event__recurring">
|
||||
<legend class="legend">Recurring</legend>
|
||||
@@ -983,10 +982,10 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
||||
{/if} -->
|
||||
</section> <!-- END: section event__timing -->
|
||||
|
||||
<hr>
|
||||
|
||||
<section class="ae_section event__contacts">
|
||||
<h3 class="h2">Contacts</h3>
|
||||
<section class="ae_section event__contacts border border-gray-200 rounded p-2 space-y-2">
|
||||
|
||||
<h3 class="h3">Contacts</h3>
|
||||
|
||||
<!-- {#if $ae_loc.trusted_access} -->
|
||||
<label for="external_person_id"><span class="fas fa-link"></span> Linked with Novi ID
|
||||
@@ -1126,105 +1125,86 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</section> <!-- END: section event__contacts -->
|
||||
|
||||
<hr>
|
||||
|
||||
<section class="ae_section event__admin_options"> <!-- BEGIN: section event__admin_options -->
|
||||
{#if $ae_loc.trusted_access}
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm variant-soft-secondary float-right"
|
||||
on:click={() => {
|
||||
$idaa_loc.recovery_meetings.show__admin_options = !$idaa_loc.recovery_meetings.show__admin_options;
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-eye m-1"></span>
|
||||
{$idaa_loc.recovery_meetings.show__admin_options ? 'Hide' : 'Show'} Admin
|
||||
</button>
|
||||
|
||||
<h3 class="h2">
|
||||
<section
|
||||
class="ae_section event__admin_options border border-gray-200 rounded p-2 space-y-2"
|
||||
class:hidden={!$idaa_loc.recovery_meetings.show__admin_options}
|
||||
> <!-- BEGIN: section event__admin_options -->
|
||||
|
||||
<h3 class="h3">
|
||||
Admin Options
|
||||
<button
|
||||
type="button"
|
||||
class="ae_btn ae_d_none_toggle ae_float_right ae_smallest btn btn-xs btn-info btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
||||
on:click={() => {
|
||||
// document.querySelector('.ae_d_none_content').classList.toggle('ae_fade_out'); document.querySelector('.ae_d_none_content').classList.toggle('ae_fade_in');
|
||||
$idaa_loc.show__admin_options = !$idaa_loc.show__admin_options;
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-eye m-1"></span>
|
||||
{$idaa_loc.show__admin_options ? 'Hide' : 'Show'} Admin?
|
||||
</button>
|
||||
</h3>
|
||||
|
||||
<span
|
||||
class:hidden={!$ae_loc.trusted_access || !$idaa_loc.show__admin_options}
|
||||
class="flex flex-row flex-wrap items-center justify-between"
|
||||
>
|
||||
<label>Hide
|
||||
<input
|
||||
type="checkbox"
|
||||
name="hide"
|
||||
id="hide"
|
||||
bind:checked={$idaa_slct.event_obj.hide}
|
||||
class="checkbox"
|
||||
>
|
||||
</label>
|
||||
|
||||
<span
|
||||
class="flex flex-row flex-wrap items-center justify-between"
|
||||
>
|
||||
<label>Hide
|
||||
<input
|
||||
type="checkbox"
|
||||
name="hide"
|
||||
id="hide"
|
||||
bind:checked={$idaa_slct.event_obj.hide}
|
||||
class="checkbox"
|
||||
>
|
||||
</label>
|
||||
<label>Priority
|
||||
<input
|
||||
type="checkbox"
|
||||
name="priority"
|
||||
id="priority"
|
||||
bind:checked={$idaa_slct.event_obj.priority}
|
||||
class="checkbox"
|
||||
>
|
||||
</label>
|
||||
|
||||
<label>Priority
|
||||
<input
|
||||
type="checkbox"
|
||||
name="priority"
|
||||
id="priority"
|
||||
bind:checked={$idaa_slct.event_obj.priority}
|
||||
class="checkbox"
|
||||
>
|
||||
</label>
|
||||
<label>Sort <input type="number" name="sort" value={$lq__event_obj?.sort} class="input w-24" /></label>
|
||||
|
||||
<label>Sort <input type="number" name="sort" value={$lq__event_obj?.sort} class="input w-24" /></label>
|
||||
<label>Group <input type="text" name="group" value={$lq__event_obj?.group ? $lq__event_obj?.group : ''} max="100" class="input w-40" /></label>
|
||||
|
||||
<label>Group <input type="text" name="group" value={$lq__event_obj?.group ? $lq__event_obj?.group : ''} max="100" class="input w-40" /></label>
|
||||
|
||||
{#if $ae_loc.administrator_access}
|
||||
<label>Enable
|
||||
<input
|
||||
type="checkbox"
|
||||
name="enable"
|
||||
id="enable"
|
||||
bind:checked={$idaa_slct.event_obj.enable}
|
||||
class="checkbox"
|
||||
>
|
||||
</label>
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
{#if $ae_loc.trusted_access}
|
||||
<label
|
||||
for="notes"
|
||||
>
|
||||
Internal Staff Notes
|
||||
<!-- <textarea id="notes" name="notes" class="ae_value event__notes tinymce_editor editor_basic_200 textarea" rows="2" cols="70" value={$lq__event_obj?.notes}></textarea> -->
|
||||
<Tiptap_editor
|
||||
default_minimal={true}
|
||||
bind:html_text={$idaa_slct.event_obj.notes}
|
||||
show_button_kv={{'heading__h1': false, 'heading__h2': false, 'heading__h3': false}}
|
||||
bind:new_html={$idaa_slct.event_obj.notes_new_html}
|
||||
/>
|
||||
|
||||
<!-- If changed then show Save button -->
|
||||
<!-- {#if
|
||||
$idaa_slct.event_obj?.notes_new_html &&
|
||||
$idaa_slct.event_obj?.notes_new_html != '<p></p>' &&
|
||||
$idaa_slct.event_obj.notes != $idaa_slct.event_obj.notes_new_html}
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-md btn-primary variant-ghost-secondary"
|
||||
on:click={() => $idaa_slct.event_obj.notes = $idaa_slct.event_obj.notes_new_html}
|
||||
>
|
||||
<span class="fas fa-save m-1"></span>
|
||||
Save?
|
||||
</button>
|
||||
{/if} -->
|
||||
<!-- {$idaa_slct.event_obj?.notes_new_html} -->
|
||||
{#if $ae_loc.administrator_access}
|
||||
<label>Enable
|
||||
<input
|
||||
type="checkbox"
|
||||
name="enable"
|
||||
id="enable"
|
||||
bind:checked={$idaa_slct.event_obj.enable}
|
||||
class="checkbox"
|
||||
>
|
||||
</label>
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
</span> <!-- END: span ae_show_hide_content -->
|
||||
{#if $ae_loc.trusted_access}
|
||||
<label
|
||||
for="notes"
|
||||
>
|
||||
Internal Staff Notes
|
||||
<Tiptap_editor
|
||||
default_minimal={true}
|
||||
bind:html_text={$idaa_slct.event_obj.notes}
|
||||
show_button_kv={{'heading__h1': false, 'heading__h2': false, 'heading__h3': false}}
|
||||
bind:new_html={$idaa_slct.event_obj.notes_new_html}
|
||||
/>
|
||||
</label>
|
||||
{/if}
|
||||
|
||||
</section> <!-- END: section event__admin_options -->
|
||||
{/if}
|
||||
|
||||
|
||||
<section class="ae_section ae_options ae_row ae_actions event__options event__actions"> <!-- BEGIN: section event__options -->
|
||||
|
||||
Reference in New Issue
Block a user