list($nextmon, $nextyr) = calendar_add_month($mon, $yr);
echo calendar_filter_controls('event', 'action='.$_REQUEST['action'].'&type='.$_REQUEST['type'].'&id='.$_REQUEST['id']);
- echo '<p>';
+ echo '<div>';
echo calendar_top_controls('display', array('m' => $prevmon, 'y' => $prevyr));
echo calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr);
- echo '</p><p>';
+ echo '</div><div>';
echo calendar_top_controls('display', array('m' => $mon, 'y' => $yr));
echo calendar_get_mini($courses, $groups, $users, $mon, $yr);
- echo '</p><p>';
+ echo '</div><div>';
echo calendar_top_controls('display', array('m' => $nextmon, 'y' => $nextyr));
echo calendar_get_mini($courses, $groups, $users, $nextmon, $nextyr);
- echo '</p>';
+ echo '</div>';
print_side_block_end();
print_spacer(1, 180);
echo '</td>';
<form method="post" action="event.php" name="edit">
-<table cellpadding=5>
+<table cellpadding="5">
<tr>
<td style="vertical-align: top; text-align: right;">
<?php print_string('eventname', 'calendar'); ?>:
</td>
</tr>
<tr>
- <td align="center" colspan="2"><p><input type="submit" value="<?php print_string('savechanges') ?>"></p></td>
+ <td align="center" colspan="2"><p><input type="submit" value="<?php print_string('savechanges') ?>" /></p></td>
</tr>
</table>
<p>
$course = get_record('course', 'id', ($form->courseid) ? $form->courseid : $site->id);
?>
<form method="post" action="event.php" name="new">
-<table cellpadding=5>
+<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); ?>" />
+ <input type="text" name="name" size="67" value="<?php p($form->name); ?>" />
<?php if (isset($err['name'])) formerr($err['name']); ?>
</td>
</tr>
<?php print_string('eventdescription', 'calendar'); ?>:
</td>
<td>
- <?php
+ <?php
print_textarea($usehtmleditor, 20, 65, 630, 300, "description", $form->description);
- if (isset($err['description'])) formerr($err['description']);
+ if (isset($err['description'])) formerr($err['description']);
?>
</td>
</tr>
<?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 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>
<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 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); ?>" />
+ <input type="text" name="minutes" size="3" value="<?php p($form->minutes); ?>" />
<?php if (isset($err['minutes'])) formerr($err['minutes']); ?>
</div>
</td>
<label for="repeat_yes">
<?php print_string('repeatweeksl', 'calendar'); ?>
</label>
- <input type="text" name="repeats" size="2" value="<?php p($form->repeats); ?>" />
+ <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>
</tr>
<tr>
- <td align="center" colspan="2"><p><input type="submit" value="<?php print_string('savechanges') ?>"></p></td>
+ <td align="center" colspan="2"><p><input type="submit" value="<?php print_string('savechanges') ?>" /></p></td>
</tr>
</table>
<p>
+<form method="post" action="event.php">
<table class="formtable">
- <form method="post" action="event.php">
- <p>
- <input type="hidden" name="action" value="new" />
- <input type="hidden" name="timestart" value="<?php echo $form->timestart; ?>" />
- </p>
<tr>
- <td style="vertical-align: top; text-align: right;"><?php print_string('eventkind', 'calendar'); ?>:</td>
- <td>
- <?php if(!empty($allowed->user)) { ?><p><input type='radio' name='type' value='user' id='type_user' checked='checked' /><label for='type_user'><?php print_string('typeuser', 'calendar') ?></label></p>
- <?php } ?>
- <?php if(!empty($allowed->groups)) { ?><p><input type='radio' name='type' value='group' id='type_group' /><label for='type_group'><?php echo get_string('typegroup', 'calendar').' '.get_string('groupfor'); ?></label>
- <select name='groupid'>
- <option value=''></option>
- <?php foreach($allowed->groups as $group) {?>
- <option value='<?php echo $group->id; ?>' <?php if($group->id == $groupid) echo 'selected="selected"';?>><?php echo $group->name; ?></option>
- <?php }?>
- </select>
- <?php } ?>
- <?php if(!empty($allowed->courses)) { ?>
- <p><input type='radio' name='type' value='course' id='type_course' /><input type="hidden" name="courseid" value="<?php echo($courseid) ?>" /><label for='type_course'><?php print_string('typecourse', 'calendar') ?></label></p>
- <?php } ?>
- <?php if(!empty($allowed->site)) { ?>
- <p><input type='radio' name='type' value='site' id='type_site' /><label for='type_site'><?php print_string('typesite', 'calendar') ?></label></p>
- <?php } ?>
- </td>
+ <td style="vertical-align: top; text-align: right;"><?php print_string('eventkind', 'calendar'); ?>:</td>
+ <td>
+ <?php if(!empty($allowed->user)) { ?><div><input type='radio' name='type' value='user' id='type_user' checked='checked' /><label for='type_user'><?php print_string('typeuser', 'calendar') ?></label></div>
+ <?php } ?>
+ <?php if(!empty($allowed->groups)) { ?><div><input type='radio' name='type' value='group' id='type_group' /><label for='type_group'><?php echo get_string('typegroup', 'calendar').' '.get_string('groupfor'); ?></label>
+ <select name='groupid'>
+ <option value=''></option>
+ <?php foreach($allowed->groups as $group) {?>
+ <option value='<?php echo $group->id; ?>' <?php if($group->id == $groupid) echo 'selected="selected"';?>><?php echo $group->name; ?></option>
+ <?php }?>
+ </select>
+ </div>
+ <?php } ?>
+ <?php if(!empty($allowed->courses)) { ?>
+ <div><input type='radio' name='type' value='course' id='type_course' /><input type="hidden" name="courseid" value="<?php echo($courseid) ?>" /><label for='type_course'><?php print_string('typecourse', 'calendar') ?></label></div>
+ <?php } ?>
+ <?php if(!empty($allowed->site)) { ?>
+ <div><input type='radio' name='type' value='site' id='type_site' /><label for='type_site'><?php print_string('typesite', 'calendar') ?></label></div>
+ <?php } ?>
+ </td>
</tr>
<tr>
- <td> </td>
- <td>
- <p><input type="submit" value=" <?php print_string('ok') ?> ">
- <input type="button" onclick="document.location.href='view.php?view=upcoming';" value=" <?php print_string('cancel') ?> ">
- </p>
- </td>
+ <td> </td>
+ <td>
+ <div>
+ <input type="submit" value=" <?php print_string('ok') ?> " />
+ <input type="button" onclick="document.location.href='view.php?view=upcoming';" value=" <?php print_string('cancel') ?> " />
+ </div>
+ </td>
</tr>
- </form>
</table>
+<p>
+<input type="hidden" name="action" value="new" />
+<input type="hidden" name="timestart" value="<?php echo $form->timestart; ?>" />
+</p>
+</form>
\ No newline at end of file
else if(isset($typesbyday[$day]['startuser'])) {
$class .= ' cal_event_user';
}
- $cell = '<strong><a href="'.$dayhref.'" '.$popup.'">'.$day.'</a></strong>';
+ $cell = '<strong><a href="'.$dayhref.'" '.$popup.'>'.$day.'</a></strong>';
}
else {
$cell = $day;
$eventtype = get_string($event->eventtype, $event->modulename);
$icon = $CFG->modpixpath.'/'.$event->modulename.'/icon.gif';
- $output[$outkey]->icon = '<img height=16 width=16 src="'.$icon.'" alt="" title="'.$modulename.'" style="vertical-align: middle;" />';
+ $output[$outkey]->icon = '<img height="16" width="16" src="'.$icon.'" alt="" title="'.$modulename.'" style="vertical-align: middle;" />';
$output[$outkey]->referer = '<a href="'.$CFG->wwwroot.'/mod/'.$event->modulename.'/view.php?id='.$module->id.'">'.$event->name.'</a>';
$output[$outkey]->time = $eventtime;
$output[$outkey]->courselink = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$event->courseid.'">'.$coursecache[$event->courseid]->fullname.'</a>';
} else if($event->courseid == 1) { // Site event
- $output[$outkey]->icon = '<img height=16 width=16 src="'.$CFG->pixpath.'/c/site.gif" alt="" style="vertical-align: middle;" />';
+ $output[$outkey]->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/site.gif" alt="" style="vertical-align: middle;" />';
$output[$outkey]->time = $eventtime;
} else if($event->courseid > 1 and !$event->groupid) { // Course event
calendar_get_course_cached($coursecache, $event->courseid);
- $output[$outkey]->icon = '<img height=16 width=16 src="'.$CFG->pixpath.'/c/course.gif" alt="" style="vertical-align: middle;" />';
+ $output[$outkey]->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/course.gif" alt="" style="vertical-align: middle;" />';
$output[$outkey]->time = $eventtime;
$output[$outkey]->courselink = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$event->courseid.'">'.$coursecache[$event->courseid]->fullname.'</a>';
} else if ($event->groupid) { // Group event
- $output[$outkey]->icon = '<img height=16 width=16 src="'.$CFG->pixpath.'/c/group.gif" alt="" style="vertical-align: middle;" />';
+ $output[$outkey]->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/group.gif" alt="" style="vertical-align: middle;" />';
$output[$outkey]->time = $eventtime;
} else if($event->userid) { // User event
- $output[$outkey]->icon = '<img height=16 width=16 src="'.$CFG->pixpath.'/c/user.gif" alt="" style="vertical-align: middle;" />';
+ $output[$outkey]->icon = '<img height="16" width="16" src="'.$CFG->pixpath.'/c/user.gif" alt="" style="vertical-align: middle;" />';
$output[$outkey]->time = $eventtime;
}
++$processed;
<table cellpadding="9" cellspacing="0">
<tr valign="top">
- <td nowrap="nowrap" align="right"><p><?php print_string('pref_timeformat', 'calendar')?>:</td>
+ <td nowrap="nowrap" align="right"><?php print_string('pref_timeformat', 'calendar')?>:</td>
<td>
- <?php
+ <?php
$options = NULL;
$options['0'] = get_string('default', 'calendar');
$options[CALENDAR_TF_12] = get_string('timeformat_12', 'calendar');
$options[CALENDAR_TF_24] = get_string('timeformat_24', 'calendar');
- choose_from_menu ($options, "timeformat", $prefs->timeformat, "", "", "");
+ choose_from_menu ($options, "timeformat", $prefs->timeformat, "", "", "");
?>
</td>
<td>
</tr>
<tr valign="top">
- <td nowrap="nowrap" align="right"><p><?php print_string('pref_startwday', 'calendar')?>:</td>
+ <td nowrap="nowrap" align="right"><?php print_string('pref_startwday', 'calendar')?>:</td>
<td>
- <?php
+ <?php
$options = NULL;
$options[0] = get_string('sunday', 'calendar');
$options[1] = get_string('monday', 'calendar');
</tr>
<tr valign="top">
- <td nowrap="nowrap" align="right"><p><?php print_string('pref_maxevents', 'calendar')?>:</td>
+ <td nowrap="nowrap" align="right"><?php print_string('pref_maxevents', 'calendar')?>:</td>
<td>
- <?php
+ <?php
$options = NULL;
for ($i=1; $i<=20; $i++) {
$options[$i] = $i;
}
- choose_from_menu ($options, "maxevents", $prefs->maxevents, "", "", "");
+ choose_from_menu ($options, "maxevents", $prefs->maxevents, "", "", "");
?>
</td>
<td>
</tr>
<tr valign="top">
- <td nowrap="nowrap" align="right"><p><?php print_string('pref_lookahead', 'calendar')?>:</td>
+ <td nowrap="nowrap" align="right"><?php print_string('pref_lookahead', 'calendar')?>:</td>
<td>
- <?php
+ <?php
$options = NULL;
for ($i=1; $i<=200; $i++) {
$options[$i] = $i;
}
- choose_from_menu ($options, "lookahead", $prefs->lookahead, "", "", "");
+ choose_from_menu ($options, "lookahead", $prefs->lookahead, "", "", "");
?>
</td>
<td>
<tr>
<td colspan="3" align="center">
- <input type="submit" value="<?php print_string("savechanges") ?>"></td>
+ <input type="submit" value="<?php print_string("savechanges") ?>" /></td>
</tr>
</table>
list($nextmon, $nextyr) = calendar_add_month($mon, $yr);
$getvars = 'cal_d='.$day.'&cal_m='.$mon.'&cal_y='.$yr; // For filtering
echo calendar_filter_controls($_GET['view'], $getvars);
- echo '<p>';
+ echo '<div style="margin: 10px 0px;">';
echo calendar_top_controls('display', array('m' => $prevmon, 'y' => $prevyr));
echo calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr);
- echo '</p><p>';
+ echo '</div><div style="margin: 10px 0px;">';
echo calendar_top_controls('display', array('m' => $mon, 'y' => $yr));
echo calendar_get_mini($courses, $groups, $users, $mon, $yr);
- echo '</p><p>';
+ echo '</div><div style="margin: 10px 0px;">';
echo calendar_top_controls('display', array('m' => $nextmon, 'y' => $nextyr));
echo calendar_get_mini($courses, $groups, $users, $nextmon, $nextyr);
- echo '</p>';
+ echo '</div>';
print_side_block_end();
print_spacer(1, 180);
echo '</td>';
}
print_side_block_start($text, array('class' => 'mycalendar'));
- echo '<p>'.calendar_top_controls('day', array('d' => $d, 'm' => $m, 'y' => $y)).'</p>';
+ echo '<div>'.calendar_top_controls('day', array('d' => $d, 'm' => $m, 'y' => $y)).'</div>';
if (empty($events)) {
// There is nothing to display today.
echo "</tr>\n";
}
- echo '<tbody></table><br />';
+ echo '</tbody></table><br />';
print_side_block_end();
}