Merge branch 'RED-7762' into 'master'

RED-7762: fixed asterisk and invalid form conditions.

See merge request redactmanager/red-ui!217
This commit is contained in:
Dan Percic 2023-12-06 11:38:14 +01:00
commit af33a91941
2 changed files with 2 additions and 6 deletions

View File

@ -40,7 +40,7 @@
<ng-container *ngIf="showExtras">
<ng-container *ngIf="!hiddenReason">
<div [class.required]="!someSkipped" class="iqser-input-group w-450">
<div [class.required]="!form.controls.reason.disabled" class="iqser-input-group w-450">
<label [translate]="'edit-redaction.dialog.content.reason'"></label>
<mat-form-field>
<mat-select

View File

@ -63,14 +63,10 @@ export class EditRedactionDialogComponent
get disabled() {
return (
this.form.invalid ||
(!this.isImage && this.showExtras && (!this.allSkipped || this.isRedactBasedType) ? !this.form.controls.reason.value : false)
(!this.isImage && this.showExtras && !this.form.controls.reason.disabled ? !this.form.controls.reason.value : false)
);
}
get allSkipped() {
return this.data.annotations.every(annotation => annotation.isSkipped);
}
get someSkipped() {
return this.data.annotations.some(annotation => annotation.isSkipped);
}