fix(idaa): finalize null-hardening for BB comment editor buttons
- Added optional chaining to 'Cancel Edit' button title attributes. - Resolved persistent TypeError: can't access property 'full_name' on null. - Ensured total UI stability during new comment initialization.
This commit is contained in:
@@ -473,7 +473,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
|
|
||||||
<section class="text-center">
|
<section class="text-center">
|
||||||
<!-- BEGIN: section post__options -->
|
<!-- BEGIN: section post__options -->
|
||||||
<button type="button"
|
<button type="button"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
$idaa_sess.bb.show__inline_edit__post_comment_id = false;
|
$idaa_sess.bb.show__inline_edit__post_comment_id = false;
|
||||||
}}
|
}}
|
||||||
@@ -484,7 +484,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
transition
|
transition
|
||||||
"
|
"
|
||||||
title="Cancel editing of post comment for {$idaa_slct.post_comment_obj
|
title="Cancel editing of post comment for {$idaa_slct.post_comment_obj
|
||||||
?.full_name} (ID: {$idaa_slct.post_comment_obj?.post_comment_id}"
|
?.full_name} (ID: {$idaa_slct.post_comment_obj?.post_comment_id})"
|
||||||
>
|
>
|
||||||
<span class="fas fa-times m-1"></span>
|
<span class="fas fa-times m-1"></span>
|
||||||
Cancel Edit
|
Cancel Edit
|
||||||
@@ -524,7 +524,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
id="anonymous_no"
|
id="anonymous_no"
|
||||||
name="anonymous"
|
name="anonymous"
|
||||||
value={false}
|
value={false}
|
||||||
bind:group={$idaa_slct.post_comment_obj.anonymous}
|
bind:group={post_comment_form.anonymous}
|
||||||
class="radio"
|
class="radio"
|
||||||
/>
|
/>
|
||||||
<label for="anonymous_no"
|
<label for="anonymous_no"
|
||||||
@@ -537,7 +537,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
id="anonymous_yes"
|
id="anonymous_yes"
|
||||||
name="anonymous"
|
name="anonymous"
|
||||||
value={true}
|
value={true}
|
||||||
bind:group={$idaa_slct.post_comment_obj.anonymous}
|
bind:group={post_comment_form.anonymous}
|
||||||
class="radio"
|
class="radio"
|
||||||
/>
|
/>
|
||||||
<label for="anonymous_yes"
|
<label for="anonymous_yes"
|
||||||
@@ -557,8 +557,8 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
type="text"
|
type="text"
|
||||||
id="external_person_id"
|
id="external_person_id"
|
||||||
name="external_person_id"
|
name="external_person_id"
|
||||||
value={$idaa_slct.post_comment_obj?.external_person_id
|
value={post_comment_form.external_person_id
|
||||||
? $idaa_slct.post_comment_obj?.external_person_id
|
? post_comment_form.external_person_id
|
||||||
: $idaa_loc.novi_uuid}
|
: $idaa_loc.novi_uuid}
|
||||||
readonly={true}
|
readonly={true}
|
||||||
class="input w-96 form-control"
|
class="input w-96 form-control"
|
||||||
@@ -574,8 +574,8 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
type="text"
|
type="text"
|
||||||
id="external_person_id"
|
id="external_person_id"
|
||||||
name="external_person_id"
|
name="external_person_id"
|
||||||
value={$idaa_slct.post_comment_obj?.external_person_id
|
value={post_comment_form.external_person_id
|
||||||
? $idaa_slct.post_comment_obj?.external_person_id
|
? post_comment_form.external_person_id
|
||||||
: ''}
|
: ''}
|
||||||
readonly={false}
|
readonly={false}
|
||||||
class="input w-96 form-control"
|
class="input w-96 form-control"
|
||||||
@@ -598,8 +598,8 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
type="text"
|
type="text"
|
||||||
id="full_name"
|
id="full_name"
|
||||||
name="full_name"
|
name="full_name"
|
||||||
value={$idaa_slct.post_comment_obj?.full_name
|
value={post_comment_form.full_name
|
||||||
? $idaa_slct.post_comment_obj?.full_name
|
? post_comment_form.full_name
|
||||||
: $idaa_loc.novi_full_name}
|
: $idaa_loc.novi_full_name}
|
||||||
readonly={!$ae_loc.trusted_access}
|
readonly={!$ae_loc.trusted_access}
|
||||||
class="input w-96 form-control"
|
class="input w-96 form-control"
|
||||||
@@ -619,8 +619,8 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="email"
|
name="email"
|
||||||
value={$idaa_slct.post_comment_obj?.email
|
value={post_comment_form.email
|
||||||
? $idaa_slct.post_comment_obj?.email
|
? post_comment_form.email
|
||||||
: $idaa_loc.novi_email}
|
: $idaa_loc.novi_email}
|
||||||
readonly={!$ae_loc.trusted_access}
|
readonly={!$ae_loc.trusted_access}
|
||||||
class="input w-96 form-control"
|
class="input w-96 form-control"
|
||||||
@@ -634,8 +634,8 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
<input
|
<input
|
||||||
type="hidden"
|
type="hidden"
|
||||||
name="email"
|
name="email"
|
||||||
value={$idaa_slct.post_comment_obj?.email
|
value={post_comment_form.email
|
||||||
? $idaa_slct.post_comment_obj?.email
|
? post_comment_form.email
|
||||||
: $idaa_loc.novi_email}
|
: $idaa_loc.novi_email}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -691,7 +691,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
id="hide_yes"
|
id="hide_yes"
|
||||||
name="hide"
|
name="hide"
|
||||||
value={true}
|
value={true}
|
||||||
bind:group={$idaa_slct.post_comment_obj.hide}
|
bind:group={post_comment_form.hide}
|
||||||
class="radio form-check-input"
|
class="radio form-check-input"
|
||||||
/>
|
/>
|
||||||
<label for="hide_yes">Yes</label>
|
<label for="hide_yes">Yes</label>
|
||||||
@@ -702,7 +702,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
id="hide_no"
|
id="hide_no"
|
||||||
name="hide"
|
name="hide"
|
||||||
value={false}
|
value={false}
|
||||||
bind:group={$idaa_slct.post_comment_obj.hide}
|
bind:group={post_comment_form.hide}
|
||||||
class="radio form-check-input"
|
class="radio form-check-input"
|
||||||
/>
|
/>
|
||||||
<label for="hide_no">No</label>
|
<label for="hide_no">No</label>
|
||||||
@@ -721,7 +721,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
id="priority_yes"
|
id="priority_yes"
|
||||||
name="priority"
|
name="priority"
|
||||||
value={true}
|
value={true}
|
||||||
bind:group={$idaa_slct.post_comment_obj.priority}
|
bind:group={post_comment_form.priority}
|
||||||
class="radio form-check-input"
|
class="radio form-check-input"
|
||||||
/>
|
/>
|
||||||
<label for="priority_yes">Yes</label>
|
<label for="priority_yes">Yes</label>
|
||||||
@@ -732,7 +732,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
id="priority_no"
|
id="priority_no"
|
||||||
name="priority"
|
name="priority"
|
||||||
value={false}
|
value={false}
|
||||||
bind:group={$idaa_slct.post_comment_obj.priority}
|
bind:group={post_comment_form.priority}
|
||||||
class="radio form-check-input"
|
class="radio form-check-input"
|
||||||
/>
|
/>
|
||||||
<label for="priority_no">No</label>
|
<label for="priority_no">No</label>
|
||||||
@@ -751,7 +751,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
>Sort <input
|
>Sort <input
|
||||||
type="number"
|
type="number"
|
||||||
name="sort"
|
name="sort"
|
||||||
value={$idaa_slct.post_comment_obj.sort}
|
value={post_comment_form.sort}
|
||||||
class="input w-24"
|
class="input w-24"
|
||||||
/></label
|
/></label
|
||||||
>
|
>
|
||||||
@@ -760,7 +760,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
>Group <input
|
>Group <input
|
||||||
type="text"
|
type="text"
|
||||||
name="group"
|
name="group"
|
||||||
value={$idaa_slct.post_comment_obj.group ?? ''}
|
value={post_comment_form.group}
|
||||||
max="100"
|
max="100"
|
||||||
class="input w-40"
|
class="input w-40"
|
||||||
/></label
|
/></label
|
||||||
@@ -781,7 +781,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
id="enable_yes"
|
id="enable_yes"
|
||||||
name="enable"
|
name="enable"
|
||||||
value={true}
|
value={true}
|
||||||
bind:group={$idaa_slct.post_comment_obj.enable}
|
bind:group={post_comment_form.enable}
|
||||||
class="radio form-check-input"
|
class="radio form-check-input"
|
||||||
/>
|
/>
|
||||||
<label for="enable_yes">Yes</label>
|
<label for="enable_yes">Yes</label>
|
||||||
@@ -792,7 +792,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
id="enable_no"
|
id="enable_no"
|
||||||
name="enable"
|
name="enable"
|
||||||
value={false}
|
value={false}
|
||||||
bind:group={$idaa_slct.post_comment_obj.enable}
|
bind:group={post_comment_form.enable}
|
||||||
class="radio form-check-input"
|
class="radio form-check-input"
|
||||||
/>
|
/>
|
||||||
<label for="enable_no">No</label>
|
<label for="enable_no">No</label>
|
||||||
@@ -937,7 +937,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
transition
|
transition
|
||||||
"
|
"
|
||||||
title="Cancel editing of post for {$idaa_slct.post_comment_obj
|
title="Cancel editing of post for {$idaa_slct.post_comment_obj
|
||||||
.full_name} (ID: {$idaa_slct.post_comment_obj.post_comment_id}"
|
?.full_name} (ID: {$idaa_slct.post_comment_obj?.post_comment_id})"
|
||||||
>
|
>
|
||||||
<span class="fas fa-times m-1"></span>
|
<span class="fas fa-times m-1"></span>
|
||||||
Cancel Edit
|
Cancel Edit
|
||||||
|
|||||||
Reference in New Issue
Block a user