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 {
418
418
->setPassword ($ this ->getPassword ())
419
419
->setSignatureParams ($ this ->getSignatureParams ())
420
420
->setVisibleElements ($ this ->getVisibleElements ())
421
+ ->setReason ($ this ->getReason ())
421
422
->getSignedContent ();
422
423
$ this ->getInputFile ()->putContent ($ signedContent );
423
424
return $ this ->getInputFile ();
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ abstract class SignEngineHandler implements ISignEngineHandler {
16
16
private File $ inputFile ;
17
17
protected string $ certificate ;
18
18
private string $ password = '' ;
19
+ private string $ reason = '' ;
19
20
/** @var VisibleElementAssoc[] */
20
21
private array $ visibleElements = [];
21
22
private array $ signatureParams = [];
@@ -59,6 +60,15 @@ public function getPassword(): string {
59
60
return $ this ->password ;
60
61
}
61
62
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
+
62
72
/**
63
73
* @param VisibleElementAssoc[] $visibleElements
64
74
*
Original file line number Diff line number Diff line change @@ -300,6 +300,9 @@ public function sign(): File {
300
300
->setVisibleElements ($ this ->elements )
301
301
->setPassword ($ this ->password )
302
302
->setSignatureParams ($ signatureParams )
303
+ ->setReason ($ this ->l10n ->t ('Signed by %s with LibreSign.coop ' , [
304
+ $ this ->signRequest ->getDisplayName () . ' < ' . $ this ->userUniqueIdentifier . '> '
305
+ ]))
303
306
->sign ();
304
307
break ;
305
308
default :
You can’t perform that action at this time.
0 commit comments