diff --git a/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.html b/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.html index e6b7bcc50..016a41f14 100644 --- a/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.html +++ b/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.html @@ -83,6 +83,8 @@ (createNew)="createField($event)" title="Field" i18n-title + placeholder="Choose a field" + i18n-placeholder hint="Where the extracted value is written." i18n-hint > diff --git a/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.spec.ts b/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.spec.ts index b205ed504..027b08de8 100644 --- a/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.spec.ts +++ b/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.spec.ts @@ -203,6 +203,7 @@ describe('OcrTemplateEditorComponent', () => { y: 100, width: 900, height: 150, + custom_field: null, }) expect(component.selectedZoneIndex).toBe(0) }) diff --git a/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.ts b/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.ts index 75c2d47e3..a611b643f 100644 --- a/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.ts +++ b/src-ui/src/app/components/manage/ocr-templates/ocr-template-editor/ocr-template-editor.component.ts @@ -616,7 +616,7 @@ export class OcrTemplateEditorComponent implements OnInit, OnDestroy { return { name: `Zone ${this.template.zones.length + 1}`, target: DEFAULT_OCR_ZONE_TARGET, - custom_field: this.defaultCustomFieldId(), + custom_field: null, x: rect.x, y: rect.y, width: rect.w, @@ -632,10 +632,6 @@ export class OcrTemplateEditorComponent implements OnInit, OnDestroy { } } - private defaultCustomFieldId(): number | null { - return this.customFields[0]?.id ?? null - } - onOverlayPointerCancel(event: PointerEvent) { if (this.overlayInteraction.kind === 'idle') return if (this.overlayInteraction.pointerId !== event.pointerId) return