MDL-76059 forms: graceful early exit for invalid button elements.
[moodle.git] / admin / mnet / trustedhosts.html
blob951e8b918527f98e513f144236e0744e0d4a7ae3
1 <?php
2 echo $OUTPUT->header();
3 echo $OUTPUT->render(mnet_get_deprecation_notice());
4 ?>
5 <div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
6 <table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
7 <tr>
8 <th class="header c0" colspan="2"><?php print_string('trustedhosts', 'mnet'); ?></th>
9 </tr>
10 <tr>
11 <td class="cell c1" colspan="2"><?php print_string('trustedhostsexplain', 'mnet'); ?></td>
12 </tr>
13 <tr>
14 <td class="cell c1" colspan="2">
15 <form method="post" action="trustedhosts.php">
16 <div>
17 <input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
18 <textarea name="hostlist" cols="40" rows="20"><?php echo $trusted_hosts; ?></textarea><br />
19 <input type="submit" value="<?php print_string('savechanges'); ?>" />
20 </div>
21 </form>
22 </td>
23 </tr>
24 </table>
25 <table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
26 <tr>
27 <th class="header c0" colspan="2"><?php print_string('testtrustedhosts', 'mnet'); ?></th>
28 </tr>
29 <?php
30 if (!empty($test_ip_address)){
32 <tr>
33 <td class="cell c1" colspan="2">
34 <?php
35 if ($in_range) {
36 print_string('is_in_range', 'mnet', $test_ip_address);
37 echo '<br />';
38 print_string('validated_by', 'mnet', $validated_by);
39 } else {
40 print_string('not_in_range', 'mnet', $test_ip_address);
43 </td>
44 </tr>
45 <?php
46 } else {
48 <tr>
49 <td class="cell c1" colspan="2"><?php print_string('testtrustedhostsexplain', 'mnet'); ?></td>
50 </tr>
51 <?php
54 <tr>
55 <td class="cell c1" colspan="2">
56 <form method="get" action="trustedhosts.php">
57 <div>
58 <input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
59 <input type="text" name="testipaddress" value="<?php echo $test_ip_address; ?>" />
60 <input type="submit" value="<?php print_string('go'); ?>" />
61 </div>
62 </form>
63 </td>
64 </tr>
65 </table>
66 </div>
67 <?php
68 echo $OUTPUT->footer();