mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
[PM-24304][PM-24305] - [Defect] Some fields are not disabled when editing an item from My Vault (#15982)
* disable all remaining form fields for editing personally owned My Items * fix failing tests * ensure collection field is also properly disabled * clean up logic * fix failing test * fix test * refactor variable to avoid using `is` prefix * directly reference parent form for status rather than subscribe to it * refactor subscription for form status changes * use observable as an Output * disable attachment button on desktop vault when the form * disable custom field components when custom fields already exist and parent form is disabled * disable attachments button in the browser when the edit form is disabled * grab icon button instance for disabled state --------- Co-authored-by: Nick Krantz <nick@livefront.com>
This commit is contained in:
@@ -93,6 +93,7 @@
|
||||
bitIconButton="bwi-pencil-square"
|
||||
class="tw-self-center tw-mt-2"
|
||||
data-testid="edit-custom-field-button"
|
||||
[disabled]="parentFormDisabled"
|
||||
*ngIf="canEdit(field.value.type)"
|
||||
></button>
|
||||
|
||||
@@ -104,6 +105,7 @@
|
||||
[label]="'reorderToggleButton' | i18n: field.value.name"
|
||||
(keydown)="handleKeyDown($event, field.value.name, i)"
|
||||
data-testid="reorder-toggle-button"
|
||||
[disabled]="parentFormDisabled"
|
||||
*ngIf="canEdit(field.value.type)"
|
||||
></button>
|
||||
</div>
|
||||
@@ -113,7 +115,8 @@
|
||||
bitLink
|
||||
linkType="primary"
|
||||
(click)="openAddEditCustomFieldDialog()"
|
||||
*ngIf="!isPartialEdit"
|
||||
data-testid="add-field-button"
|
||||
*ngIf="!isPartialEdit && !parentFormDisabled"
|
||||
>
|
||||
<i class="bwi bwi-plus tw-font-bold" aria-hidden="true"></i>
|
||||
{{ "addField" | i18n }}
|
||||
|
||||
Reference in New Issue
Block a user