More tweaks
[moodle.git] / auth / pop3 / config.html
index 97fb3d3..9e42e35 100644 (file)
@@ -1,32 +1,45 @@
-<tr valign="top">
+<?PHP
+    if (!isset($config->auth_pop3host)) {
+        $config->auth_pop3host = "127.0.0.1";
+    }
+    if (!isset($config->auth_pop3type)) {
+        $config->auth_pop3type = "pop3";
+    }
+    if (!isset($config->auth_pop3port)) {
+        $config->auth_pop3port = "110";
+    }
+?>
+<tr valign="top" BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_pop3host:</TD>
        <TD>
         <INPUT name=auth_pop3host TYPE=text SIZE=30 VALUE="<?=$config->auth_pop3host?>">
-       <? formerr($err["ldap_host_url"]); ?>
+       <? if (isset($err["auth_pop3host"])) formerr($err["auth_pop3host"]); ?>
        </TD>
     <TD>
     <? print_string("auth_pop3host","auth") ?>
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_pop3type:</TD>
        <TD>
     <? $pop3types = array("pop3","pop3cert");
-       choose_from_menu($pop3types, "auth_pop3type", $config->auth_pop3type, "");
+       foreach($pop3types as $pop3type) {
+           $pop3options[$pop3type] = $pop3type;
+       }
+       choose_from_menu($pop3options, "auth_pop3type", $config->auth_pop3type, "");
     ?>
-    <? formerr($err["auth_pop3type"]); ?>
     </TD>
 <TD>
     <? print_string("auth_pop3type","auth") ?>
     </TD>
 </TR>
 
-<TR VALIGN=TOP>
+<TR VALIGN=TOP BGCOLOR="<?=$THEME->cellheading2 ?>">
        <TD ALIGN=RIGHT><P>auth_pop3port:</TD>
        <TD>
     <INPUT name=auth_pop3port TYPE=text SIZE=6 VALUE="<?=$config->auth_pop3port?>">
-    <? formerr($err["auth_pop3port"]); ?>
+    <? if (isset($err["auth_pop3port"])) formerr($err["auth_pop3port"]); ?>
     </TD>
     <TD>
     <? print_string("auth_pop3port","auth") ?>
@@ -34,7 +47,7 @@
 </TR>
 
 <TR VALIGN=TOP>
-       <TD ALIGN=RIGHT><P>auth_instructions:</TD>
+       <TD ALIGN=RIGHT><P><? print_string("instructions", "auth") ?>:</TD>
        <TD>
     <TEXTAREA NAME=auth_instructions COLS=30 ROWS=10 WRAP=virtual><? p($config->auth_instructions) ?></TEXTAREA> 
     </TD>