Index: admin.php =================================================================== RCS file: /cvsroot/phpgroupware/tts/admin.php,v retrieving revision 1.2.2.1 diff -u -r1.2.2.1 admin.php --- admin.php 25 Jan 2002 22:00:52 -0000 1.2.2.1 +++ admin.php 28 Feb 2002 00:14:33 -0000 @@ -68,11 +70,18 @@ unset($GLOBALS['phpgw']->config->config_data['assignednotification']); } + if ($HTTP_POST_VARS['useallgroups']) + { + $GLOBALS['phpgw']->config->config_data['allgroups'] = True; + } + else + { + unset($GLOBALS['phpgw']->config->config_data['allgroups']); + } + $GLOBALS['phpgw']->config->save_repository(True); Header('Location: ' . $GLOBALS['phpgw']->link('/admin/index.php')); } -$after= $GLOBALS['phpgw']->config->config_data['mailnotification']; -echo "after: $after <br>"; $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); @@ -149,6 +167,16 @@ $GLOBALS['phpgw']->template->set_var('tts_optionvalue', $i); $GLOBALS['phpgw']->template->set_var('tts_optionselected', $assigned_selected[$i]); $GLOBALS['phpgw']->template->parse('tts_assignedoptions','tts_select_options',true); + } + + $GLOBALS['phpgw']->template->set_var('lang_allgroups',lang('Assign to all groups')); + if ($GLOBALS['phpgw']->config->config_data['allgroups']) + { + $GLOBALS['phpgw']->template->set_var('allgroups',' checked'); + } + else + { + $GLOBALS['phpgw']->template->set_var('allgroups',''); } $GLOBALS['phpgw']->template->set_var('lang_admin',lang('TTS').' '.lang('Admin')); Index: newticket.php =================================================================== RCS file: /cvsroot/phpgroupware/tts/newticket.php,v retrieving revision 1.31.2.2 diff -u -r1.31.2.2 newticket.php --- newticket.php 25 Jan 2002 22:00:52 -0000 1.31.2.2 +++ newticket.php 28 Feb 2002 00:14:33 -0000 @@ -77,6 +77,12 @@ { $entry_selected[$GLOBALS['phpgw_info']['user']['preferences']['tts']['groupdefault']]=' selected'; } + else + { + // default to first group they are a member of + $grouplist = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']); + $entry_selected[$grouplist[0]['account_id']] = ' selected'; + } if ($GLOBALS['phpgw_info']['user']['preferences']['tts']['assigntodefault']) { @@ -126,12 +132,19 @@ unset($s); $groups = CreateObject('phpgwapi.accounts'); - $group_list=Array(); - $group_list=$GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']); + $group_list=Array(); + if ($GLOBALS['phpgw']->config->config_data['allgroups']) + { + $group_list=$GLOBALS['phpgw']->accounts->get_list('groups'); + } + else + { + $group_list=$GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']); + } while (list($key,$entry) = each($group_list)) { - $GLOBALS['phpgw']->template->set_var('optionname', $entry['account_name']); + $GLOBALS['phpgw']->template->set_var('optionname', $entry['account_name']?$entry['account_name']:$entry['account_lid']); $GLOBALS['phpgw']->template->set_var('optionvalue', $entry['account_id']); $GLOBALS['phpgw']->template->set_var('optionselected', $entry_selected[$entry['account_id']]); $GLOBALS['phpgw']->template->parse('options_group','options_select',true); Index: viewticket_details.php =================================================================== RCS file: /cvsroot/phpgroupware/tts/viewticket_details.php,v retrieving revision 1.42.2.3 diff -u -r1.42.2.3 viewticket_details.php --- viewticket_details.php 25 Jan 2002 23:48:16 -0000 1.42.2.3 +++ viewticket_details.php 28 Feb 2002 00:14:34 -0000 @@ -149,7 +149,14 @@ // group $group_list = array(); - $group_list = $GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']); + if ($GLOBALS['phpgw']->config->config_data['allgroups']) + { + $group_list=$GLOBALS['phpgw']->accounts->get_list('groups'); + } + else + { + $group_list=$GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']); + } while (list($key,$entry) = each($group_list)) { @@ -158,7 +165,7 @@ { $tag = 'selected'; } - $GLOBALS['phpgw']->template->set_var('optionname', $entry['account_name']); + $GLOBALS['phpgw']->template->set_var('optionname', $entry['account_name']?$entry['account_name']:$entry['account_lid']); $GLOBALS['phpgw']->template->set_var('optionvalue', $entry['account_id']); $GLOBALS['phpgw']->template->set_var('optionselected', $tag); $GLOBALS['phpgw']->template->parse('options_group','options_select',true); Index: templates/default/admin.tpl =================================================================== RCS file: /cvsroot/phpgroupware/tts/templates/default/admin.tpl,v retrieving revision 1.3 diff -u -r1.3 admin.tpl --- templates/default/admin.tpl 26 Sep 2001 23:59:52 -0000 1.3 +++ templates/default/admin.tpl 28 Feb 2002 00:14:34 -0000 @@ -51,6 +51,10 @@ </select> </td> </tr> + <tr bgcolor="#EEEEEE"> + <td>{lang_allgroups}</td> + <td><input type="checkbox" name="useallgroups"{allgroups}></td> + </tr> <tr> <td colspan="3" align="center"> <input type="submit" name="submit" value="{lang_submit}">