- if (defined $username && IkiWiki::Plugin::notifyemail->can("subscribe")) {
- $form->field(name => "subscribe",
- options => [gettext("email replies to me")]);
- }
- else {
- $form->field(name => "subscribe", type => 'hidden');
+
+ $form->field(name => "subscribe", type => 'hidden');
+ $form->field(name => "anonsubscribe", type => 'hidden');
+ if (IkiWiki::Plugin::notifyemail->can("subscribe")) {
+ if (defined $username) {
+ $form->field(name => "subscribe", type => "checkbox",
+ options => [gettext("email replies to me")]);
+ }
+ elsif (IkiWiki::Plugin::passwordauth->can("anonuser")) {
+ $form->field(name => "anonsubscribe", type => "checkbox",
+ options => [gettext("email replies to me")]);
+ }