OKAY! THIS IS IT! MOODLE 1.6!
[moodle.git] / admin / admin.html
blob8a2e575ada6089a7a76d5f6f4082a9754172dec8
2 <form name="adminform" id="adminform" method="post" action="admin.php">
3 <input type="hidden" name="previoussearch" value="<?php echo $previoussearch ?>">
4 <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
5 <table align="center" border="0" cellpadding="5" cellspacing="0">
6 <tr>
7 <td valign="top">
8 <?php
9 $a->count = count($admins);
10 $a->items = $strexistingadmins;
11 print_string('counteditems', '', $a);
13 </td>
14 <td></td>
15 <td valign="top">
16 <?php
17 $a->count = $usercount;
18 $a->items = $strpotentialadmins;
19 print_string('counteditems', '', $a);
21 </td>
22 </tr>
23 <tr>
24 <td valign="top">
25 <select name="removeselect[]" size="20" id="removeselect" multiple
26 onFocus="document.adminform.add.disabled=true;
27 document.adminform.remove.disabled=false;
28 document.adminform.addselect.selectedIndex=-1;">
29 <?php
30 if (count($admins) == 1) {
31 $disabled = 'disabled';
32 $removebuttontype = 'hidden';
33 } else {
34 $disabled = '';
35 $removebuttontype = 'submit';
38 foreach ($admins as $admin) {
39 $fullname = fullname($admin, true);
40 echo "<option value=\"$admin->id\" $disabled>".$fullname.", ".$admin->email."</option>\n";
44 </select></td>
45 <td valign="top">
46 <br />
47 <input name="add" type="submit" id="add" value="&larr;" />
48 <br />
49 <input name="remove" type="<?php echo $removebuttontype ?>" id="remove" value="&rarr;" />
50 <br />
51 </td>
52 <td valign="top">
53 <select name="addselect[]" size="20" id="addselect" multiple
54 onFocus="document.adminform.add.disabled=false;
55 document.adminform.remove.disabled=true;
56 document.adminform.removeselect.selectedIndex=-1;">
57 <?php
58 if (!empty($searchusers)) {
59 echo "<optgroup label=\"$strsearchresults (" . count($searchusers) . ")\">\n";
60 foreach ($searchusers as $user) {
61 $fullname = fullname($user, true);
62 echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
64 echo "</optgroup>\n";
65 } else {
66 if ($usercount > MAX_USERS_PER_PAGE) {
67 echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
68 .'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
69 } else {
70 if (!empty($users)) {
71 foreach ($users as $user) {
72 $fullname = fullname($user, true);
73 echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
79 </select>
80 <br />
81 <input type="text" name="searchtext" size="30" value="<?php p($searchtext, true) ?>"
82 onFocus ="document.adminform.add.disabled=true;
83 document.adminform.remove.disabled=true;
84 document.adminform.removeselect.selectedIndex=-1;
85 document.adminform.addselect.selectedIndex=-1;"
86 onkeydown = "var keyCode = event.which ? event.which : event.keyCode;
87 if (keyCode == 13) {
88 document.adminform.previoussearch.value=1;
89 document.adminform.submit();
90 } " />
92 <input name="search" id="search" type="submit" value="<?php p($strsearch) ?>" />
93 <?php
94 if (!empty($searchusers)) {
95 echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";
98 </td>
99 </tr>
100 </table>
101 </form>