Updated the 19 build version to 20101023
[moodle.git] / calendar / event_new.html
bloba7bc0706802f3683a995cb4e299c8d4f1921fbb9
1 <?php
2 // The following is a hack to fix bug 1488
3 $course = get_record('course', 'id', ($form->courseid) ? $form->courseid : $site->id);
4 ?>
5 <form method="post" action="event.php" id="eventform">
6 <table cellpadding="5">
7 <tr>
8 <td style="vertical-align: top; text-align: right;"><label for="eventname">
9 <?php print_string('eventname', 'calendar'); ?>:
10 </label></td>
11 <td>
12 <input type="text" name="name" size="67" id="eventname" value="<?php p($form->name); ?>" />
13 <?php if (isset($err['name'])) formerr($err['name']); ?>
14 </td>
15 </tr>
16 <tr>
17 <td style="vertical-align: top; text-align: right;"><label for="edit-description">
18 <?php print_string('eventdescription', 'calendar'); ?>:
19 </label></td>
20 <td>
21 <?php
22 print_textarea($usehtmleditor, 20, 65, 630, 300, "description", $form->description);
23 if (isset($err['description'])) formerr($err['description']);
25 </td>
26 </tr>
27 <tr>
28 <td style="vertical-align: top; text-align: right;">
29 <?php print_string('eventdate', 'calendar'); ?>:
30 </td>
31 <td>
32 <?php print_date_selector('startday', 'startmon', 'startyr', (int)$form->timestart);?>
33 <?php print_string('eventtime', 'calendar');?>
34 <?php print_time_selector('starthr', 'startmin', (int)$form->timestart) ?>
35 <?php if (isset($err['timestart'])) formerr($err['timestart']); ?>
36 </td>
37 </tr>
38 <tr>
39 <td style="vertical-align: top; text-align: right;">
40 <?php print_string('eventduration', 'calendar'); ?>:
41 </td>
42 <td>
43 <div>
44 <input type="radio" name="duration" value="0" id="duration_none" <?php if($form->duration == 0) echo 'checked="checked"'; ?>/>
45 <label for="duration_none"><?php print_string('durationnone', 'calendar'); ?></label>
46 </div>
47 <div>
48 <input type="radio" name="duration" value="1" id="duration_yes" <?php if($form->duration == 1) echo 'checked="checked"'; ?>/>
49 <label for="duration_yes"><?php print_string('durationuntil', 'calendar'); ?></label>
50 <?php print_date_selector('endday', 'endmon', 'endyr', $form->timestart + $form->timeduration);?>
51 <?php print_string('eventtime', 'calendar');?>
52 <?php print_time_selector('endhr', 'endmin', $form->timestart + $form->timeduration) ?>
53 <?php if (isset($err['timeduration'])) formerr($err['timeduration']); ?>
54 </div>
55 <div>
56 <input type="radio" name="duration" value="2" id="duration_minutes" <?php if($form->duration == 2) echo 'checked="checked"'; ?>/>
57 <label for="duration_minutes"><?php print_string('durationminutes', 'calendar'); ?></label>
58 <input type="text" name="minutes" size="3" value="<?php p($form->minutes); ?>" id="minutes"/>
59 <?php if (isset($err['minutes'])) formerr($err['minutes']); ?>
60 <label class="accesshide" for="minutes"><?php print_string('minutes') ?></label>
61 </div>
62 </td>
63 </tr>
65 <tr>
66 <td style="vertical-align: top; text-align: right;">
67 <?php print_string('eventrepeat', 'calendar'); ?>:
68 </td>
69 <td>
70 <div>
71 <input type="radio" name="repeat" value="0" id="repeat_none" <?php if($form->repeat == 0) echo 'checked="checked"'; ?>/>
72 <label for="repeat_none">
73 <?php print_string('repeatnone', 'calendar'); ?>
74 </label>
75 </div>
76 <div>
77 <input type="radio" name="repeat" value="1" id="repeat_yes" <?php if($form->repeat == 1) echo 'checked="checked"'; ?>/>
78 <label for="repeat_yes">
79 <?php print_string('repeatweeksl', 'calendar'); ?>
80 </label>
81 <input id="repeats" type="text" name="repeats" size="2" value="<?php p($form->repeats); ?>" />
82 <label for="repeats"><?php print_string('repeatweeksr', 'calendar'); ?></label>
83 <?php if (isset($err['repeats'])) formerr($err['repeats']); ?>
84 </div>
85 </td>
86 </tr>
88 <tr>
89 <td align="center" colspan="2"><p><input type="submit" value="<?php print_string('savechanges') ?>" /></p></td>
90 </tr>
91 </table>
92 <p>
93 <input type="hidden" name="courseid" value="<?php echo $form->courseid?>" />
94 <input type="hidden" name="groupid" value="<?php echo $form->groupid?>" />
95 <input type="hidden" name="userid" value="<?php echo $form->userid?>" />
96 <input type="hidden" name="modulename" value="<?php echo $form->modulename?>" />
97 <input type="hidden" name="eventtype" value="<?php echo $form->eventtype?>" />
98 <input type="hidden" name="instance" value="<?php echo $form->instance?>" />
99 <input type="hidden" name="format" value="<?php echo $form->format; ?>" />
100 <input type="hidden" name="action" value="new" />
101 <input type="hidden" name="type" value="<?php echo $form->type; ?>" />
102 <input type="hidden" name="course" value="<?php p($urlcourse); ?>" />
103 <input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
104 </p>
105 </form>