#610: auto-fill uemail field in tracking.function.php
-----------------------+----------------------------------------------------
 Reporter:  mags       |       Owner:  anonymous
     Type:  bug        |      Status:  new      
 Priority:  normal     |   Milestone:  0.68     
Component:  Général  |     Version:  0.68     
 Severity:  minor      |    Keywords:           
-----------------------+----------------------------------------------------
 for users of "command center" ui, would be nice for ticket form to auto-
 fill uemail field (similar to users of "helpdesk" ui). not sure if there
 is a better way to get user e-mail string, but this works for me...
 {{{
 --- tracking.function.php.old   2006-07-12 00:25:15.000000000 -0400
 +++ tracking.function.php       2006-07-12 12:10:43.119429100 -0400
 @@ -671,7 +671,7 @@
  function addFormTracking
 ($device_type=0,$ID=0,$author,$assign,$target,$error,$searchauthor='') {
         // Prints a nice form to add jobs

 -       global $cfg_glpi, $lang,$cfg_glpi,$REFERER;
 +       global $cfg_glpi, $lang,$cfg_glpi,$REFERER,$db;
         if (!haveRight("create_ticket","1")) return false;

         if (!empty($error)) {
 @@ -791,6 +791,9 @@

         if($cfg_glpi["mailing"] == 1)
         {
 +               $query="SELECT email from glpi_users WHERE ID='$author'";
 +               $result=$db->query($query);
 +               $email=$db->result($result,0,"email");
                 echo "<tr class='tab_bg_1'>";
                 echo "<td align='center'>".$lang["help"][8].":</td>";
                 echo "<td align='center'>       <select
 name='emailupdates'>";
 @@ -800,7 +803,7 @@
                 echo "</td>";
                 echo "<td align='center'>".$lang["help"][11].":</td>";
                 echo "<td>      ";
 -               echo "<input type='text' size='30' name='uemail'>";
 +               echo "<input type='text' size='30' name='uemail'
 value='$email'>";
                 echo "</td></tr>";

         }

 }}}

-- 
Ticket URL: <https://dev.indepnet.net:8080/glpi/ticket/610>
GLPI <https://dev.indepnet.net:8080/glpi/>
Gestion Libre de Parc Informatique
_______________________________________________
Glpi-bugtrack mailing list
[email protected]
https://mail.gna.org/listinfo/glpi-bugtrack

Répondre à