forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevent_new.html
103 lines (100 loc) · 4.34 KB
/
event_new.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
<?php
// The following is a hack to fix bug 1488
$course = get_record('course', 'id', ($form->courseid) ? $form->courseid : $site->id);
?>
<form method="post" action="event.php" name="new">
<table cellpadding="5">
<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'])) formerr($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'])) formerr($err['description']);
?>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: right;">
<?php print_string('eventdate', 'calendar'); ?>:
</td>
<td>
<?php print_date_selector('startday', 'startmon', 'startyr', $form->timestart);?>
<?php print_string('eventtime', 'calendar');?>
<?php print_time_selector('starthr', 'startmin', $form->timestart) ?>
<?php if (isset($err['timestart'])) formerr($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 print_date_selector('endday', 'endmon', 'endyr', $form->timestart + $form->timeduration);?>
<?php print_string('eventtime', 'calendar');?>
<?php print_time_selector('endhr', 'endmin', $form->timestart + $form->timeduration) ?>
<?php if (isset($err['timeduration'])) formerr($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'])) formerr($err['minutes']); ?>
</div>
</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: right;">
<?php print_string('eventrepeat', 'calendar'); ?>:
</td>
<td>
<div>
<input type="radio" name="repeat" value="0" id="repeat_none" <?php if($form->repeat == 0) echo 'checked="checked"'; ?>/>
<label for="repeat_none">
<?php print_string('repeatnone', 'calendar'); ?>
</label>
</div>
<div>
<input type="radio" name="repeat" value="1" id="repeat_yes" <?php if($form->repeat == 1) echo 'checked="checked"'; ?>/>
<label for="repeat_yes">
<?php print_string('repeatweeksl', 'calendar'); ?>
</label>
<input type="text" name="repeats" size="2" value="<?php p($form->repeats); ?>" />
<?php print_string('repeatweeksr', 'calendar'); ?>
<?php if (isset($err['repeats'])) formerr($err['repeats']); ?>
</div>
</td>
</tr>
<tr>
<td align="center" colspan="2"><p><input type="submit" value="<?php print_string('savechanges') ?>" /></p></td>
</tr>
</table>
<p>
<input type="hidden" name="courseid" value="<?php echo $form->courseid?>" />
<input type="hidden" name="groupid" value="<?php echo $form->groupid?>" />
<input type="hidden" name="userid" value="<?php echo $form->userid?>" />
<input type="hidden" name="modulename" value="<?php echo $form->modulename?>" />
<input type="hidden" name="eventtype" value="<?php echo $form->eventtype?>" />
<input type="hidden" name="instance" value="<?php echo $form->instance?>" />
<input type="hidden" name="format" value="<?php echo $form->format; ?>" />
<input type="hidden" name="action" value="new" />
<input type="hidden" name="type" value="defined" />
</p>
</form>