update edit_cats to move the subtree with the cat if the parent changes

This commit is contained in:
ceb 2002-10-12 18:43:58 +00:00
parent 05653960d4
commit edc9286de9
2 changed files with 12 additions and 16 deletions

View File

@ -282,23 +282,20 @@
else
{
$this->bo->save_cat($values);
$GLOBALS['phpgw']->template->set_var('message',lang('Category x has been added !', $cat_name));
$GLOBALS['phpgw']->template->set_var('message',lang('Category x has been added !', $values['name']));
}
}
$link_data['menuaction'] = 'admin.uicategories.add';
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->formatted_list(array
(
'select' => 'select',
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->formatted_list(array('select' => 'select',
'all' => 'all',
'cat_parent' => $cat_parent,
'global_cats' => $global_cats
)));
'parent' => $values['parent'],
'global_cats' => $global_cats)));
$GLOBALS['phpgw']->template->set_var('cat_name',$cat_name);
$GLOBALS['phpgw']->template->set_var('cat_description',$cat_description);
$GLOBALS['phpgw']->template->set_var('cat_name',$values['name']);
$GLOBALS['phpgw']->template->set_var('cat_description',$values['descr']);
$GLOBALS['phpgw']->template->parse('buttons','add');
$GLOBALS['phpgw']->template->fp('phpgw_body','form');

View File

@ -328,12 +328,11 @@
$type = 'mains';
}
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->cats->formated_list('select',$type,$cat_parent,$global_cats));
$GLOBALS['phpgw']->template->set_var('cat_name',$cat_name);
$GLOBALS['phpgw']->template->set_var('cat_description',$cat_description);
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->cats->formated_list('select',$type,$values['parent'],$global_cats));
$GLOBALS['phpgw']->template->set_var('cat_name',$values['name']);
$GLOBALS['phpgw']->template->set_var('cat_description',$values['descr']);
$GLOBALS['phpgw']->template->set_var('access','<input type="checkbox" name="cat_access" value="True"'
. ($cat_access == True ?' checked':'') . '>');
$GLOBALS['phpgw']->template->set_var('access',$values['access'] == 'private'?' checked':'');
if ($extra)
{
@ -442,7 +441,7 @@
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->cats->formated_list('select',$type,$cats['parent'],$global_cats));
$GLOBALS['phpgw']->template->set_var('access',$cats['access'] == 'private' ?' checked':'');
$GLOBALS['phpgw']->template->set_var('access',$cats['access'] == 'private'?' checked':'');
if ($extra)
{