[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
Draft
[stable33] fix: do not hide the signature position step when the stamp still renders#7997backportbot-libresign[bot] wants to merge 11 commits into
backportbot-libresign[bot] wants to merge 11 commits into
Conversation
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]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #7991
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.