Browse Source

Fix missing info admin picto. Fix colspan.

Laurent Destailleur 8 years ago
parent
commit
7622d3b2fb
2 changed files with 23 additions and 19 deletions
  1. 21 17
      htdocs/comm/card.php
  2. 2 2
      htdocs/core/class/html.formcompany.class.php

+ 21 - 17
htdocs/comm/card.php

@@ -484,24 +484,28 @@ if ($id > 0)
 	    print '</tr></table>';
 	    print '</td><td>';
 	    if ($action == 'editlevel')
+	    {
 	        $formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_prospectlevel,'prospect_level_id',1);
-	        else
-	            print $object->getLibProspLevel();
-	            print "</td>";
-	            print '</tr>';
-	
-	            // Status
-	            $object->loadCacheOfProspStatus();
-	            print '<tr><td>'.$langs->trans("StatusProsp").'</td><td colspan="3">'.$object->getLibProspCommStatut(4, $object->cacheprospectstatus[$object->stcomm_id]['label']);
-	            print ' &nbsp; &nbsp; ';
-	            print '<div class="floatright">';
-	            foreach($object->cacheprospectstatus as $key => $val)
-	            {
-	                $titlealt='default';
-	                if (! empty($val['code']) && ! in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt=$val['label'];
-	                if ($object->stcomm_id != $val['id']) print '<a class="pictosubstatus" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&stcomm='.$val['code'].'&action=setstcomm">'.img_action($titlealt,$val['code']).'</a>';
-	            }
-	            print '</div></td></tr>';
+	    }
+	    else
+	    {
+	        print $object->getLibProspLevel();
+	    }
+        print "</td>";
+        print '</tr>';
+
+        // Status
+        $object->loadCacheOfProspStatus();
+        print '<tr><td>'.$langs->trans("StatusProsp").'</td><td>'.$object->getLibProspCommStatut(4, $object->cacheprospectstatus[$object->stcomm_id]['label']);
+        print ' &nbsp; &nbsp; ';
+        print '<div class="floatright">';
+        foreach($object->cacheprospectstatus as $key => $val)
+        {
+            $titlealt='default';
+            if (! empty($val['code']) && ! in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt=$val['label'];
+            if ($object->stcomm_id != $val['id']) print '<a class="pictosubstatus" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&stcomm='.$val['code'].'&action=setstcomm">'.img_action($titlealt,$val['code']).'</a>';
+        }
+        print '</div></td></tr>';
 	   print "</table>";
 	}
 	

+ 2 - 2
htdocs/core/class/html.formcompany.class.php

@@ -138,7 +138,7 @@ class FormCompany
 	 */
 	function form_prospect_level($page, $selected='', $htmlname='prospect_level_id', $empty=0)
 	{
-		global $langs;
+		global $user, $langs;
 
 		print '<form method="post" action="'.$page.'">';
 		print '<input type="hidden" name="action" value="setprospectlevel">';
@@ -171,7 +171,7 @@ class FormCompany
 			print Form::selectarray($htmlname, $options, $selected);
 		}
 		else dol_print_error($this->db);
-
+		if (! empty($htmlname) && $user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
 		print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
 		print '</form>';
 	}