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">
|
||||
<!-- BEGIN: section post__options -->
|
||||
<button type="button"
|
||||
<button type="button"
|
||||
onclick={() => {
|
||||
$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
|
||||
"
|
||||
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>
|
||||
Cancel Edit
|
||||
@@ -524,7 +524,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
||||
id="anonymous_no"
|
||||
name="anonymous"
|
||||
value={false}
|
||||
bind:group={$idaa_slct.post_comment_obj.anonymous}
|
||||
bind:group={post_comment_form.anonymous}
|
||||
class="radio"
|
||||
/>
|
||||
<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"
|
||||
name="anonymous"
|
||||
value={true}
|
||||
bind:group={$idaa_slct.post_comment_obj.anonymous}
|
||||
bind:group={post_comment_form.anonymous}
|
||||
class="radio"
|
||||
/>
|
||||
<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"
|
||||
id="external_person_id"
|
||||
name="external_person_id"
|
||||
value={$idaa_slct.post_comment_obj?.external_person_id
|
||||
? $idaa_slct.post_comment_obj?.external_person_id
|
||||
value={post_comment_form.external_person_id
|
||||
? post_comment_form.external_person_id
|
||||
: $idaa_loc.novi_uuid}
|
||||
readonly={true}
|
||||
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"
|
||||
id="external_person_id"
|
||||
name="external_person_id"
|
||||
value={$idaa_slct.post_comment_obj?.external_person_id
|
||||
? $idaa_slct.post_comment_obj?.external_person_id
|
||||
value={post_comment_form.external_person_id
|
||||
? post_comment_form.external_person_id
|
||||
: ''}
|
||||
readonly={false}
|
||||
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"
|
||||
id="full_name"
|
||||
name="full_name"
|
||||
value={$idaa_slct.post_comment_obj?.full_name
|
||||
? $idaa_slct.post_comment_obj?.full_name
|
||||
value={post_comment_form.full_name
|
||||
? post_comment_form.full_name
|
||||
: $idaa_loc.novi_full_name}
|
||||
readonly={!$ae_loc.trusted_access}
|
||||
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
|
||||
type="text"
|
||||
name="email"
|
||||
value={$idaa_slct.post_comment_obj?.email
|
||||
? $idaa_slct.post_comment_obj?.email
|
||||
value={post_comment_form.email
|
||||
? post_comment_form.email
|
||||
: $idaa_loc.novi_email}
|
||||
readonly={!$ae_loc.trusted_access}
|
||||
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
|
||||
type="hidden"
|
||||
name="email"
|
||||
value={$idaa_slct.post_comment_obj?.email
|
||||
? $idaa_slct.post_comment_obj?.email
|
||||
value={post_comment_form.email
|
||||
? post_comment_form.email
|
||||
: $idaa_loc.novi_email}
|
||||
/>
|
||||
{/if}
|
||||
@@ -691,7 +691,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
||||
id="hide_yes"
|
||||
name="hide"
|
||||
value={true}
|
||||
bind:group={$idaa_slct.post_comment_obj.hide}
|
||||
bind:group={post_comment_form.hide}
|
||||
class="radio form-check-input"
|
||||
/>
|
||||
<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"
|
||||
name="hide"
|
||||
value={false}
|
||||
bind:group={$idaa_slct.post_comment_obj.hide}
|
||||
bind:group={post_comment_form.hide}
|
||||
class="radio form-check-input"
|
||||
/>
|
||||
<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"
|
||||
name="priority"
|
||||
value={true}
|
||||
bind:group={$idaa_slct.post_comment_obj.priority}
|
||||
bind:group={post_comment_form.priority}
|
||||
class="radio form-check-input"
|
||||
/>
|
||||
<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"
|
||||
name="priority"
|
||||
value={false}
|
||||
bind:group={$idaa_slct.post_comment_obj.priority}
|
||||
bind:group={post_comment_form.priority}
|
||||
class="radio form-check-input"
|
||||
/>
|
||||
<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
|
||||
type="number"
|
||||
name="sort"
|
||||
value={$idaa_slct.post_comment_obj.sort}
|
||||
value={post_comment_form.sort}
|
||||
class="input w-24"
|
||||
/></label
|
||||
>
|
||||
@@ -760,7 +760,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
||||
>Group <input
|
||||
type="text"
|
||||
name="group"
|
||||
value={$idaa_slct.post_comment_obj.group ?? ''}
|
||||
value={post_comment_form.group}
|
||||
max="100"
|
||||
class="input w-40"
|
||||
/></label
|
||||
@@ -781,7 +781,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
||||
id="enable_yes"
|
||||
name="enable"
|
||||
value={true}
|
||||
bind:group={$idaa_slct.post_comment_obj.enable}
|
||||
bind:group={post_comment_form.enable}
|
||||
class="radio form-check-input"
|
||||
/>
|
||||
<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"
|
||||
name="enable"
|
||||
value={false}
|
||||
bind:group={$idaa_slct.post_comment_obj.enable}
|
||||
bind:group={post_comment_form.enable}
|
||||
class="radio form-check-input"
|
||||
/>
|
||||
<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
|
||||
"
|
||||
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>
|
||||
Cancel Edit
|
||||
|
||||
Reference in New Issue
Block a user