2 <form name=
"creatorsform" id=
"creatorsform" method=
"post" action=
"creators.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">
9 $a->count
= count($creators);
10 $a->items
= $strexistingcreators;
11 print_string('counteditems', '', $a);
17 $a->count
= $usercount;
18 $a->items
= $strpotentialcreators;
19 print_string('counteditems', '', $a);
25 <select name=
"removeselect[]" size=
"20" id=
"removeselect" multiple
26 onFocus=
"document.creatorsform.add.disabled=true;
27 document.creatorsform.remove.disabled=false;
28 document.creatorsform.addselect.selectedIndex=-1;">
30 foreach ($creators as $creator) {
31 $fullname = fullname($creator, true);
32 echo "<option value=\"$creator->id\">".$fullname.", ".$creator->email
."</option>\n";
39 <input name=
"add" type=
"submit" id=
"add" value=
"←" />
41 <input name=
"remove" type=
"submit" id=
"remove" value=
"→" />
45 <select name=
"addselect[]" size=
"20" id=
"addselect" multiple
46 onFocus=
"document.creatorsform.add.disabled=false;
47 document.creatorsform.remove.disabled=true;
48 document.creatorsform.removeselect.selectedIndex=-1;">
50 if (!empty($searchusers)) {
51 echo "<optgroup label=\"$strsearchresults (" . count($searchusers) . ")\">\n";
52 foreach ($searchusers as $user) {
53 $fullname = fullname($user, true);
54 echo "<option value=\"$user->id\">".$fullname.", ".$user->email
."</option>\n";
59 foreach ($users as $user) {
60 $fullname = fullname($user, true);
61 echo "<option value=\"$user->id\">".$fullname.", ".$user->email
."</option>\n";
67 <script type=
"text/javascript">
70 <input type=
"text" name=
"searchtext" size=
"30" value=
"<?php echo $searchtext ?>"
71 onFocus
="document.creatorsform.add.disabled=true;
72 document.creatorsform.remove.disabled=true;
73 document.creatorsform.removeselect.selectedIndex=-1;
74 document.creatorsform.addselect.selectedIndex=-1;"
75 onkeydown
= "var keyCode = event.which ? event.which : event.keyCode;
77 document.creatorsform.previoussearch.value=1;
78 document.creatorsform.submit();
80 <input name
="search" id
="search" type
="submit" value
="<?php p($strsearch) ?>"/>
82 if (!empty($searchusers)) {
83 echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";