Feature #20778
closedColorpicker has no usable icon
0%
Description
If you define a colorpicker for a BE-Field in TCA, and the value of the field is not set to a valid color-value, then you have a clear.gif as a button for the colorpicker.
Normal users will never find the colorpicker like this ...
If a valid color-value is set, then simply a colored area is shown - also this is suboptimal.
Resolution:
If no valid color-value is set, display a real 'colorpicker' icon.
If a vailid color-value is set, overlay color with some 'colorpicker'-icon.
See images attached.
Solution is easy - replace line 3831 of file "class.t3lib_tceforms.php":
'<img src="clear.gif" width="'.$dX.'" height="'.$dY.'"'.t3lib_BEfunc::titleAltAttrib(trim($iTitle.' '.$PA['itemFormElValue'])).' border="0" />'.
with
(strlen(trim($color))==0 || strcmp(trim($color),'0')==0 ?
'<img src="gfx/colorpicker_empty.jpg" width="'.$dX.'" height="'.$dY.'"'.t3lib_BEfunc::titleAltAttrib(trim($iTitle.' '.$PA['itemFormElValue'])).' border="0" />' :
'<img src="gfx/colorpicker.gif" width="'.$dX.'" height="'.$dY.'"'.t3lib_BEfunc::titleAltAttrib(trim($iTitle.' '.$PA['itemFormElValue'])).' border="0" />').
(issue imported from #M11576)
Files