diff --git a/ChangeLog b/ChangeLog
index 9449d16df93..6aaa5a781a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -235,6 +235,7 @@ FIX [ bug 1634 ] Error deleting a project when it had many linked objects
FIX [ bug 1925 ] "Link to order" option in supplier invoices is not working properly
FIX [ bug #3198 ] Trigger LINECONTRACT_INSERT passes Contrat as $object instead of ContratLigne
FIX: Not showing delivery date on rouget pdf
+FIX: Not showing task extrafields when creating from left menu
NEW: Created new ContratLigne::insert function
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 6074f6fe841..b3401fe58e8 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -2015,7 +2015,7 @@ function img_picto($titlealt, $picto, $options = '', $pictoisfullpath = false, $
$tmparray=array(0=>$titlealt);
if (preg_match('/:[^\s]/',$titlealt)) $tmparray=explode(':',$titlealt); // We explode if we have TextA:TextB. Not if we have TextA: TextB
$title=$tmparray[0];
- $alt=empty($tmparray[1])?'':$tmparray[1];
+ $alt=empty($tmparray[1])?$tmparray[0]:$tmparray[1]; // Use title for alt if no alt is provided
return '
'; // Alt is used for accessibility, title for popup
}
}
diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index 8a4c2e53d89..018bf862bba 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -55,8 +55,8 @@ if ($id > 0 || ! empty($ref))
{
// fetch optionals attributes and labels
$extralabels_projet=$extrafields_project->fetch_name_optionals_label($object->table_element);
- $extralabels_task=$extrafields_task->fetch_name_optionals_label($taskstatic->table_element);
}
+$extralabels_task=$extrafields_task->fetch_name_optionals_label($taskstatic->table_element);
// Security check
$socid=0;
diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php
index 49400c119a5..1ca8daefdcd 100755
--- a/test/phpunit/FunctionsLibTest.php
+++ b/test/phpunit/FunctionsLibTest.php
@@ -639,11 +639,11 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
$s=img_picto('title','/fullpath/img.png','',1);
print __METHOD__." s=".$s."\n";
- $this->assertEquals('
',$s,'testImgPicto3');
+ $this->assertEquals('
',$s,'testImgPicto3');
$s=img_picto('title','/fullpath/img.png','',true);
print __METHOD__." s=".$s."\n";
- $this->assertEquals('
',$s,'testImgPicto4');
+ $this->assertEquals('
',$s,'testImgPicto4');
$s=img_picto('title:alt','/fullpath/img.png','',true);
print __METHOD__." s=".$s."\n";