moodle/auth/radius/config.html
2007-02-20 17:03:36 +00:00

88 lines
2.3 KiB
HTML

<?php
// TODO: this generates broken file errors, needs safer test -JH
// Is Auth/RADIUS really there?
if ((!include_once('Auth/RADIUS.php')) or (!class_exists(Auth_RADIUS_PAP))) {
print '<p align="center"><font color="red"><strong>Warning: The Auth_RADIUS module does not seem to be present. Please ensure it is installed and enabled.</strong></font></p>';
}
// set to defaults if undefined
if (!isset($config->host)) {
$config->host = '127.0.0.1';
}
if (!isset($config->nasport)) {
$config->nasport = '1812';
}
if (!isset($config->secret)) {
$config->secret = '';
}
if (!isset($config->changepasswordurl)) {
$config->changepasswordurl = '';
}
?>
<table cellspacing="0" cellpadding="5" border="0" align="center">
<tr valign="top">
<td align="right"><?php print_string('auth_radiushost_key', 'auth') ?>: </td>
<td>
<input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err['host'])) {
formerr($err['host']);
}
?>
</td>
<td><?php print_string('auth_radiushost', 'auth') ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('auth_radiusnasport_key', 'auth') ?>: </td>
<td>
<input name="nasport" type="text" size="6" value="<?php echo $config->nasport ?>" />
<?php
if (isset($err['nasport'])) {
formerr($err['nasport']);
}
?>
</td>
<td><?php print_string('auth_radiusnasport', 'auth') ?></td>
</tr>
<tr valign="top" >
<td align="right"><?php print_string('auth_radiussecret_key', 'auth') ?>: </td>
<td>
<input name="secret" type="text" size="6" value="<?php echo $config->secret ?>" />
<?php
if (isset($err['secret'])) {
formerr($err['secret']);
}
?>
</td>
<td><?php print_string('auth_radiussecret', 'auth') ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string('auth_radiuschangepasswordurl_key', 'auth') ?>: </td>
<td>
<input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
formerr($err['changepasswordurl']);
}
?>
</td>
<td><?php print_string('changepasswordhelp', 'auth') ?></td>
</tr>
</table>