forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.html
93 lines (74 loc) · 2.5 KB
/
config.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
// set to defaults if undefined
if (!isset($config->host)) {
$config->host = '127.0.0.1';
}
if (!isset($config->type)) {
$config->type = 'imap';
}
if (!isset($config->port)) {
$config->port = '143';
}
if (!isset($config->changepasswordurl)) {
$config->changepasswordurl = '';
}
?>
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
<td align="right"><label for="host"><?php print_string('auth_imaphost_key', 'auth_imap') ?>: </label></td>
<td>
<input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err['host'])) {
echo $OUTPUT->error_text($err['host']);
}
?>
</td>
<td>
<?php
print_string('auth_imaphost', 'auth_imap');
print_string('auth_multiplehosts', 'auth');
?>
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php echo html_writer::label(get_string('auth_imaptype_key', 'auth_imap'), 'menutype'); ?>: </td>
<td>
<?php
$imaptypes = array('imap', 'imapssl', 'imapcert', 'imapnosslcert', 'imaptls');
foreach ($imaptypes as $imaptype) {
$imapoptions[$imaptype] = $imaptype;
}
echo html_writer::select($imapoptions, 'type', $config->type, false);
?>
</td>
<td><?php print_string('auth_imaptype', 'auth_imap') ?></td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="port"><?php print_string('auth_imapport_key', 'auth_imap') ?>: </label></td>
<td>
<input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
<?php
if (isset($err['port'])) {
echo $OUTPUT->error_text($err['port']);
}
?>
</td>
<td><?php print_string('auth_imapport', 'auth_imap') ?></td>
</tr>
<tr valign="top">
<td align="right"><label for="changepasswordurl"><?php print_string('auth_imapchangepasswordurl_key', 'auth_imap') ?>: </label></td>
<td>
<input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
echo $OUTPUT->error_text($err['changepasswordurl']);
}
?>
</td>
<td><?php print_string('changepasswordhelp', 'auth') ?></td>
</tr>
<?php
print_auth_lock_options($this->authtype, $user_fields, get_string('auth_fieldlocks_help', 'auth'), false, false);
?>
</table>