forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
event_edit.html
109 lines (107 loc) · 4.35 KB
/
event_edit.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
101
102
103
104
105
106
107
108
<?php
$startselectors = html_select::make_time_selectors(array(
'days' => 'startday',
'months' => 'startmon',
'years' => 'startyr',
'hours' => 'starthr',
'minutes' => 'startmin'), $form->timestart);
$endselectors = html_select::make_time_selectors(array(
'days' => 'endday',
'months' => 'endmon',
'years' => 'endyr',
'hours' => 'endhr',
'minutes' => 'endmin'), $form->timestart + $form->timeduration);
?>
<form method="post" action="event.php" id="eventform">
<table cellpadding="5" cellspacing="0">
<tr>
<td style="vertical-align: top; text-align: right;">
<?php print_string('eventname', 'calendar'); ?>:
</td>
<td>
<input type="text" name="name" size="67" value="<?php p($form->name); ?>" />
<?php if (isset($err['name'])) echo $OUTPUT->error_text($err['name']); ?>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: right;">
<?php print_string('eventdescription', 'calendar'); ?>:
</td>
<td>
<?php
print_textarea($usehtmleditor, 20, 65, 630, 300, "description", $form->description);
if (isset($err['description'])) echo $OUTPUT->error_text($err['description']);
?>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: right;"><?php print_string('eventdate', 'calendar'); ?>:</td>
<td>
<?php echo $OUTPUT->select($startselectors[0]) . $OUTPUT->select($startselectors[1]) . $OUTPUT->select($startselectors[2]);?>
<?php print_string('eventtime', 'calendar');?>
<?php echo $OUTPUT->select($startselectors[3]) . $OUTPUT->select($startselectors[4]);?>
<?php if (isset($err['timestart'])) echo $OUTPUT->error_text($err['timestart']); ?>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: right;">
<?php print_string('eventduration', 'calendar'); ?>:
</td>
<td>
<div>
<input type="radio" name="duration" value="0" id="duration_none" <?php if($form->duration == 0) echo 'checked="checked"'; ?>/>
<label for="duration_none">
<?php print_string('durationnone', 'calendar'); ?>
</label>
</div>
<div>
<input type="radio" name="duration" value="1" id="duration_yes" <?php if($form->duration == 1) echo 'checked="checked"'; ?>/>
<label for="duration_yes">
<?php print_string('durationuntil', 'calendar'); ?>
</label>
<?php echo $OUTPUT->select($endselectors[0]) . $OUTPUT->select($endselectors[1]) . $OUTPUT->select($endselectors[2]);?>
<?php print_string('eventtime', 'calendar');?>
<?php echo $OUTPUT->select($endselectors[3]) . $OUTPUT->select($endselectors[4]);?>
<?php if (isset($err['timeduration'])) echo $OUTPUT->error_text($err['timeduration']); ?>
</div>
<div>
<input type="radio" name="duration" value="2" id="duration_minutes" <?php if($form->duration == 2) echo 'checked="checked"'; ?>/>
<label for="duration_minutes"><?php print_string('durationminutes', 'calendar'); ?>:</label>
<input type="text" name="minutes" size="3" value="<?php p($form->minutes); ?>" />
<?php if (isset($err['minutes'])) echo $OUTPUT->error_text($err['minutes']); ?>
</div>
</td>
</tr>
<?php if($repeatcount > 1) { ?>
<tr>
<td style="vertical-align: top; text-align: right;">
<?php print_string('eventrepeat', 'calendar'); ?>:
</td>
<td>
<div>
<input type="radio" name="repeats" value="1" id="edit_all" checked="checked" />
<label for="edit_all">
<?php print_string('repeateditall', 'calendar', $repeatcount); ?>
</label>
</div>
<div>
<input type="radio" name="repeats" value="0" id="edit_this" />
<label for="edit_this">
<?php print_string('repeateditthis', 'calendar'); ?>
</label>
</div>
</td>
</tr>
<?php } ?>
<tr>
<td align="center" colspan="2"><p><input type="submit" value="<?php print_string('savechanges') ?>" /></p></td>
</tr>
</table>
<p>
<input type="hidden" name="id" value="<?php echo $form->id; ?>" />
<input type="hidden" name="courseid" value="<?php echo $form->courseid; ?>" />
<input type="hidden" name="format" value="<?php echo $form->format; ?>" />
<input type="hidden" name="action" value="edit" />
<input type="hidden" name="course" value="<?php p($urlcourse); ?>" />
</p>
</form>