MDL-46942 events: fix naming of other param
[moodle.git] / auth / imap / config.html
blob914d14f691db32f94a6184f3497b41601082e177
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"><label for="host"><?php print_string('auth_imaphost_key', 'auth_imap') ?>: </label></td>
22 <td>
23 <input name="host" id="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 echo html_writer::label(get_string('auth_imaptype_key', 'auth_imap'), 'menutype'); ?>: </td>
44 <td>
45 <?php
47 $imaptypes = array('imap', 'imapssl', 'imapcert', 'imapnosslcert', '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"><label for="port"><?php print_string('auth_imapport_key', 'auth_imap') ?>: </label></td>
60 <td>
61 <input name="port" id="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"><label for="changepasswordurl"><?php print_string('auth_imapchangepasswordurl_key', 'auth_imap') ?>: </label></td>
75 <td>
76 <input name="changepasswordurl" id="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>