MDL-11515:
[moodle-linuxchix.git] / auth / radius / config.html
blob449f0c06944bb8fa80d74114403469a5a06af01a
1 <?php
3 // TODO: this generates broken file errors, needs safer test -JH
5 // Is Auth/RADIUS really there?
6 if (!defined('Auth_RADIUS_PAP') or !class_exists(Auth_RADIUS_PAP) or !include_once('Auth/RADIUS.php')) {
7 print '<p style="text-align:center; color: red"><strong>Warning: The Auth_RADIUS module does not seem to be present. Please ensure it is installed and enabled.</strong></p>';
10 // set to defaults if undefined
11 if (!isset($config->host)) {
12 $config->host = '127.0.0.1';
14 if (!isset($config->nasport)) {
15 $config->nasport = '1812';
17 if (!isset($config->secret)) {
18 $config->secret = '';
20 if (!isset($config->changepasswordurl)) {
21 $config->changepasswordurl = '';
25 <table cellspacing="0" cellpadding="5" border="0">
27 <tr valign="top">
28 <td align="right"><?php print_string('auth_radiushost_key', 'auth') ?>: </td>
29 <td>
30 <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
31 <?php
33 if (isset($err['host'])) {
34 formerr($err['host']);
38 </td>
39 <td><?php print_string('auth_radiushost', 'auth') ?></td>
40 </tr>
42 <tr valign="top">
43 <td align="right"><?php print_string('auth_radiusnasport_key', 'auth') ?>: </td>
44 <td>
45 <input name="nasport" type="text" size="6" value="<?php echo $config->nasport ?>" />
46 <?php
48 if (isset($err['nasport'])) {
49 formerr($err['nasport']);
53 </td>
54 <td><?php print_string('auth_radiusnasport', 'auth') ?></td>
55 </tr>
57 <tr valign="top" >
58 <td align="right"><?php print_string('auth_radiussecret_key', 'auth') ?>: </td>
59 <td>
60 <input name="secret" type="text" size="6" value="<?php echo $config->secret ?>" />
61 <?php
63 if (isset($err['secret'])) {
64 formerr($err['secret']);
68 </td>
69 <td><?php print_string('auth_radiussecret', 'auth') ?></td>
70 </tr>
72 <tr valign="top">
73 <td align="right"><?php print_string('auth_radiuschangepasswordurl_key', 'auth') ?>: </td>
74 <td>
75 <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
76 <?php
78 if (isset($err['changepasswordurl'])) {
79 formerr($err['changepasswordurl']);
83 </td>
84 <td><?php print_string('changepasswordhelp', 'auth') ?></td>
85 </tr>
87 </table>