Skip to content
Snippets Groups Projects
Commit 2764fb24 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix text color for category tags

Fix banner for category translation tab
parent b2924885
No related branches found
No related tags found
No related merge requests found
......@@ -158,10 +158,23 @@ print '<table class="border" width="100%">';
// Reference
print '<tr>';
print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="2">';
print $object->label;
print '<td width="20%" class="notopnoleft">';
$ways = $object->print_all_ways();
print $langs->trans("Ref").'</td><td>';
print '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
foreach ($ways as $way)
{
print $way."<br>\n";
}
print '</td>';
print '</tr>';
// Description
print '<tr><td width="20%" class="notopnoleft">';
print $langs->trans("Description").'</td><td>';
print dol_htmlentitiesbr($object->description);
print '</td></tr>';
print '</table>';
if ($action == 'edit')
......
......@@ -598,7 +598,11 @@ class FormOther
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$color = colorArrayToHex(colorStringToArray($color,array()),'');
if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
$textcolor='000';
$tmpcolorweight=0;
foreach(colorStringToArray($color,array()) as $x) $tmpcolorweight+=$x;
if ($tmpcolorweight < 400) $textcolor='FFF';
if ($color) print '<input type="text" class="colorthumb" disabled style="padding: 1px; margin-top: 0; margin-bottom: 0; color: #'.$textcolor.'; background-color: #'.$color.'" value="'.$color.'">';
else print $textifnotdefined;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment