Index: newticket.php =================================================================== RCS file: /cvsroot/phpgroupware/tts/newticket.php,v retrieving revision 1.31.2.2 diff -u -b -B -r1.31.2.2 newticket.php --- newticket.php 25 Jan 2002 22:00:52 -0000 1.31.2.2 +++ newticket.php 27 Feb 2002 23:05:06 -0000 @@ -133,7 +133,7 @@ { $GLOBALS['phpgw']->template->set_var('optionname', $entry['account_name']); $GLOBALS['phpgw']->template->set_var('optionvalue', $entry['account_id']); - $GLOBALS['phpgw']->template->set_var('optionselected', $tag); + $GLOBALS['phpgw']->template->set_var('optionselected', $entry_selected[$entry['account_id']]); $GLOBALS['phpgw']->template->parse('options_group','options_select',true); } @@ -145,24 +145,32 @@ $accounts = $groups; $accounts->account_id = $group_id; $account_list = $accounts->get_list('accounts'); + + $GLOBALS['phpgw']->template->set_var('optionname',lang('None')); + $GLOBALS['phpgw']->template->set_var('optionvalue','0'); + $GLOBALS['phpgw']->template->set_var('optionselected',''); + $GLOBALS['phpgw']->template->parse('options_assignedto','options_select',true); + while (list($key,$entry) = each($account_list)) { - $s .= '<option value="' . $entry['account_id'] . '" ' . $entry_selected[$entry['account_lid']] - . '>' . $entry['account_lid'] . '</option>'; + $GLOBALS['phpgw']->template->set_var('optionname', $entry['account_lid']); + $GLOBALS['phpgw']->template->set_var('optionvalue', $entry['account_id']); + $GLOBALS['phpgw']->template->set_var('optionselected', $account_selected[$entry['account_id']]); + $GLOBALS['phpgw']->template->parse('options_assignedto','options_select',True); } - $GLOBALS['phpgw']->template->set_var('value_assignedto','<select name="ticket[assignedto]">' . $s . '</select>'); - //$GLOBALS['phpgw']->template->set_var('tts_account_lid','0'); - //$GLOBALS['phpgw']->template->set_var('tts_account_name',lang('None')); + $GLOBALS['phpgw']->template->set_var('value_assignedto','<select name="ticket[assignedto]">' . $s . '</select>'); // Choose the correct priority to display - $prority_selected[$ticket['priority']] = ' selected'; $priority_comment[1]=' - '.lang('Lowest'); $priority_comment[5]=' - '.lang('Medium'); $priority_comment[10]=' - '.lang('Highest'); for ($i=1; $i<=10; $i++) { - $priority_select .= '<option value="' . $i . '">' . $i . $priority_comment[$i] . '</option>'; + $GLOBALS['phpgw']->template->set_var('optionname', $i.$priority_comment[$i]); + $GLOBALS['phpgw']->template->set_var('optionvalue', $i); + $GLOBALS['phpgw']->template->set_var('optionselected', $priority_selected[$i]); + $GLOBALS['phpgw']->template->parse('options_priority','options_select',true); } $GLOBALS['phpgw']->template->set_var('value_priority','<select name="ticket[priority]">' . $priority_select . '</select>'); Index: templates/default/newticket.tpl =================================================================== RCS file: /cvsroot/phpgroupware/tts/templates/default/newticket.tpl,v retrieving revision 1.6.2.2 diff -u -b -B -r1.6.2.2 newticket.tpl --- templates/default/newticket.tpl 15 Feb 2002 21:01:09 -0000 1.6.2.2 +++ templates/default/newticket.tpl 27 Feb 2002 23:05:06 -0000 @@ -19,21 +19,21 @@ <tr bgcolor="{row_off}"> <td align="left">{lang_assignedto}:</td> - <td align="left">{value_assignedto}</td> + <td align="left"><select name="ticket[assignedto]">{options_assignedto}</select></td> <td align="left">{lang_billable_hours}:</td> <td align="left"><input name="ticket[billable_hours]" value="{value_billable_hours}"></td> </tr> <tr bgcolor="{row_off}"> <td align="left">{lang_priority}:</td> - <td align="left">{value_priority}</td> + <td align="left"><select name="ticket[priority]">{options_priority}</select></td> <td align="left">{lang_billable_hours_rate}:</td> <td align="left"><input name="ticket[billable_rate]" value="{value_billable_hours_rate}"></td> </tr> <tr bgcolor="{row_off}"> <td align="left">{lang_group}:</td> - <td align="left"><select name="ticket[group]">{options_group}</select></b></td> + <td align="left"><select name="ticket[group]">{options_group}</select></td> <td align="left">{lang_category}:</td> <td align="left">{value_category}</td> </tr>