-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommands.html
More file actions
106 lines (105 loc) · 4.84 KB
/
commands.html
File metadata and controls
106 lines (105 loc) · 4.84 KB
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
101
102
103
104
105
106
<table class="commands boxaligncenter">
<tr>
<th colspan="2">
<?php echo $OUTPUT->heading(get_string('add'),3) ?>
</th>
<?php
if ($displaydeletebuttons){
$deletespan = (has_capability('mod/simplescheduler:manageallappointments', $context)) ? 4 : 2 ;
?>
<th colspan="<?php echo $deletespan; ?>">
<?php echo $OUTPUT->heading(get_string('delete'),3) ?>
</th>
<?php
}
?>
</tr>
<tr>
<td>
<form action="view.php?id=<?php p($cm->id) ?>" method="post" name="addsessionform">
<input type="hidden" name="what" value="addsession" />
<input type="hidden" name="id" value="<?php p($cm->id) ?>" />
<input type="hidden" name="page" value="<?php p($page) ?>" />
<input type="submit" name="go_btn" value="<?php echo $straddsession ?>" />
</form>
</td>
<td>
<form action="view.php?id=<?php p($cm->id) ?>" method="post" name="addsingleform">
<input type="hidden" name="what" value="addslot" />
<input type="hidden" name="id" value="<?php p($cm->id) ?>" />
<input type="hidden" name="page" value="<?php p($page) ?>" />
<input type="submit" name="go_btn" value="<?php echo $straddsingleslot ?>" />
</form>
</td>
<?php
if ($displaydeletebuttons){
if (has_capability('mod/simplescheduler:manageallappointments', $context)){
?>
<td>
<form action="view.php?id=<?php p($cm->id) ?>" method="post" name="deleteallform">
<script type="text/javascript">
function confirmdeletionall(){
if (confirm('<?php print_string('confirmdelete', 'simplescheduler') ?>')){
document.forms['deleteallform'].submit();
}
}
</script>
<input type="hidden" name="what" value="deleteall" />
<input type="hidden" name="id" value="<?php p($cm->id) ?>" />
<input type="hidden" name="page" value="<?php p($page) ?>" />
<input type="button" name="go_btn" value="<?php echo $strdeleteallslots ?>" onclick="confirmdeletionall()" />
</form>
</td>
<td>
<form action="view.php?id=<?php p($cm->id) ?>" method="post" name="deleteallunusedform">
<script type="text/javascript">
function confirmdeletionallunused(){
if (confirm('<?php print_string('confirmdelete', 'simplescheduler') ?>')){
document.forms['deleteallunusedform'].submit();
}
}
</script>
<input type="hidden" name="what" value="deleteallunused" />
<input type="hidden" name="id" value="<?php p($cm->id) ?>" />
<input type="hidden" name="page" value="<?php p($page) ?>" />
<input type="button" name="go_btn" value="<?php echo $strdeleteallunusedslots ?>" onclick="confirmdeletionallunused()" />
</form>
</td>
<?php
}
?>
<td>
<form action="view.php?id=<?php p($cm->id) ?>" method="post" name="deleteunusedform">
<script type="text/javascript">
function confirmdeletionunused(){
if (confirm('<?php print_string('confirmdelete', 'simplescheduler') ?>')){
document.forms['deleteunusedform'].submit();
}
}
</script>
<input type="hidden" name="what" value="deleteunused" />
<input type="hidden" name="id" value="<?php p($cm->id) ?>" />
<input type="hidden" name="page" value="<?php p($page) ?>" />
<input type="submit" name="go_btn" value="<?php echo $strdeleteunusedslots ?>" onclick="confirmdeletionunused()" />
</form>
</td>
<td>
<form action="view.php?id=<?php p($cm->id) ?>" method="post" name="deletemineform">
<script type="text/javascript">
function confirmdeletionmine(){
if (confirm('<?php print_string('confirmdelete', 'simplescheduler') ?>')){
document.forms['deletemineform'].submit();
}
}
</script>
<input type="hidden" name="what" value="deleteonlymine" />
<input type="hidden" name="id" value="<?php p($cm->id) ?>" />
<input type="hidden" name="page" value="<?php p($page) ?>" />
<input type="submit" name="go_btn" value="<?php echo $strdeletemyslots ?>" onclick="confirmdeletionmine()" />
</form>
</td>
<?php
}
?>
</tr>
</table>