RED-3515 -> changed selected value input field with textarea
This commit is contained in:
parent
68d273d25f
commit
8e0b21c4a9
@ -7,7 +7,7 @@
|
||||
<div class="iqser-input-group w-400">
|
||||
<label translate="manual-annotation.dialog.content.text"></label>
|
||||
<div class="flex-align-items-center" *ngIf="!isEditingSelectedText">
|
||||
{{ data.manualRedactionEntryWrapper.manualRedactionEntry.value }}
|
||||
{{ form.get('selectedText').value }}
|
||||
<iqser-circle-button
|
||||
*ngIf="isDictionaryRequest"
|
||||
(action)="isEditingSelectedText = true"
|
||||
@ -17,14 +17,15 @@
|
||||
tooltipPosition="below"
|
||||
></iqser-circle-button>
|
||||
</div>
|
||||
<iqser-input-with-action
|
||||
<textarea
|
||||
*ngIf="isEditingSelectedText"
|
||||
(action)="isEditingSelectedText = false"
|
||||
[(value)]="data.manualRedactionEntryWrapper.manualRedactionEntry.value"
|
||||
[placeholder]="'manual-annotation.dialog.content.selected-text' | translate"
|
||||
icon="iqser:check"
|
||||
width="full"
|
||||
></iqser-input-with-action>
|
||||
formControlName="selectedText"
|
||||
iqserHasScrollbar
|
||||
name="comment"
|
||||
rows="4"
|
||||
type="text"
|
||||
>
|
||||
</textarea>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme
|
||||
}
|
||||
|
||||
get disabled() {
|
||||
return this.form.invalid || this.isEditingSelectedText;
|
||||
return this.form.invalid;
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
@ -104,6 +104,7 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme
|
||||
|
||||
private _getForm(): FormGroup {
|
||||
return this._formBuilder.group({
|
||||
selectedText: this.data?.manualRedactionEntryWrapper?.manualRedactionEntry?.value,
|
||||
section: [null],
|
||||
reason: this.isDictionaryRequest ? [null] : [null, Validators.required],
|
||||
dictionary: this.isDictionaryRequest
|
||||
@ -131,6 +132,8 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme
|
||||
const commentValue = this.form.get('comment').value;
|
||||
addRedactionRequest.comment = commentValue ? { text: commentValue } : null;
|
||||
addRedactionRequest.section = this.form.get('section').value;
|
||||
addRedactionRequest.value = addRedactionRequest.rectangle ? this.form.get('classification').value : addRedactionRequest.value;
|
||||
addRedactionRequest.value = addRedactionRequest.rectangle
|
||||
? this.form.get('classification').value
|
||||
: this.form.get('selectedText').value;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user