File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -418,6 +418,7 @@ public function sign(): File {
418418 ->setPassword ($ this ->getPassword ())
419419 ->setSignatureParams ($ this ->getSignatureParams ())
420420 ->setVisibleElements ($ this ->getVisibleElements ())
421+ ->setReason ($ this ->getReason ())
421422 ->getSignedContent ();
422423 $ this ->getInputFile ()->putContent ($ signedContent );
423424 return $ this ->getInputFile ();
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ abstract class SignEngineHandler implements ISignEngineHandler {
1616 private File $ inputFile ;
1717 protected string $ certificate ;
1818 private string $ password = '' ;
19+ private string $ reason = '' ;
1920 /** @var VisibleElementAssoc[] */
2021 private array $ visibleElements = [];
2122 private array $ signatureParams = [];
@@ -59,6 +60,15 @@ public function getPassword(): string {
5960 return $ this ->password ;
6061 }
6162
63+ public function setReason (string $ reason ): self {
64+ $ this ->reason = $ reason ;
65+ return $ this ;
66+ }
67+
68+ public function getReason (): string {
69+ return $ this ->reason ;
70+ }
71+
6272 /**
6373 * @param VisibleElementAssoc[] $visibleElements
6474 *
Original file line number Diff line number Diff line change @@ -300,6 +300,9 @@ public function sign(): File {
300300 ->setVisibleElements ($ this ->elements )
301301 ->setPassword ($ this ->password )
302302 ->setSignatureParams ($ signatureParams )
303+ ->setReason ($ this ->l10n ->t ('Signed by %s with LibreSign.coop ' , [
304+ $ this ->signRequest ->getDisplayName () . ' < ' . $ this ->userUniqueIdentifier . '> '
305+ ]))
303306 ->sign ();
304307 break ;
305308 default :
You can’t perform that action at this time.
0 commit comments