2 # Defines editors for imagemap directives
4 sub mod_imap_directives
6 $rv = [ [ 'ImapMenu', 0, 20, 'virtual directory htaccess' ],
7 [ 'ImapDefault', 0, 20, 'virtual directory htaccess' ],
8 [ 'ImapBase', 0, 20, 'virtual directory htaccess' ] ];
9 return &make_directives($rv, $_[0], "mod_imap");
19 return (2, "$text{'mod_imap_action'}",
20 &select_input($_[0]->{'value'}, "ImapMenu", "", "$text{'mod_imap_default'},",
21 "$text{'mod_imap_godefurl'},none", "$text{'mod_imap_form'},formatted",
22 "$text{'mod_imap_semiform'},semiformatted",
23 "$text{'mod_imap_unform'},unformatted"));
27 return &parse_select("ImapMenu", "");
33 if ($_[0]->{'value'} =~ /^\S+:/) { $v = "url"; }
34 else { $v = $_[0]->{'value'}; }
35 $rv = &select_input($v, "ImapDefault", "", "$text{'mod_imap_default'},",
36 "$text{'mod_imap_disperr'},error", "$text{'mod_imap_donoth'},nocontent",
37 "$text{'mod_imap_goimap'},map", "$text{'mod_imap_goref'},referer",
38 "$text{'mod_imap_gourl'},url");
39 $rv .= sprintf " <input name=ImapDefault_url size=30 value=\"%s\">\n",
40 $v eq "url" ? $_[0]->{'value'} : "";
41 return (2, "$text{'mod_imap_defact'}", $rv);
45 if ($in{'ImapDefault'} eq "") { return ( [ ] ); }
46 elsif ($in{'ImapDefault'} ne "url") { return ( [ $in{'ImapDefault'} ] ); }
47 elsif ($in{'ImapDefault_url'} !~ /^\S+$/) {
48 &error(&text('mod_imap_eurl', $in{'ImapDefault_url'}));
50 else { return ( [ $in{'ImapDefault_url'} ] ); }
56 if ($_[0]->{'value'} =~ /^\S+:/) { $v = "url"; }
57 else { $v = $_[0]->{'value'}; }
58 $rv = &select_input($v, "ImapBase", "", "$text{'mod_imap_default2'},",
59 "$text{'mod_imap_root'},root", "$text{'mod_imap_imapurl'},map",
60 "$text{'mod_imap_refurl'},referer", "$text{'mod_imap_url'},url");
61 $rv .= sprintf " <input name=ImapBase_url size=30 value=\"%s\">\n",
62 $v eq "url" ? $_[0]->{'value'} : "";
63 return (2, "$text{'mod_imap_defbase'}", $rv);
67 if ($in{'ImapBase'} eq "") { return ( [ ] ); }
68 elsif ($in{'ImapBase'} ne "url") { return ( [ $in{'ImapBase'} ] ); }
69 elsif ($in{'ImapBase_url'} !~ /^\S+$/) {
70 &error(&text('mod_imap_eurl', $in{'ImapBase_url'}));
72 else { return ( [ $in{'ImapBase_url'} ] ); }