only offer status-items appropriate for the selected type

This commit is contained in:
Ralf Becker 2001-07-19 01:28:16 +00:00
parent ae7482c952
commit 324b3921d7
2 changed files with 18 additions and 3 deletions

View File

@ -54,6 +54,19 @@
/* 'confirm' => 'confirm','reject' => 'reject','email' => 'email',
'fax' => 'fax' no implemented so far */ )
);
$this->status = array(
'defaults' => array(
'task' => 'ongoing', 'phone' => 'call', 'note' => 'done'),
'task' => array(
'offer' => 'offer','ongoing' => 'ongoing',
'done' => 'done', 'billed' => 'billed' ),
'phone' => array(
'call' => 'call','will-call' => 'will-call',
'done' => 'done', 'billed' => 'billed' ),
'note' => array(
'ongoing' => 'ongoing', 'done' => 'done'
));
$this->so = CreateObject('infolog.soinfolog');
$this->data = &$this->so->data;
$this->grants = &$this->so->grants;

View File

@ -738,8 +738,9 @@
$t->set_var('lang_type',lang('Type'));
if (!isset($type)) $type = $this->data['info_type'];
$t->set_var('type_list',$sb->getArrayItem('type',$type,
$this->enums['type']));
if (!$type) $type = 'note';
$t->set_var('type_list',$html->sbox_submit($sb->getArrayItem(
'type',$type,$this->enums['type']),True));
$t->set_var('lang_prfrom', lang('From'));
if (!isset($from)) $from =$phpgw->strip_html($this->data['info_from']);
@ -782,8 +783,9 @@
$t->set_var('lang_status',lang('Status'));
if (!isset($status)) $status = $this->data['info_status'];
if (!$status) $status = $this->bo->status['defaults'][$type];
$t->set_var('status_list',$sb->getArrayItem('status',$status,
$this->enums['status']));
$this->bo->status[$type]));
$t->set_var('lang_priority',lang('Priority'));
if (!isset($pri)) $pri = $this->data['info_pri'];