RED-7762: fixed asterisk and invalid form conditions.
This commit is contained in:
parent
d363da17fc
commit
5c5f2dcc51
@ -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
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user