]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/passwordauth.pm
further refinement
[git.ikiwiki.info.git] / IkiWiki / Plugin / passwordauth.pm
index 03000c8004bd0ae0ad5187d4cba399f5d80cc8e0..e0aa72a196152e3c38d2d6bf74fbe64fc75854e7 100644 (file)
@@ -21,7 +21,7 @@ sub formbuilder_setup (@) { #{{{
        my $cgi=$params{cgi};
 
        if ($form->title eq "signin" || $form->title eq "register") {
-               $form->field(name => "name", required => 0, size => 30);
+               $form->field(name => "name", required => 0, size => 50);
                $form->field(name => "password", type => "password", required => 0);
                
                if ($form->submitted eq "Register" || $form->submitted eq "Create Account") {
@@ -101,7 +101,7 @@ sub formbuilder_setup (@) { #{{{
                }
                else {
                        # First time settings.
-                       $form->field(name => "name", comment => "use FirstnameLastName");
+                       $form->field(name => "name", comment => gettext("(use FirstnameLastName)"));
                        if ($session->param("name")) {
                                $form->field(name => "name", value => $session->param("name"));
                        }
@@ -141,10 +141,10 @@ sub formbuilder (@) { #{{{
                                        'regdate' => time})) {
                                        $form->field(name => "confirm_password", type => "hidden");
                                        $form->field(name => "email", type => "hidden");
-                                       $form->text("Account creation successful. Now you can Login.");
+                                       $form->text(gettext("Account creation successful. Now you can Login."));
                                }
                                else {
-                                       error("Error creating account.");
+                                       error(gettext("Error creating account."));
                                }
                        }
                        elsif ($form->submitted eq 'Mail Password') {
@@ -165,9 +165,9 @@ sub formbuilder (@) { #{{{
                                        From => "$config{wikiname} admin <$config{adminemail}>",
                                        Subject => "$config{wikiname} information",
                                        Message => $template->output,
-                               ) or error("Failed to send mail");
+                               ) or error(gettext("Failed to send mail"));
                        
-                               $form->text("Your password has been emailed to you.");
+                               $form->text(gettext("Your password has been emailed to you."));
                                $form->field(name => "name", required => 0);
                                push @$buttons, "Mail Password";
                        }
@@ -187,7 +187,8 @@ sub formbuilder (@) { #{{{
                        my $user_name=$form->field('name');
                        foreach my $field (qw(password)) {
                                if (defined $form->field($field) && length $form->field($field)) {
-                                       userinfo_set($user_name, $field, $form->field($field)) || error("failed to set $field");
+                                       IkiWiki::userinfo_set($user_name, $field, $form->field($field)) ||
+                                               error("failed to set $field");
                                }
                        }
                }