don't force old subscriptions value when posting
authorJoey Hess <joey@kitenet.net>
Thu, 29 Mar 2012 00:45:52 +0000 (20:45 -0400)
committerJoey Hess <joey@kitenet.net>
Thu, 29 Mar 2012 00:45:52 +0000 (20:45 -0400)
IkiWiki/Plugin/notifyemail.pm

index 926761d94422add49c2b56e052edee84aad0c42c..0c067270cf6e9c4c1bd70baffa96d1c42be0ccb6 100644 (file)
@@ -28,8 +28,11 @@ sub formbuilder_setup (@) {
        my $session=$params{session};
        $form->field(name => "subscriptions", size => 50,
                fieldset => "preferences",
-               comment => "(".htmllink("", "", "ikiwiki/PageSpec", noimageinline => 1).")",
-               value => getsubscriptions($session->param("name")));
+               comment => "(".htmllink("", "", "ikiwiki/PageSpec", noimageinline => 1).")");
+       if (! $form->submitted) {
+               $form->field(name => "subscriptions", force => 1,
+                       value => getsubscriptions($session->param("name")));
+       }
 }
 
 sub formbuilder (@) {