Merge branch 'w21_MDL-18763_m23_avatar512' of git://github.com/skodak/moodle
[moodle.git] / auth / imap / config.html
blobd88ad3a8e0b043d876330b4204f706ab514986d7
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 = 'imap';
10 if (!isset($config->port)) {
11 $config->port = '143';
13 if (!isset($config->changepasswordurl)) {
14 $config->changepasswordurl = '';
18 <table cellspacing="0" cellpadding="5" border="0">
20 <tr valign="top" class="required">
21 <td align="right"><?php print_string('auth_imaphost_key', 'auth_imap') ?>: </td>
22 <td>
23 <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
24 <?php
26 if (isset($err['host'])) {
27 echo $OUTPUT->error_text($err['host']);
31 </td>
32 <td>
33 <?php
35 print_string('auth_imaphost', 'auth_imap');
36 print_string('auth_multiplehosts', 'auth');
39 </td>
40 </tr>
42 <tr valign="top" class="required">
43 <td align="right"><?php print_string('auth_imaptype_key', 'auth_imap') ?>: </td>
44 <td>
45 <?php
47 $imaptypes = array('imap', 'imapssl', 'imapcert', 'imaptls');
48 foreach ($imaptypes as $imaptype) {
49 $imapoptions[$imaptype] = $imaptype;
51 echo html_writer::select($imapoptions, 'type', $config->type, false);
54 </td>
55 <td><?php print_string('auth_imaptype', 'auth_imap') ?></td>
56 </tr>
58 <tr valign="top" class="required">
59 <td align="right"><?php print_string('auth_imapport_key', 'auth_imap') ?>: </td>
60 <td>
61 <input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
62 <?php
64 if (isset($err['port'])) {
65 echo $OUTPUT->error_text($err['port']);
69 </td>
70 <td><?php print_string('auth_imapport', 'auth_imap') ?></td>
71 </tr>
73 <tr valign="top">
74 <td align="right"><?php print_string('auth_imapchangepasswordurl_key', 'auth_imap') ?>: </td>
75 <td>
76 <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
77 <?php
79 if (isset($err['changepasswordurl'])) {
80 echo $OUTPUT->error_text($err['changepasswordurl']);
84 </td>
85 <td><?php print_string('changepasswordhelp', 'auth') ?></td>
86 </tr>
88 <?php
90 print_auth_lock_options($this->authtype, $user_fields, get_string('auth_fieldlocks_help', 'auth'), false, false);
93 </table>