More work on posts. Getting ready for notifications working...
This commit is contained in:
@@ -245,11 +245,17 @@ async function handle_hosted_files_uploaded(hosted_file_id_li: string[], hosted_
|
|||||||
|
|
||||||
<section class="ae_section post__general_information border border-gray-200 rounded p-2 space-y-2"> <!-- 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:
|
<label for="title">
|
||||||
<input type="text" id="title" name="title" required max="200" value={$idaa_slct.post_obj?.title ?? ''} placeholder="Title of Post" autocomplete="off" class="input w-96" />
|
<span class="text-sm text-gray-600 dark:text-gray-400">
|
||||||
|
Title of BB post:
|
||||||
|
</span>
|
||||||
|
<input type="text" id="title" name="title" required max="200" value={$idaa_slct.post_obj?.title ?? ''} placeholder="Title of Post" autocomplete="off" class="input w-full" />
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label for="content" class="ae_label post__content">Content (post body):
|
<label for="content" class="ae_label post__content">
|
||||||
|
<span class="text-sm text-gray-600 dark:text-gray-400">
|
||||||
|
Content (post body):
|
||||||
|
</span>
|
||||||
<!-- <textarea name="content" id="content" class="ae_value post__content tinymce_editor editor_basic textarea" rows="5" cols="70" bind:value={$idaa_slct.post_obj.content} ></textarea> -->
|
<!-- <textarea name="content" id="content" class="ae_value post__content tinymce_editor editor_basic textarea" rows="5" cols="70" bind:value={$idaa_slct.post_obj.content} ></textarea> -->
|
||||||
|
|
||||||
<Tiptap_editor
|
<Tiptap_editor
|
||||||
@@ -434,7 +440,9 @@ async function handle_hosted_files_uploaded(hosted_file_id_li: string[], hosted_
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="">
|
<label class="">
|
||||||
BB post topic:
|
<span class="text-sm text-gray-600 dark:text-gray-400">
|
||||||
|
BB post topic:
|
||||||
|
</span>
|
||||||
<select
|
<select
|
||||||
name="topic_id"
|
name="topic_id"
|
||||||
class="select w-96"
|
class="select w-96"
|
||||||
@@ -455,7 +463,7 @@ async function handle_hosted_files_uploaded(hosted_file_id_li: string[], hosted_
|
|||||||
|
|
||||||
<h3 class="h3">Poster's Information</h3>
|
<h3 class="h3">Poster's Information</h3>
|
||||||
<fieldset class="">
|
<fieldset class="">
|
||||||
<legend class="">Post as Anonymous</legend>
|
<legend class="text-sm text-gray-600 dark:text-gray-400">Post as "Anonymous"?</legend>
|
||||||
<div class="flex flex-row gap-2">
|
<div class="flex flex-row gap-2">
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
@@ -465,7 +473,7 @@ async function handle_hosted_files_uploaded(hosted_file_id_li: string[], hosted_
|
|||||||
bind:group={$idaa_slct.post_obj.anonymous}
|
bind:group={$idaa_slct.post_obj.anonymous}
|
||||||
class="radio"
|
class="radio"
|
||||||
>
|
>
|
||||||
<label for="anonymous_no">No, include my name and email address</label>
|
<label for="anonymous_no"><strong>No</strong>, include my name and email address</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row gap-2">
|
<div class="flex flex-row gap-2">
|
||||||
<input
|
<input
|
||||||
@@ -476,13 +484,16 @@ async function handle_hosted_files_uploaded(hosted_file_id_li: string[], hosted_
|
|||||||
bind:group={$idaa_slct.post_obj.anonymous}
|
bind:group={$idaa_slct.post_obj.anonymous}
|
||||||
class="radio"
|
class="radio"
|
||||||
>
|
>
|
||||||
<label for="anonymous_yes">Yes, the post will be listed as Anonymous</label>
|
<label for="anonymous_yes"><strong>Yes</strong>, the post will be listed as <strong>"Anonymous"</strong></label>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<label for="external_person_id"><span class="fas fa-link"></span> Linked with Novi ID
|
<label for="external_person_id">
|
||||||
|
<span class="text-sm text-gray-600 dark:text-gray-400">
|
||||||
|
<span class="fas fa-link"></span> Linked with Novi ID
|
||||||
|
</span>
|
||||||
{#if !$ae_loc.trusted_access}
|
{#if !$ae_loc.trusted_access}
|
||||||
<span class="fas fa-lock" title="Field is locked"></span>
|
<span class="fas fa-lock m-1" title="Field is locked"></span>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="external_person_id"
|
id="external_person_id"
|
||||||
@@ -501,18 +512,21 @@ async function handle_hosted_files_uploaded(hosted_file_id_li: string[], hosted_
|
|||||||
id="external_person_id"
|
id="external_person_id"
|
||||||
name="external_person_id"
|
name="external_person_id"
|
||||||
value={($idaa_slct.post_obj.external_person_id ? $idaa_slct.post_obj.external_person_id : '')}
|
value={($idaa_slct.post_obj.external_person_id ? $idaa_slct.post_obj.external_person_id : '')}
|
||||||
readonly={false}
|
readonly={!$ae_loc.administrator_access}
|
||||||
class="input w-96"
|
class="input w-96"
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label for="full_name">Name
|
<label for="full_name">
|
||||||
{#if !$ae_loc.trusted_access}
|
<span class="text-sm text-gray-600 dark:text-gray-400">
|
||||||
<span class="fas fa-lock m-1" title="Field is locked"></span>
|
Name
|
||||||
{:else}
|
{#if !$ae_loc.trusted_access}
|
||||||
<span class="fas fa-unlock m-1" title="Field is unlocked"></span>
|
<span class="fas fa-lock m-1" title="Field is locked"></span>
|
||||||
{/if}
|
{:else}
|
||||||
|
<span class="fas fa-unlock m-1" title="Field is unlocked"></span>
|
||||||
|
{/if}
|
||||||
|
</span>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="full_name"
|
id="full_name"
|
||||||
@@ -524,12 +538,15 @@ async function handle_hosted_files_uploaded(hosted_file_id_li: string[], hosted_
|
|||||||
</label>
|
</label>
|
||||||
|
|
||||||
{#if $ae_loc.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<label for="email">Email
|
<label for="email">
|
||||||
{#if !$ae_loc.trusted_access}
|
<span class="text-sm text-gray-600 dark:text-gray-400">
|
||||||
<span class="fas fa-lock m-1" title="Field is locked"></span>
|
Email
|
||||||
{:else}
|
{#if !$ae_loc.trusted_access}
|
||||||
<span class="fas fa-unlock m-1" title="Field is unlocked"></span>
|
<span class="fas fa-lock m-1" title="Field is locked"></span>
|
||||||
{/if}
|
{:else}
|
||||||
|
<span class="fas fa-unlock m-1" title="Field is unlocked"></span>
|
||||||
|
{/if}
|
||||||
|
</span>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="email"
|
name="email"
|
||||||
@@ -537,10 +554,41 @@ async function handle_hosted_files_uploaded(hosted_file_id_li: string[], hosted_
|
|||||||
readonly={!$ae_loc.trusted_access}
|
readonly={!$ae_loc.trusted_access}
|
||||||
class="input w-96"
|
class="input w-96"
|
||||||
>
|
>
|
||||||
<span class="ae_highlight">Secondary link using the Novi email address</span>
|
<span class="text-xs text-gray-600 dark:text-gray-400 italic">
|
||||||
|
Secondary link using the Novi email address
|
||||||
|
</span>
|
||||||
</label>
|
</label>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<!-- A yes/no radio button group to determine if they want to be notified of comments on this post. -->
|
||||||
|
<fieldset class="">
|
||||||
|
<legend class="legend text-sm text-gray-600 dark:text-gray-400">
|
||||||
|
Notify me of comments?
|
||||||
|
</legend>
|
||||||
|
<div class="flex flex-row gap-2">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
id="notify_no"
|
||||||
|
name="notify"
|
||||||
|
value={false}
|
||||||
|
bind:group={$idaa_slct.post_obj.notify}
|
||||||
|
class="radio"
|
||||||
|
>
|
||||||
|
<label for="notify_no"><strong>No</strong>, do not notify me of comments</label>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-row gap-2">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
id="notify_yes"
|
||||||
|
name="notify"
|
||||||
|
value={true}
|
||||||
|
bind:group={$idaa_slct.post_obj.notify}
|
||||||
|
class="radio"
|
||||||
|
>
|
||||||
|
<label for="notify_yes"><strong>Yes</strong>, notify me of comments</label>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
</section> <!-- END: section post__general_information -->
|
</section> <!-- END: section post__general_information -->
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -90,23 +90,23 @@ onDestroy(() => {
|
|||||||
class="svelte_component ae_section ae_view post_obj view__post_obj space-y-2"
|
class="svelte_component ae_section ae_view post_obj view__post_obj space-y-2"
|
||||||
>
|
>
|
||||||
|
|
||||||
<div class="post__header">
|
|
||||||
<h2 class="post__title flex flex-row gap-2 items-center">
|
|
||||||
<span class="h3">
|
|
||||||
{@html $idaa_slct.post_obj?.title ?? 'New Post'}
|
|
||||||
<!-- - {$idaa_slct.post_obj?.id ?? 'Not Yet Saved'} -->
|
|
||||||
</span>
|
|
||||||
{#if $idaa_slct.post_obj?.topic_id}<span class="badge badge-info variant-glass-secondary"><span class="fas fa-user-md m-1"></span> {$idaa_slct.post_obj?.topic_name}</span>{/if}
|
|
||||||
</h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{#if $idaa_sess.bb.show__inline_edit__post_obj}
|
{#if $idaa_sess.bb.show__inline_edit__post_obj}
|
||||||
<Comp__post_obj_id_edit
|
<Comp__post_obj_id_edit
|
||||||
lq__post_obj={lq__post_obj}
|
lq__post_obj={lq__post_obj}
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
|
|
||||||
|
<div class="post__header">
|
||||||
|
<h2 class="post__title flex flex-row gap-2 items-center">
|
||||||
|
<span class="h3">
|
||||||
|
<span class="fas fa-comment-alt m-1"></span>
|
||||||
|
{@html $idaa_slct.post_obj?.title ?? 'New Post'}
|
||||||
|
<!-- - {$idaa_slct.post_obj?.id ?? 'Not Yet Saved'} -->
|
||||||
|
</span>
|
||||||
|
{#if $idaa_slct.post_obj?.topic_id}<span class="badge badge-info variant-glass-secondary"><span class="fas fa-user-md m-1"></span> {$idaa_slct.post_obj?.topic_name}</span>{/if}
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="post__content space-y-2">
|
<div class="post__content space-y-2">
|
||||||
<pre class="post__content p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal whitespace-pre-wrap">{@html $idaa_slct.post_obj.content}</pre>
|
<pre class="post__content p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal whitespace-pre-wrap">{@html $idaa_slct.post_obj.content}</pre>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user