Merge branch 'MDL-49671-28' of git://github.com/merrill-oakland/moodle into MOODLE_28...
[moodle.git] / auth / pop3 / config.html
blob1f21e67cdb8557a165198e4fdc99947fce52e3ae
1 <?php
3 // set to defaults if undefined
4 if (!isset($config->host)) {
5 $config->host = '127.0.0.1';
7 if (!isset($config->type)) {
8 $config->type = 'pop3notls';
10 if (!isset($config->port)) {
11 $config->port = '110';
13 if (!isset($config->mailbox)) {
14 $config->mailbox = 'INBOX';
16 if (!isset($config->changepasswordurl)) {
17 $config->changepasswordurl = '';
21 <table cellspacing="0" cellpadding="5" border="0">
23 <tr valign="top" class="required">
24 <td align="right"><label for="host"><?php print_string('auth_pop3host_key', 'auth_pop3') ?>: </label></td>
25 <td>
26 <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
27 <?php
29 if (isset($err['host'])) {
30 echo $OUTPUT->error_text($err['host']);
34 </td>
35 <td>
36 <?php
38 print_string('auth_pop3host', 'auth_pop3');
39 print_string('auth_multiplehosts', 'auth');
42 </td>
43 </tr>
45 <tr valign="top" class="required">
46 <td align="right"><?php echo html_writer::label(get_string('auth_pop3type_key', 'auth_pop3'), 'menutype'); ?>: </td>
47 <td>
48 <?php
50 $pop3types = array('pop3', 'pop3cert', 'pop3notls');
51 foreach ($pop3types as $pop3type) {
52 $pop3options[$pop3type] = $pop3type;
54 echo html_writer::select($pop3options, 'type', $config->type, false);
57 </td>
58 <td><?php print_string('auth_pop3type', 'auth_pop3') ?></td>
59 </tr>
61 <tr valign="top" class="required">
62 <td align="right"><label for="port"><?php print_string('auth_pop3port_key', 'auth_pop3') ?>: </label></td>
63 <td>
64 <input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
65 <?php
67 if (isset($err['port'])) {
68 echo $OUTPUT->error_text($err['port']);
72 </td>
73 <td><?php print_string('auth_pop3port', 'auth_pop3') ?></td>
74 </tr>
76 <tr valign="top" class="required">
77 <td align="right"><label for="mailbox"><?php print_string('auth_pop3mailbox_key', 'auth_pop3') ?>: </label></td>
78 <td>
79 <input name="mailbox" id="mailbox" type="text" size="6" value="<?php echo $config->mailbox ?>" />
80 <?php
82 if (isset($err['mailbox'])) {
83 echo $OUTPUT->error_text($err['mailbox']);
87 </td>
88 <td><?php print_string('auth_pop3mailbox', 'auth_pop3') ?></td>
89 </tr>
91 <tr valign="top">
92 <td align="right"><label for="changepasswordurl"><?php print_string('auth_pop3changepasswordurl_key', 'auth_pop3') ?>: </label></td>
93 <td>
94 <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
95 <?php
97 if (isset($err['changepasswordurl'])) {
98 echo $OUTPUT->error_text($err['changepasswordurl']);
102 </td>
103 <td><?php print_string('changepasswordhelp', 'auth') ?></td>
104 </tr>
106 <?php
108 print_auth_lock_options($this->authtype, $user_fields, get_string('auth_fieldlocks_help', 'auth'), false, false);
111 </table>