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="showExtras">
|
||||||
<ng-container *ngIf="!hiddenReason">
|
<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>
|
<label [translate]="'edit-redaction.dialog.content.reason'"></label>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select
|
<mat-select
|
||||||
|
|||||||
@ -63,14 +63,10 @@ export class EditRedactionDialogComponent
|
|||||||
get disabled() {
|
get disabled() {
|
||||||
return (
|
return (
|
||||||
this.form.invalid ||
|
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() {
|
get someSkipped() {
|
||||||
return this.data.annotations.some(annotation => annotation.isSkipped);
|
return this.data.annotations.some(annotation => annotation.isSkipped);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user