MDL-38691 behat: Fixing behat tests
[moodle.git] / auth / radius / config.html
blob103bb20f13054dcd06a994f0ff8c94711120028b
1 <?php
3 // Is Auth/RADIUS really there?
4 if (!extension_loaded('radius')) {
5 print '<div class="box errorbox errorboxcontent"><p class="errormessage"><strong>Warning: The PHP RADIUS extension is not present. Please ensure it is installed and enabled.</strong></p></div>';
7 include_once 'Auth/RADIUS.php';
8 if (!class_exists('Auth_RADIUS')) {
9 print '<div class="box errorbox errorboxcontent"><p class="errormessage"><strong>Warning: There is a problem with the PHP Pear Auth_RADIUS package. Please ensure it is installed correctly.</strong></p></div>';
12 // set to defaults if undefined
13 if (!isset($config->host)) {
14 $config->host = '127.0.0.1';
16 if (!isset($config->nasport)) {
17 $config->nasport = '1812';
19 if (!isset($config->radiustype)) {
20 $config->radiustype = 'PAP';
22 if (!isset($config->secret)) {
23 $config->secret = '';
25 if (!isset($config->changepasswordurl)) {
26 $config->changepasswordurl = '';
30 <table cellspacing="0" cellpadding="5" border="0">
32 <tr valign="top">
33 <td align="right"><label for="host"><?php print_string('auth_radiushost_key', 'auth_radius') ?>: </label></td>
34 <td>
35 <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
36 <?php
38 if (isset($err['host'])) {
39 echo $OUTPUT->error_text($err['host']);
43 </td>
44 <td><?php print_string('auth_radiushost', 'auth_radius') ?></td>
45 </tr>
47 <tr valign="top">
48 <td align="right"><label for="nasport"><?php print_string('auth_radiusnasport_key', 'auth_radius') ?>: </label></td>
49 <td>
50 <input name="nasport" id="nasport" type="text" size="6" value="<?php echo $config->nasport ?>" />
51 <?php
53 if (isset($err['nasport'])) {
54 echo $OUTPUT->error_text($err['nasport']);
58 </td>
59 <td><?php print_string('auth_radiusnasport', 'auth_radius') ?></td>
60 </tr>
62 <tr valign="top" >
63 <td align="right"><?php echo html_writer::label(get_string('auth_radiustype_key', 'auth_radius'), 'menuradiustype'); ?>: </td>
64 <td>
65 <?php
67 $radiustype = array();
68 $radiustype['PAP'] = get_string('auth_radiustypepap', 'auth_radius');
69 $radiustype['CHAP_MD5'] = get_string('auth_radiustypechapmd5', 'auth_radius');
70 $radiustype['MSCHAPv1'] = get_string('auth_radiustypemschapv1', 'auth_radius');
71 $radiustype['MSCHAPv2'] = get_string('auth_radiustypemschapv2', 'auth_radius');
72 echo html_writer::select($radiustype, 'radiustype', $config->radiustype, false);
74 if (isset($err['radiustype'])) {
75 echo $OUTPUT->error_text($err['radiustype']);
79 </td>
80 <td><?php print_string('auth_radiustype', 'auth_radius') ?></td>
81 </tr>
84 <tr valign="top" >
85 <td align="right"><label for="secret"><?php print_string('auth_radiussecret_key', 'auth_radius') ?>: </label></td>
86 <td>
87 <input name="secret" id="secret" type="text" size="6" value="<?php echo $config->secret ?>" />
88 <?php
90 if (isset($err['secret'])) {
91 echo $OUTPUT->error_text($err['secret']);
95 </td>
96 <td><?php print_string('auth_radiussecret', 'auth_radius') ?></td>
97 </tr>
99 <tr valign="top">
100 <td align="right"><label for="changepasswordurl"><?php print_string('auth_radiuschangepasswordurl_key', 'auth_radius') ?>: </label></td>
101 <td>
102 <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
103 <?php
105 if (isset($err['changepasswordurl'])) {
106 echo $OUTPUT->error_text($err['changepasswordurl']);
110 </td>
111 <td><?php print_string('changepasswordhelp', 'auth') ?></td>
112 </tr>
114 </table>