- Hide category choice, timesheet only replaces

- Fix Set to: category list
This commit is contained in:
Nathan Gray 2011-04-04 17:13:59 +00:00
parent 1777dbcf2a
commit 19b7918a73

View File

@ -60,6 +60,14 @@ class timesheet_wizard_import_csv extends importexport_wizard_basic_import_csv
);
}
function wizard_step40(&$content, &$sel_options, &$readonlys, &$preserv)
{
$result = parent::wizard_step40($content, $sel_options, $readonlys, $preserv);
// Hide category choice, replace is the only one that makes sense
$content['no_cats'] = true;
return $result;
}
function wizard_step45(&$content, &$sel_options, &$readonlys, &$preserv)
{
if($this->debug) error_log(__METHOD__.'->$content '.print_r($content,true));
@ -92,7 +100,7 @@ class timesheet_wizard_import_csv extends importexport_wizard_basic_import_csv
'add' => lang('Add'),
);
$set_to = lang('Set to') . ':';
$categories = new categories('timesheet');
$categories = new categories('','timesheet');
$cat_list = array();
foreach((array)$categories->return_sorted_array(0,False,'','','',true) as $cat) {
$s = str_repeat(' ',$cat['level']) . stripslashes($cat['name']);