Added the ability to set a category to the event. This is NOT fully functional, but it falls in line with libmcal.

This commit is contained in:
skeeter 2001-03-24 05:06:45 +00:00
parent 4f49fdc555
commit ffe0f08d7c
2 changed files with 13 additions and 2 deletions

View File

@ -271,7 +271,6 @@
while ($user = each($users))
{
$userid = intval($user[0]);
echo '<!-- USERID = '.$userid.' -->'."\n";
if($userid != $owner && $phpgw->accounts->exists($userid) == True)
{
$str .= ' <option value="' . $userid . '"'.$parts[$userid].'>('.$phpgw->accounts->get_type($userid).') '.$user[1].'</option>'."\n";
@ -300,6 +299,18 @@
$str .= '>';
display_item($phpgw->common->grab_owner_name($owner).' '.lang('Participates'),$str);
// Categories
$c = CreateObject('phpgwapi.categories',Array($owner,'calendar'));
if($c->total('calendar') > 0)
{
$str = "\n".' <select name="category" size="5">'."\n";
$str .= $c->formated_list('select','all',$event->category);
$str .= ' </select>';
display_item(lang('Categories'),$str);
}
unset($c);
// Repeat Type
$p->set_var('hr_text','<hr>');
$p->parse('output','hr',True);

View File

@ -109,7 +109,7 @@
$cal_stream = $phpgw->calendar->open('INBOX',intval($owner),'');
$phpgw->calendar->event_init($cal_stream);
$phpgw->calendar->event_set_category($cal_stream,'');
$phpgw->calendar->event_set_category($cal_stream,$category);
$phpgw->calendar->event_set_title($cal_stream,$title);
$phpgw->calendar->event_set_description($cal_stream,$description);
$phpgw->calendar->event_set_start($cal_stream,$start[year],$start[month],$start[mday],$start[hour],$start[min],0);