Skip to content

Commit a6bf9f3

Browse files
committed
fix(SignFileService): include placed elements when signer submits no image
When canCreateSignature is true but the signer performs a clickToSign (no drawn image submitted), the DB file element was silently skipped, producing an empty visibleElements list and no stamp on the document. Include the element with an empty tempFile so the admin background image (n0 layer) is still rendered in the signature stamp. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 893bb99 commit a6bf9f3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/Service/SignFileService.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@ public function setVisibleElements(array $list): self {
286286
}
287287
$element = $this->array_find($list, fn (array $element): bool => ($element['documentElementId'] ?? '') === $fileElementId);
288288
if (!$element) {
289+
// No user-submitted image for this element (e.g. clickToSign).
290+
// Still include the file element so the admin background image (n0 layer)
291+
// is rendered in the signature stamp on the document.
292+
$newElements[$fileElementId] = new VisibleElementAssoc($fileElement);
289293
continue;
290294
}
291295
$nodeId = $this->getNodeId($element, $fileElement);

0 commit comments

Comments
 (0)