If no alarms are set, it should be ok now.

This commit is contained in:
skeeter 2001-11-04 04:08:57 +00:00
parent 11ae5e79ec
commit c5314f991b

View File

@ -112,17 +112,20 @@
$this->template->set_var('hr_text','<hr>'); $this->template->set_var('hr_text','<hr>');
$this->template->parse('row','hr',True); $this->template->parse('row','hr',True);
@reset($this->event['alarm']); if($this->event['alarm'])
while(list($key,$alarm) = each($this->event['alarm']))
{ {
$var = Array( @reset($this->event['alarm']);
'edit_box' => '<input type="checkbox" name="alarm[id]" value="'.$alarm['id'].'">', while(list($key,$alarm) = each($this->event['alarm']))
'field' => $icon.$GLOBALS['phpgw']->common->show_date($alarm['time']), {
'data' => $alarm['text'], $var = Array(
'alarm_enabled' => ($alarm['enabled']?'<img src="'.$GLOBALS['phpgw']->common->image('calendar','enabled.gif').'" width="13" height="13" alt="enabled">':'&nbsp;'), 'edit_box' => '<input type="checkbox" name="alarm[id]" value="'.$alarm['id'].'">',
'alarm_disabled' => (!$alarm['enabled']?'<img src="'.$GLOBALS['phpgw']->common->image('calendar','disabled.gif').'" width="13" height="13" alt="disabled">':'&nbsp;') 'field' => $icon.$GLOBALS['phpgw']->common->show_date($alarm['time']),
); 'data' => $alarm['text'],
$this->output_template_array('row','list',$var); 'alarm_enabled' => ($alarm['enabled']?'<img src="'.$GLOBALS['phpgw']->common->image('calendar','enabled.gif').'" width="13" height="13" alt="enabled">':'&nbsp;'),
'alarm_disabled' => (!$alarm['enabled']?'<img src="'.$GLOBALS['phpgw']->common->image('calendar','disabled.gif').'" width="13" height="13" alt="disabled">':'&nbsp;')
);
$this->output_template_array('row','list',$var);
}
} }
$this->template->set_var('hr_text','<hr>'); $this->template->set_var('hr_text','<hr>');
$this->template->parse('row','hr',True); $this->template->parse('row','hr',True);