From 510f5e9dddc9ee0dcce74a3991c34de196bc7d2b Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 8 Oct 2025 00:47:17 +0200 Subject: [PATCH] fix: update to set to hold the value of id in a varable to be able to use form fields --- .../wwwroot/js/annotation.js | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/EnvelopeGenerator.Web/wwwroot/js/annotation.js b/EnvelopeGenerator.Web/wwwroot/js/annotation.js index f5f07da8..63eba1ac 100644 --- a/EnvelopeGenerator.Web/wwwroot/js/annotation.js +++ b/EnvelopeGenerator.Web/wwwroot/js/annotation.js @@ -17,8 +17,9 @@ async function createAnnotations(document, envelopeId, receiverId) { const page = element.page - 1 //#region signatures + const id = generateId(envelopeId, receiverId, 'signature'); const annotation = new PSPDFKit.Annotations.WidgetAnnotation({ - id: generateId(envelopeId, receiverId, 'signature'), + id: id, pageIndex: page, formFieldName: id, backgroundColor: PSPDFKit.Color.LIGHT_YELLOW, @@ -33,8 +34,9 @@ async function createAnnotations(document, envelopeId, receiverId) { //#endregion //#region position + const id_position = generateId(envelopeId, receiverId, 'position'); const annotation_position = new PSPDFKit.Annotations.WidgetAnnotation({ - id: generateId(envelopeId, receiverId, 'position'), + id: id_position, pageIndex: page, formFieldName: id_position, backgroundColor: PSPDFKit.Color.DarkBlue, @@ -52,8 +54,9 @@ async function createAnnotations(document, envelopeId, receiverId) { //#endregion //#region city + const id_city = generateId(envelopeId, receiverId, 'city'); const annotation_city = new PSPDFKit.Annotations.WidgetAnnotation({ - id: generateId(envelopeId, receiverId, 'city'), + id: id_city, pageIndex: page, formFieldName: id_city, backgroundColor: PSPDFKit.Color.DarkBlue, @@ -71,8 +74,9 @@ async function createAnnotations(document, envelopeId, receiverId) { //#endregion //#region date + const id_date = generateId(envelopeId, receiverId, 'date'); const annotation_date = new PSPDFKit.Annotations.WidgetAnnotation({ - id: generateId(envelopeId, receiverId, 'date'), + id: id_date, pageIndex: page, formFieldName: id_date, backgroundColor: PSPDFKit.Color.DarkBlue, @@ -98,8 +102,9 @@ async function createAnnotations(document, envelopeId, receiverId) { this.markFieldAsCity(formFieldCity); //#region date label + const id_date_label = generateId(envelopeId, receiverId, 'date_label'); const annotation_date_label = new PSPDFKit.Annotations.WidgetAnnotation({ - id: generateId(envelopeId, receiverId, 'date_label'), + id: id_date_label, pageIndex: page, formFieldName: id_date_label, blendMode: 'normal', @@ -120,8 +125,9 @@ async function createAnnotations(document, envelopeId, receiverId) { //#endregion //#region city label + const id_city_label = generateId(envelopeId, receiverId, 'city_label'); const annotation_city_label = new PSPDFKit.Annotations.WidgetAnnotation({ - id: generateId(envelopeId, receiverId, 'city_label'), + id: id_city_label, pageIndex: page, formFieldName: id_city_label, blendMode: 'normal', @@ -142,8 +148,9 @@ async function createAnnotations(document, envelopeId, receiverId) { //#endregion //#region position label + const id_position_label = generateId(envelopeId, receiverId, 'position_label'); const annotation_position_label = new PSPDFKit.Annotations.WidgetAnnotation({ - id: generateId(envelopeId, receiverId, 'position_label'), + id: id_position_label, pageIndex: page, formFieldName: id_position_label, blendMode: 'normal',