summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-29 21:57:25 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-29 21:57:25 +0000
commit93c6d2c340b9529eedf611d6e753030cc9c29ae9 (patch)
tree85d7b2b4fa5082fb804fdcdb2cf6958b3ac9b0ac /IkiWiki
parente97b63c95aad40de6498bd480a38d7a57764ad53 (diff)
* Use fieldsets in the preferences form to group related options together.
Especially cleans up the ordering of the admin's preferences form.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/CGI.pm11
-rw-r--r--IkiWiki/Plugin/lockedit.pm1
-rw-r--r--IkiWiki/Plugin/openid.pm6
-rw-r--r--IkiWiki/Plugin/passwordauth.pm9
4 files changed, 20 insertions, 7 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 2b7727000..b1caff96d 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -218,6 +218,11 @@ sub cgi_prefs ($$) { #{{{
action => $config{cgiurl},
template => scalar template_params("prefs.tmpl"),
stylesheet => baseurl()."style.css",
+ fieldsets => [
+ [login => gettext("Login")],
+ [preferences => gettext("Preferences")],
+ [admin => gettext("Admin")]
+ ],
);
my $buttons=["Save Preferences", "Logout", "Cancel"];
@@ -226,10 +231,12 @@ sub cgi_prefs ($$) { #{{{
});
$form->field(name => "do", type => "hidden");
- $form->field(name => "email", size => 50);
+ $form->field(name => "email", size => 50, fieldset => "preferences");
$form->field(name => "subscriptions", size => 50,
+ fieldset => "preferences",
comment => "(".htmllink("", "", "PageSpec", noimageinline => 1).")");
- $form->field(name => "banned_users", size => 50);
+ $form->field(name => "banned_users", size => 50,
+ fieldset => "admin");
my $user_name=$session->param("name");
if (! is_admin($user_name)) {
diff --git a/IkiWiki/Plugin/lockedit.pm b/IkiWiki/Plugin/lockedit.pm
index 13df5632f..742fd41f6 100644
--- a/IkiWiki/Plugin/lockedit.pm
+++ b/IkiWiki/Plugin/lockedit.pm
@@ -40,6 +40,7 @@ sub formbuilder_setup (@) { #{{{
if ($form->title eq "preferences") {
$form->field(name => "locked_pages", size => 50,
+ fieldset => "admin",
comment => "(".htmllink("", "", "PageSpec", noimageinline => 1).")");
if (! IkiWiki::is_admin($user_name)) {
$form->field(name => "locked_pages", type => "hidden");
diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm
index 34cd157f5..8bf3f63fd 100644
--- a/IkiWiki/Plugin/openid.pm
+++ b/IkiWiki/Plugin/openid.pm
@@ -58,8 +58,10 @@ sub formbuilder_setup (@) { #{{{
}
elsif ($form->title eq "preferences") {
if (! defined $form->field(name => "name")) {
- $form->field(name => "OpenID", disabled => 1, value =>
- $session->param("name"), size => 50, force => 1);
+ $form->field(name => "OpenID", disabled => 1,
+ value => $session->param("name"),
+ size => 50, force => 1,
+ fieldset => "login");
}
}
}
diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm
index 131b3a43e..baa84c858 100644
--- a/IkiWiki/Plugin/passwordauth.pm
+++ b/IkiWiki/Plugin/passwordauth.pm
@@ -108,10 +108,13 @@ sub formbuilder_setup (@) { #{{{
}
}
elsif ($form->title eq "preferences") {
- $form->field(name => "name", disabled => 1, value =>
- $session->param("name"), force => 1);
- $form->field(name => "password", type => "password");
+ $form->field(name => "name", disabled => 1,
+ value => $session->param("name"), force => 1,
+ fieldset => "login");
+ $form->field(name => "password", type => "password",
+ fieldset => "login");
$form->field(name => "confirm_password", type => "password",
+ fieldset => "login",
validate => sub {
shift eq $form->field("password");
});