4 require_once 'languages.php';
6 $createoptions[0] = get_string("no");
7 $createoptions[1] = get_string("yes");
9 // set to defaults if undefined
10 if (!isset ($config->hostname
)) {
11 $config->hostname
= '';
13 if (!isset ($config->port
)) {
16 if (!isset ($config->casversion
)) {
17 $config->casversion
= '';
19 if (!isset ($config->baseuri
)) {
20 $config->baseuri
= '';
22 if (!isset ($config->language
)) {
23 $config->language
= '';
25 if (!isset ($config->use_cas
)) {
26 $config->use_cas
= '';
28 if (!isset ($config->auth_user_create
)) {
29 $config->auth_user_create
= '0';
31 if (!isset ($config->create_user
)) {
32 $config->create_user
= '0';
34 if (!isset($config->changepasswordurl
)) {
35 $config->changepasswordurl
= '';
39 <table cellspacing=
"0" cellpadding=
"5" border=
"0" align=
"center">
43 <h4><?php print_string('auth_cas_server_settings', 'auth') ?> </h4>
47 <tr valign=
"top" class=
"required">
48 <td align=
"right"><?php print_string('auth_cas_use_cas', 'auth') ?>:
</td>
53 $options[1] = get_string('yes');
54 choose_from_menu ($options, 'use_cas', $config->use_cas
, get_string('no'), '', '');
58 <td><?php print_string('auth_cas_enabled', 'auth') ?></td>
61 <tr valign=
"top" class=
"required">
62 <td align=
"right"><?php print_string('auth_cas_hostname_key', 'auth') ?>:
</td>
64 <input name=
"hostname" type=
"text" size=
"30" value=
"<?php echo $config->hostname ?>" />
67 if (isset($err['hostname'])) {
68 formerr($err['hostname']);
73 <td><?php print_string('auth_cas_hostname', 'auth') ?></td>
76 <tr valign=
"top" class=
"required">
77 <td align=
"right"><?php print_string('auth_cas_baseuri_key', 'auth') ?>:
</td>
79 <input name=
"baseuri" type=
"text" size=
"30" value=
"<?php echo $config->baseuri ?>" />
82 if (isset($err['baseuri'])) {
83 formerr($err['baseuri']);
88 <td><?php print_string('auth_cas_baseuri', 'auth') ?></td>
91 <tr valign=
"top" class=
"required">
92 <td align=
"right"><?php print_string('auth_cas_port_key', 'auth') ?>:
</td>
94 <input name=
"port" type=
"text" size=
"30" value=
"<?php echo $config->port ?>" />
97 if (isset($err['port'])) {
98 formerr($err['port']);
103 <td><?php print_string('auth_cas_port', 'auth') ?></td>
106 <tr valign=
"top" class=
"required">
107 <td align=
"right"><?php print_string('auth_cas_casversion', 'auth') ?>:
</td>
109 <input name=
"casversion" type=
"text" size=
"30" value=
"<?php echo $config->casversion ?>" />
112 if (isset($err['casversion'])) {
113 formerr($err['casversion']);
118 <td><?php print_string('auth_cas_version', 'auth') ?></td>
121 <tr valign=
"top" class=
"required">
122 <td align=
"right"><?php print_string('auth_cas_language_key', 'auth') ?>:
</td>
126 choose_from_menu($CASLANGUAGES, 'language', $config->language
, '');
130 <td><?php print_string('auth_cas_language', 'auth') ?></td>
134 <td align=
"right"><?php print_string('auth_cas_auth_user_create', 'auth') ?>:
</td>
138 choose_from_menu($createoptions, 'auth_user_create', $config->auth_user_create
, '');
139 if (isset($err['auth_user_create'])) {
140 formerr($err['auth_user_create']);
146 <?php print_string("auth_user_creation","auth"); ?>
150 <tr valign=
"top" class=
"required">
151 <td align=
"right"><?php print_string('auth_cas_create_user_key', 'auth') ?>:
</td>
156 $options[0] = get_string('no');
157 $options[1] = get_string('yes');
158 choose_from_menu($options, 'create_user', $config->create_user
, '');
162 <td><?php print_string('auth_cas_create_user', 'auth') ?></td>
166 <td align=
"right"><?php print_string('auth_cas_changepasswordurl', 'auth') ?>:
</td>
168 <input name=
"changepasswordurl" type=
"text" value=
"<?php echo $config->changepasswordurl ?>" />
171 if (isset($err['changepasswordurl'])) {
172 formerr($err['changepasswordurl']);
177 <td><?php print_string('changepasswordhelp', 'auth') ?></td>
184 $ldapplugin = get_auth_plugin('ldap');
185 $ldapplugin->config_form(get_config('auth/ldap'), $err);