Skip to content

[stable33] fix: do not hide the signature position step when the stamp still renders - #7997

Draft
backportbot-libresign[bot] wants to merge 11 commits into
stable33from
backport/7991/stable33
Draft

[stable33] fix: do not hide the signature position step when the stamp still renders#7997
backportbot-libresign[bot] wants to merge 11 commits into
stable33from
backport/7991/stable33

Conversation

@backportbot-libresign

@backportbot-libresign backportbot-libresign Bot commented Aug 19, 2026

Copy link
Copy Markdown

Backport of #7991

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Remove all the empty commits
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Guard SignatureTextService::isEnabled(), which decides half of
isSignElementsAvailable(): an empty signature stamp template silently
disables the signature positioning step in the request flow.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Assert that the sign-elements capability drives showSaveButton, that the
request button stays available when positioning is not, and that saving a
draft opens the visible elements editor.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
isSignElementsAvailable() only looked at the signature background and the
text template, so removing both hid the whole signature positioning step
even when the stamp still had content to draw. JSignPdfHandler already
covers those cases: with a deleted background it uses the signer drawn
signature as background, and in SIGNAME_AND_DESCRIPTION it renders the
signer common name as an image.

Only the description-only mode has nothing left to render once background
and template are gone, so make that the single unavailable case.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
ValidateHelper never checked isSignElementsAvailable(), so a direct API call
created visible elements while the interface reported the feature as
disabled. Empty lists stay accepted because deletion goes through the
file-element endpoint.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Visible elements saved earlier keep being applied at signing time, so the
entry point must stay available even when the capability turned off, and
the button label moves to the script so each string carries its own
TRANSLATORS comment.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Elements placed before the capability was disabled could not be reviewed or
removed through any interface. Open the editor whenever the document still
has elements, keeping saving and new placements disabled.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>

[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 0. Backlog

Development

Successfully merging this pull request may close these issues.

1 participant