-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheditattendees.html
100 lines (87 loc) · 3.71 KB
/
editattendees.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<style type="text/css">
select { width: 220px }
</style>
<form id="assignform" method="post" action="">
<div>
<input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
<input type="hidden" name="backtoallsessions" value="<?php p($backtoallsessions) ?>" />
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<table summary="" style="margin-left:auto;margin-right:auto" border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<label for="removeselect"><?php print_string('existingusers', 'role', $existingcount); ?></label>
<br />
<select name="removeselect[]" size="20" id="removeselect" multiple="multiple"
onfocus="getElementById('assignform').add.disabled=true;
getElementById('assignform').remove.disabled=false;
getElementById('assignform').addselect.selectedIndex=-1;">
<?php
$i = 0;
if ($existingcount > 0) {
foreach ($existingusers as $existinguser) {
$fullname = fullname($existinguser, true);
echo "<option value=\"$existinguser->id\">".$fullname."</option>\n";
$i++;
}
}
if ($i==0) {
echo '<option/>'; // empty select breaks xhtml strict
}
?>
</select>
</td>
<td valign="top">
<br />
<?php //check_theme_arrows(); ?>
<p class="arrow_button">
<input name="add" id="add" type="submit" value="<?php echo ' « '.get_string('add'); ?> " title="<?php print_string('add'); ?>" />
<br />
<input name="remove" id="remove" type="submit" value="<?php echo ' » '.get_string('remove'); ?> " title="<?php print_string('remove'); ?>" />
</p>
</td>
<td valign="top">
<label for="addselect"><?php print_string('potentialusers', 'role', $usercount); ?></label>
<br />
<select name="addselect[]" size="20" id="addselect" multiple="multiple"
onfocus="getElementById('assignform').add.disabled=false;
getElementById('assignform').remove.disabled=true;
getElementById('assignform').removeselect.selectedIndex=-1;">
<?php
$i=0;
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $availableusers->_numOfRows . ")\">\n";
foreach ($availableusers as $au) {
echo "<option value=\"$au->id\">".$au->firstname." " . $au->lastname . "</option>\n";
}
echo "</optgroup>\n";
} else {
if ($usercount > MAX_USERS_PER_PAGE) {
echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
.'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
}
else {
foreach ($availableusers as $au) {
echo "<option value=\"$au->id\">".$au->firstname." " . $au->lastname . "</option>\n";
}
}
}
if ($i==0) {
echo '<option/>'; // empty select breaks xhtml strict
}
?>
</select>
<br />
</td>
</tr>
</table>
<?php
if ($nonattendees) {
echo '<br />';
//print_heading(get_string('unapprovedrequests', 'webinar').' ('.$nonattendees.')');
//print_table($table);
echo $OUTPUT->heading(get_string('unapprovedrequests', 'webinar').' ('.$nonattendees.')');
echo html_writer::table($table);
}
?>
</div>
</form>