Item13942: suggested new feature to allow multiple signatures from viewers
Priority: Enhancement
Current State: Needs Developer
Released In: n/a
Target Release:
I needed to be able to add a simple macro to a page, to allow the page to be signed by people reading it. For example a policy document that we want to record that someone has read and agreed to. This
SignaturePlugin seemed to be the closest, but it only allowed people with change permission to sign and once anyone had signed, the Sign box disappeared, whereas I wanted other readers to also be able to sign.
I have done a couple of changes to allow this. Firstly I have added an extra plugin preference: SIGNATUREPERMISSION, which can be set to change or view and I have allowed the SIGNATURE FORMAT to include %SIGNATURE%, so that the Sign box is still present for the next person. For example:
SIGNATUREFORMAT = %SIGNATURE%\n| !$wikiname | $date |
The diff for these changes in
SignaturePlugin/Signature.pm is as follows:
111a112
> $fmt =~ s/%<nop>SIGNATURE%/%SIGNATURE%/go;
119a121,124
> my $permission = Foswiki::Func::getPreferencesValue(
> "\U$Foswiki::Plugins::SignaturePlugin::pluginName\E_SIGNATUREPERMISSION")
> || "change";
>
122c127
< "change", $user, "", $theTopic, $theWeb
---
> $permission, $user, "", $theTopic, $theWeb
</verbatimm>
%COMMENT%