Added missed clone mode conditionals and fixed add/edit state bug (#385)
This commit is contained in:
parent
11f39fe781
commit
5254c5ae59
|
@ -237,12 +237,13 @@
|
|||
<input id="favorite" type="checkbox" name="Favorite" [(ngModel)]="cipher.favorite">
|
||||
</div>
|
||||
<a class="box-content-row box-content-row-flex text-default" href="#" appStopClick appBlurClick
|
||||
(click)="attachments()" *ngIf="editMode" role="button">
|
||||
(click)="attachments()" *ngIf="editMode && !cloneMode" role="button">
|
||||
<div class="row-main">{{'attachments' | i18n}}</div>
|
||||
<i class="fa fa-chevron-right row-sub-icon" aria-hidden="true"></i>
|
||||
</a>
|
||||
<a class="box-content-row box-content-row-flex text-default" href="#" appStopClick appBlurClick
|
||||
(click)="editCollections()" *ngIf="editMode && !cloneMode && cipher.organizationId" role="button">
|
||||
(click)="editCollections()" *ngIf="editMode && !cloneMode && cipher.organizationId"
|
||||
role="button">
|
||||
<div class="row-main">{{'collections' | i18n}}</div>
|
||||
<i class="fa fa-chevron-right row-sub-icon" aria-hidden="true"></i>
|
||||
</a>
|
||||
|
@ -361,4 +362,4 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
|
@ -36,6 +36,11 @@ export class AddEditComponent extends BaseAddEditComponent implements OnChanges
|
|||
|
||||
async ngOnChanges() {
|
||||
await super.init();
|
||||
await super.load();
|
||||
await this.load();
|
||||
}
|
||||
|
||||
async load() {
|
||||
this.cipher = null;
|
||||
super.load();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -611,7 +611,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
private dirtyInput(): boolean {
|
||||
return (this.action === 'add' || this.action === 'edit') &&
|
||||
return (this.action === 'add' || this.action === 'edit' || this.action === 'clone') &&
|
||||
document.querySelectorAll('app-vault-add-edit .ng-dirty').length > 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue