phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] tts/newticket.php, 1.31.2.3.4.5


From: nomail
Subject: [Phpgroupware-cvs] tts/newticket.php, 1.31.2.3.4.5
Date: Thu, 12 Aug 2004 11:04:24 +0200

Update of /tts
Modified Files:
        Branch: Version-0_9_16-branch
          newticket.php

date: 2004/08/12 09:04:24;  author: lpiepho;  state: Exp;  lines: +26 -12

Log Message:
bugfix in mailing, updated account-selectbox
=====================================================================
Index: tts/newticket.php
diff -u tts/newticket.php:1.31.2.3.4.4 tts/newticket.php:1.31.2.3.4.5
--- tts/newticket.php:1.31.2.3.4.4      Tue Apr 20 12:52:17 2004
+++ tts/newticket.php   Thu Aug 12 09:04:24 2004
@@ -94,7 +94,7 @@
                        . ($_POST['ticket']['type'] ? $_POST['ticket']['type'] 
: 0) . "','"
                        . ($_POST['ticket']['platform'] ? 
$_POST['ticket']['platform'] : 0) . "','"
                        . ($file_id ? $file_id : 0). "','"
-                       . addslashes($ticket['details']) . 
"')",__LINE__,__FILE__);
+                       . addslashes($_POST['ticket']['details']) . 
"')",__LINE__,__FILE__);
 
                $ticket_id = 
$GLOBALS['phpgw']->db->get_last_insert_id('phpgw_tts_tickets','ticket_id');
 
@@ -219,21 +219,35 @@
                unset($s);
                $accounts = $groups;
                $accounts->account_id = $group_id;
-               $account_list = $accounts->get_list('accounts');
+               $account_list = $accounts->get_list('accounts');                
+               
                while(list($key,$entry) = each($account_list))
                {
-                       
if($GLOBALS['phpgw_info']['user']['preferences']['tts']['assigntodefault'] == 
$entry['account_id'])
-                       {
-                               $account_selected = 'selected';
-                       }
-                       else
+                       
$GLOBALS['phpgw']->accounts->get_account_name($entry['account_id'],$lid,$fname,$lname);
+                       if(!$fname && !$lname)
+                               continue;
+                       $employees_list[$entry['account_id']] = 
$GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname);
+                       
+                       if(count($employees_list))
+                               {
+                                       asort($employees_list);
+                                       reset($employees_list);
+                               }
+               }
+               
+               $select_employee_list = "<select name=\"ticket[assignedto]\" 
size=\"1\">\n";
+               while (list($account_id,$account_name) = each($employees_list))
+               {
+                       $select_employee_list .= '<option value="' . 
$account_id . '"';
+                       if 
($GLOBALS['phpgw_info']['user']['preferences']['tts']['assigntodefault'] == 
$account_id)
                        {
-                               $account_selected = '';
+                               $select_employee_list .= ' selected';
                        }
-                       $s .= '<option value="' . $entry['account_id'] . '" ' . 
$account_selected
-                               . '>' . $entry['account_lid'] . '</option>';
+                       $select_employee_list .= 
'>'.$account_name."</option>\n";
                }
-               
$GLOBALS['phpgw']->template->set_var('value_assignedto','<select 
name="ticket[assignedto]">' . $s . '</select>');
+               $select_employee_list .= '</select>';
+               
+               
$GLOBALS['phpgw']->template->set_var('value_assignedto',$select_employee_list);
 
                //auswahlfelder type und platform
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]