J'ai corrigé le problème du suivi, ajouté un bouton de raz du formulaire
plus joli que sur l'ancien formulaire d'ajout de ticket, rajouter un
  avant chaque :, corrigé l'affichage du lien d'ajout de suivi dans
l'ouverture de ticket


Le Thu, 22 Oct 2009 00:55:14 +0200
MoYo <m...@indepnet.net> a écrit:

>David DURIEUX a écrit :
>> Voilà le patch, j'ai testé un peu dans tous les sens, ça a l'air bon.
>>
>>   
>
>J'ai intégré comme ca on en parlera plus.
>Voilà les quelques remarques concluant mes premiers tests rapides :
>- il n'est plus possible de faire un reset du formulaire de saisie
>d'un ticket
>- sur le formulaire de saisie, il n'y a plus de gestion automatique de 
>la saisie pour le suivi par email  (email et activation du suivi si le 
>user à un email)
>
>> J'ai déplacé les coûts dans un onglet, je ne l'ai pas fini, je vais
>> bosser dessus aujourd'hui et envoyé un patch ce soir. D'ailleurs, sur
>> les coûts, ne devrait on pas ajouter un champ coût horaire à chaque
>> technicien (sur sa fiche user) pour que ça se calcule
>> automatiquement et correctement lors de la mise à jour d'un suivi?
>> Quitte à ce que je taffe sur les coûts, autant aller au bout ;)
>>   
>- l'onglet coût n'est pas visible, c'est normal ? il ne manquerai pas 
>des fichiers (class et tabs ) ?
>
>
>Je n'ai pas du tout regardé le code.
>Vu qu'il va y avoir pas mal de job dessus par la suite on aura le
>temps de revenir dessus de toute façon.
>
>++
>
>Julien
>
>
>_______________________________________________
>Glpi-dev mailing list
>Glpi-dev@gna.org
>https://mail.gna.org/listinfo/glpi-dev
# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /usr/local/www/data-dist/glpi080/inc
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: tracking.function.php
--- tracking.function.php Locally New
+++ tracking.function.php Locally New
@@ -1937,7 +1937,7 @@
       echo '<tr>';
       echo '<th colspan="4">';
       if ($ID == 0) {
-         echo $LANG['job'][46].":&nbsp;".getDropdownName("glpi_entities",$job->fields['entity_restrict']);
+         echo $LANG['job'][46]."&nbsp;:&nbsp;".getDropdownName("glpi_entities",$job->fields['entity_restrict']);
       } else {
          echo getDropdownName('glpi_entities',$job->fields['entities_id']);
       }
@@ -1953,7 +1953,7 @@
    echo "<tr>";
    echo "<td>";
    echo "<span class='tracking_small'>";
-   echo $LANG['joblist'][11].": </span>";
+   echo $LANG['joblist'][11]."&nbsp;: </span>";
    echo "</td>";
    echo "<td>";
    if ($ID == "0") {
@@ -1976,7 +1976,7 @@
          echo "<table>";
          echo "<tr>";
          echo "<td>";
-         echo "<span class='tracking_small'>".$LANG['joblist'][12].": ";
+         echo "<span class='tracking_small'>".$LANG['joblist'][12]."&nbsp;: ";
          echo "</td>";
          echo "<td>";
 
@@ -1995,7 +1995,7 @@
 
    echo "<th colspan='2' width='50%'>";
    if ($ID > 0 ) {
-      echo "<span class='tracking_small'>".$LANG['common'][26].":<br>";
+      echo "<span class='tracking_small'>".$LANG['common'][26]."&nbsp;:<br>";
 		echo convDateTime($job->fields["date_mod"])."\n";
       echo "</span>";
    }
@@ -2004,7 +2004,7 @@
 
    echo "<tr class='tab_bg_1'>";
    echo "<td class='left' width='60'>";
-   echo $LANG['joblist'][0].":";
+   echo $LANG['joblist'][0]."&nbsp;:";
    echo "</td>";
    echo "<td>";
    if ($canupdate) {
@@ -2014,20 +2014,20 @@
 		}
    echo "</td>";
    echo "<th class='center' colspan='2'><strong>";
-   echo $LANG['job'][4].":";
+   echo $LANG['job'][4]."&nbsp;:";
    echo "</strong></th>";
    echo "</tr>";
 
    echo "<tr class='tab_bg_1'>";
    echo "<td class='left'>";
-   echo $LANG['joblist'][29].":";
+   echo $LANG['joblist'][29]."&nbsp;:";
    echo "</td>";
    echo "<td>";
    // TODO : PUT Urgence
    echo "</td>";
    echo "<td class='left'>";
    if (($ID == "0") AND (haveRight("update_ticket","1"))) {
-      echo $LANG['job'][4].":";
+      echo $LANG['job'][4]."&nbsp;:";
       echo "</td>";
       echo "<td>";
 
@@ -2067,12 +2067,12 @@
          echo "<input type='hidden' name='entities_id' value='".$array["entity_restrict"]."'>";
       }
    } else if ($canupdate){
-      echo $LANG['common'][34].":";
+      echo $LANG['common'][34]."&nbsp;:";
       echo "</td>";
       echo "<td>";
 			dropdownAllUsers("users_id",$job->fields["users_id"],1,$job->fields["entities_id"]);
 		} else {
-      echo $LANG['common'][34].":";
+      echo $LANG['common'][34]."&nbsp;:";
       echo "</td>";
       echo "<td>";
 			echo getUserName($job->fields["users_id"],$showuserlink);
@@ -2082,13 +2082,13 @@
 
    echo "<tr class='tab_bg_1'>";
    echo "<td class='left'>";
-   echo $LANG['joblist'][30].":";
+   echo $LANG['joblist'][30]."&nbsp;:";
    echo "</td>";
    echo "<td>";
    // TODO : PUT Impact
    echo "</td>";
    echo "<td class='left'>";
-   echo $LANG['common'][35].":";
+   echo $LANG['common'][35]."&nbsp;:";
    echo "</td>";
    echo "<td>";
    if ($canupdate) {
@@ -2101,7 +2101,7 @@
 
    echo "<tr class='tab_bg_1'>";
    echo "<td class='left'>";
-   echo $LANG['joblist'][2].":";
+   echo $LANG['joblist'][2]."&nbsp;:";
    echo "</td>";
    echo "<td>";
 		if ($canupdate)
@@ -2109,13 +2109,13 @@
    else echo getPriorityName($job->fields["priority"]);
    echo "</td>";
    echo "<th class='center' colspan='2'><strong>";
-   echo $LANG['job'][5].":";
+   echo $LANG['job'][5]."&nbsp;:";
    echo "</strong></th>";
    echo "</tr>";
 
    echo "<tr class='tab_bg_1'>";
    echo "<td class='left'>";
-   echo $LANG['common'][36].":";
+   echo $LANG['common'][36]."&nbsp;:";
    echo "</td>";
    echo "<td >";
    if ($canupdate) {
@@ -2126,28 +2126,28 @@
    echo "</td>";
    if (haveRight("assign_ticket","1")) {
       echo "<td class='left'>";
-      echo $LANG['job'][6].":";
+      echo $LANG['job'][6]."&nbsp;:";
       echo "</td>";
       echo "<td>";
 			dropdownUsers("users_id_assign",$job->fields["users_id_assign"],"own_ticket",0,1,$job->fields["entities_id"]);
       echo "</td>";
 		} else if (haveRight("steal_ticket","1")) {
       echo "<td class='right'>";
-      echo $LANG['job'][6].":";
+      echo $LANG['job'][6]."&nbsp;:";
       echo "</td>";
       echo "<td>";
 			dropdownUsers("users_id_assign",$job->fields["users_id_assign"],"id",0,1,$job->fields["entities_id"]);
       echo "</td>";
    } else if (haveRight("own_ticket","1") && $job->fields["users_id_assign"]==0) {
       echo "<td class='right'>";
-      echo $LANG['job'][6].":";
+      echo $LANG['job'][6]."&nbsp;:";
       echo "</td>";
       echo "<td>";
                         dropdownUsers("users_id_assign",$job->fields["users_id_assign"],"id",0,1,$job->fields["entities_id"]);
       echo "</td>";
                 } else {
       echo "<td class='left'>";
-      echo $LANG['job'][6].":";
+      echo $LANG['job'][6]."&nbsp;:";
       echo "</td>";
       echo "<td>";
 			echo getUserName($job->fields["users_id_assign"],$showuserlink);
@@ -2157,7 +2157,7 @@
 
    echo "<tr class='tab_bg_1'>";
    echo "<td class='left'>";
-   echo $LANG['job'][44].":";
+   echo $LANG['job'][44]."&nbsp;:";
    echo "</td>";
    echo "<td>";
    if ($canupdate) {
@@ -2168,14 +2168,14 @@
    echo "</td>";
    if (haveRight("assign_ticket","1")) {
       echo "<td class='left'>";
-      echo $LANG['common'][35].":";
+      echo $LANG['common'][35]."&nbsp;:";
       echo "</td>";
       echo "<td>";
 			dropdownValue("glpi_groups","groups_id_assign",$job->fields["groups_id_assign"],1,$job->fields["entities_id"]);
       echo "</td>";
 		} else {
       echo "<td class='left'>";
-      echo $LANG['common'][35].":";
+      echo $LANG['common'][35]."&nbsp;:";
       echo "</td>";
       echo "<td>";
 			echo getDropdownName("glpi_groups",$job->fields["groups_id_assign"]);
@@ -2185,7 +2185,7 @@
 
    echo "<tr class='tab_bg_1'>";
    echo "<td class='left'>";
-   echo $LANG['common'][1].":";
+   echo $LANG['common'][1]."&nbsp;:";
 		echo "</td>";
    echo "<td>";
    if ($canupdate) {
@@ -2205,7 +2205,7 @@
 
    if ((haveRight("assign_ticket","1")) AND ($ID != "0")) {
       echo "<td class='left'>";
-      echo $LANG['financial'][26].":";
+      echo $LANG['financial'][26]."&nbsp;:";
       echo "</td>";
       echo "<td>";
       dropdownValue("glpi_suppliers","suppliers_id_assign",$job->fields["suppliers_id_assign"],1,$job->fields["entities_id"]);
@@ -2213,7 +2213,7 @@
    } else {
       if ($ID != "0") {
          echo "<td class='left'>";
-         echo $LANG['financial'][26].":";
+         echo $LANG['financial'][26]."&nbsp;:";
          echo "</td>";
          echo "<td>";
          echo getDropdownName("glpi_suppliers",$job->fields["suppliers_id_assign"]);
@@ -2222,7 +2222,7 @@
          // Need comment right to add a followup with the realtime
          if ((haveRight("comment_all_ticket","1")) AND ($ID == "0")){
             echo "<td class='left'>";
-            echo $LANG['job'][20].":";
+            echo $LANG['job'][20]."&nbsp;:";
             echo "</td>";
             echo "<td align='center' colspan='3'>";
             dropdownInteger('hour',$array['hour'],0,100);
@@ -2239,7 +2239,7 @@
 
    echo "<tr class='tab_bg_1'>";
    echo "<th>";
-   echo $LANG['common'][57]." : ";
+   echo $LANG['common'][57]."&nbsp;: ";
    echo "</th>";
    echo "<th>";
 		if ($canupdate_descr){
@@ -2287,10 +2287,10 @@
    echo "</tr>";
 
    echo "<tr class='tab_bg_1'>";
-   echo "<td rowspan='5'>";
+   echo "<td rowspan='4'>";
    echo $LANG['joblist'][6];
    echo "</td>";
-   echo "<td class='left' rowspan='5'>";
+   echo "<td class='left' rowspan='4'>";
 		if ($canupdate_descr){ // Admin =oui on autorise la modification de la description
 			$rand=mt_rand();
 			echo "<script type='text/javascript' >\n";
@@ -2327,15 +2327,25 @@
 		// Mailing ? Y or no ?
 		if ($CFG_GLPI["use_mailing"]==1){
       echo "<td class='left'>";
-      echo $LANG['job'][19].":";
+      echo $LANG['job'][19]."&nbsp;:";
       echo "</td>";
       echo "<td>";
+      if ($ID == 0) {
+         $query="SELECT email from glpi_users WHERE ID='".$job->fields["users_id"]."'";
+         $result=$DB->query($query);
+         $email="";
+         if ($result&&$DB->numrows($result)) {
+            $email=$DB->result($result,0,"email");
+         }
+         dropdownYesNo('use_email_notification',!empty($email));
+      } else {
 			if ($canupdate){
 				dropdownYesNo('use_email_notification',$job->fields["use_email_notification"]);
 			} else {
 				if ($job->fields["use_email_notification"]) echo $LANG['choice'][1];
 				else $LANG['choice'][0];
 			}
+      }
    } else {
       echo "<td colspan='2'>&nbsp;";
    }
@@ -2346,9 +2356,12 @@
    // Mailing ? Y or no ?
    if ($CFG_GLPI["use_mailing"] == 1) {
       echo "<td class='left'>";
-			echo $LANG['joblist'][27].":";
+			echo $LANG['joblist'][27]."&nbsp;:";
       echo "</td>";
       echo "<td>";
+      if ($ID == 0) {
+         echo "<input type='text' size='30' name='user_email' value='$email'>";
+      } else {
       if ($canupdate) {
          autocompletionTextField("user_email","glpi_tickets","user_email",$job->fields["user_email"],35,$job->fields["entities_id"]);
          if (!empty($job->fields["user_email"])) {
@@ -2359,6 +2372,7 @@
       } else {
          echo "&nbsp;";
 		}
+      }
       echo "</td>";
    } else {
        echo "<td colspan='2'>&nbsp;";
@@ -2435,10 +2449,14 @@
       ) {
 
       echo "<tr class='tab_bg_1'>";
-      echo "<td colspan='4' class='center'>";
       if ($ID == "0") {
+         echo "<td colspan='2' class='center'>";
+         echo "<a href='$target'><input type='button' value=\"".$LANG['buttons'][16]."\" class='submit'/></a> ";
+         echo "</td>";
+         echo "<td colspan='2' class='center'>";
             echo "<input type='submit' name='add' value=\"".$LANG['buttons'][2]."\" class='submit'>";
       } else {
+         echo "<td colspan='4' class='center'>";
          echo "<input type='submit' class='submit' name='update' value='".$LANG['buttons'][14]."'>";
 		}
       echo "</td>";
@@ -2457,6 +2475,7 @@
       echo "<script type='text/javascript' >\n";
       echo "function showFollow$randfollow(){\n";
       echo "document.getElementById('follow$randfollow').style.display='block';\n";
+      echo "document.getElementById('followLink$randfollow').style.display='none';\n";
       echo "}";
       echo "</script>\n";
 
@@ -2465,7 +2484,9 @@
       echo "<br/>";
       echo "<div class='center'>";
 
-      echo "<a href='javascript:onClick=showFollow$randfollow()'>".$LANG['job'][29]."</a>";
+      echo "<div id='followLink$randfollow'>";
+      echo "<a href='javascript:onClick=showFollow$randfollow();'>".$LANG['job'][29]."</a>";
+      echo "</div>";
 
       echo "<div id='follow$randfollow' style='display:none'>";
       showAddFollowupForm(-1,false);
_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev

Reply via email to