353function showSkins($fuser, $edit = 0, $foruserprofile =
false)
357 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
361 $dirthemes = array(
'/theme');
362 if (!empty(
$conf->modules_parts[
'theme'])) {
363 foreach (
$conf->modules_parts[
'theme'] as $reldir) {
364 $dirthemes = array_merge($dirthemes, (array) ($reldir.
'theme'));
367 $dirthemes = array_unique($dirthemes);
370 $selected_theme =
'';
371 if (empty($foruserprofile)) {
374 $selected_theme = ((is_object($fuser) && !empty($fuser->conf->MAIN_THEME)) ? $fuser->conf->MAIN_THEME :
'');
378 if (empty($foruserprofile)) {
381 $hoverdisabled = (is_object($fuser) ? (empty($fuser->conf->THEME_ELDY_USE_HOVER) || $fuser->conf->THEME_ELDY_USE_HOVER ==
'0') :
'');
384 $checkeddisabled =
'';
385 if (empty($foruserprofile)) {
388 $checkeddisabled = (is_object($fuser) ? (empty($fuser->conf->THEME_ELDY_USE_CHECKED) || $fuser->conf->THEME_ELDY_USE_CHECKED ==
'0') :
'');
392 if ($foruserprofile) {
397 print
'<div class="div-table-responsive-no-min">';
398 print
'<table class="noborder centpercent'.($edit ?
' editmodeforshowskin' :
'').
'">';
401 if ($foruserprofile) {
402 print
'<tr class="liste_titre"><th class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</th><th>'.$langs->trans(
"DefaultValue").
'</th>';
403 print
'<th colspan="2"> </th>';
406 print
'<tr class="oddeven">';
407 print
'<td>'.$langs->trans(
"DefaultSkin").
'</td>';
409 print
'<td class="nowrap left"><input id="check_MAIN_THEME" name="check_MAIN_THEME"'.($edit ?
'' :
' disabled').
' type="checkbox" '.($selected_theme ?
" checked" :
"").
'> <label for="check_MAIN_THEME">'.$langs->trans(
"UsePersonalValue").
'</label></td>';
410 print
'<td> </td>';
413 $dirthemestring =
'';
414 foreach ($dirthemes as $dirtheme) {
415 $dirthemestring .=
'"'.$dirtheme.
'" ';
418 print
'<tr class="liste_titre"><td class="titlefieldmiddle">';
419 print $form->textwithpicto($langs->trans(
"DefaultSkin"), $langs->trans(
"ThemeDir").
' : '.$dirthemestring);
421 print
'<td class="right">';
422 $url =
'https://www.dolistore.com/9-skins';
423 print
'<a href="'.$url.
'" target="_blank" rel="noopener noreferrer external">';
424 print $langs->trans(
'DownloadMoreSkins');
425 print
img_picto(
'',
'globe',
'class="paddingleft"');
430 print
'<tr class="oddeven nohover"><td colspan="'.$colspan.
'" class="center">';
433 $langs->load(
"errors");
437 print
'<table class="nobordernopadding centpercent"><tr><td><div class="center">';
440 foreach ($dirthemes as $dir) {
445 if (is_dir($dirtheme)) {
446 $handle = opendir($dirtheme);
447 if (is_resource($handle)) {
448 while (($subdir = readdir($handle)) !==
false) {
449 if (is_dir($dirtheme.
"/".$subdir) && substr($subdir, 0, 1) !=
'.'
450 && substr($subdir, 0, 3) !=
'CVS' && !preg_match(
'/common|phones/i', $subdir)) {
452 if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2 && preg_match(
'/_dev$/i', $subdir)) {
455 if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1 && preg_match(
'/_exp$/i', $subdir)) {
459 print
'<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
460 $file = $dirtheme.
"/".$subdir.
"/thumb.png";
461 $url = $urltheme.
"/".$subdir.
"/thumb.png";
462 if (!file_exists($file)) {
463 $url =
dolBuildUrl(DOL_URL_ROOT .
'/public/theme/common/nophoto.png');
465 print
'<a href="'.$_SERVER[
"PHP_SELF"].($edit ?
'?action=edit&token='.newToken().
'&mode=template&theme=' :
'?theme=').$subdir.(GETPOST(
'optioncss',
'alpha', 1) ?
'&optioncss='.GETPOST(
'optioncss',
'alpha', 1) :
'').($fuser ?
'&id='.$fuser->id :
'').
'" style="font-weight: normal;" alt="'.$langs->trans(
"Preview").
'">';
467 $title = $langs->trans(
"ThemeCurrentlyActive");
469 $title = $langs->trans(
"ShowPreview");
471 print
'<img class="img-skinthumb shadow" src="'.$url.
'" alt="'.
dol_escape_htmltag($title).
'" title="'.
dol_escape_htmltag($title).
'" style="border: none; margin-bottom: 5px;">';
473 if ($subdir == $selected_theme) {
474 print
'<input '.($edit ?
'' :
'disabled').
' type="radio" class="themethumbs" style="border: 0px;" id="main_theme'.$subdir.
'" checked name="main_theme" value="'.$subdir.
'"><label for="main_theme'.$subdir.
'"> <b>'.$subdir.
'</b></label>';
476 print
'<input '.($edit ?
'' :
'disabled').
' type="radio" class="themethumbs" style="border: 0px;" id="main_theme'.$subdir.
'" name="main_theme" value="'.$subdir.
'"><label for="main_theme'.$subdir.
'"> '.$subdir.
'</label>';
487 print
'</div></td></tr></table>';
492 $colorbackhmenu1 =
'';
493 $colorbackvmenu1 =
'';
494 $colortexttitlenotab =
'';
495 $colortexttitlelink =
'';
496 $colorbacktitle1 =
'';
497 $colortexttitle =
'';
498 $colorbacklineimpair1 =
'';
499 $colorbacklinepair1 =
'';
501 $colorbacklinepairhover =
'';
502 $colorbacklinepairchecked =
'';
506 if (file_exists(DOL_DOCUMENT_ROOT.
'/theme/'.
$conf->theme.
'/theme_vars.inc.php')) {
507 include DOL_DOCUMENT_ROOT.
'/theme/'.
$conf->theme.
'/theme_vars.inc.php';
511 if ($foruserprofile) {
514 $listofdarkmodes = array(
515 $langs->trans(
"AlwaysDisabled"),
516 $langs->trans(
"AccordingToBrowser"),
517 $langs->trans(
"AlwaysEnabled")
519 print
'<tr class="oddeven">';
520 print
'<td>'.$langs->trans(
"DarkThemeMode").
'</td>';
521 print
'<td colspan="'.($colspan - 1).
'">';
523 print $form->selectarray(
'THEME_DARKMODEENABLED', $listofdarkmodes,
getDolGlobalInt(
'THEME_DARKMODEENABLED'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth200 maxwidth250');
527 print $form->textwithpicto(
'', $langs->trans(
"DoesNotWorkWithAllThemes"));
533 $listoftopmenumodes = array(
534 0 => array(
'id' => 0,
'label' => $langs->transnoentitiesnoconv(
"IconAndText"),
'data-html' => $langs->transnoentitiesnoconv(
"IconAndText").
' <span class="opacitymedium">('.$langs->trans(
"Default").
')</span>'),
535 1 => array(
'id' => 1,
'label' => $langs->transnoentitiesnoconv(
"TextOnly"),
'data-html' => $langs->transnoentitiesnoconv(
"TextOnly")),
536 2 => array(
'id' => 2,
'label' => $langs->transnoentitiesnoconv(
"IconOnlyAllTextsOnHover"),
'data-html' => $langs->transnoentitiesnoconv(
"IconOnlyAllTextsOnHover")),
537 3 => array(
'id' => 3,
'label' => $langs->transnoentitiesnoconv(
"IconOnlyTextOnHover"),
'data-html' => $langs->transnoentitiesnoconv(
"IconOnlyTextOnHover")),
538 4 => array(
'id' => 4,
'label' => $langs->transnoentitiesnoconv(
"IconOnly"),
'data-html' => $langs->transnoentitiesnoconv(
"IconOnly")),
540 if ($foruserprofile) {
560 print
'<tr class="oddeven">';
561 print
'<td>'.$langs->trans(
"TopMenuDisableImages").
'</td>';
562 print
'<td colspan="'.($colspan - 1).
'">';
564 print $form->selectarray(
'THEME_TOPMENU_DISABLE_IMAGE', $listoftopmenumodes,
getDolGlobalInt(
'THEME_TOPMENU_DISABLE_IMAGE'), 0, 0, 0,
'', 0, 0, 0,
'',
'widthcentpercentminusx maxwidth500');
566 print $listoftopmenumodes[
getDolGlobalInt(
'THEME_TOPMENU_DISABLE_IMAGE')][
'label'];
568 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes"));
574 if ($foruserprofile) {
578 print
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"EnableShowLogo").
'</td>';
579 print
'<td colspan="'.($colspan - 1).
'" class="valignmiddle">';
581 print ajax_constantonoff(
'MAIN_SHOW_LOGO', array(),
null, 0, 0, 1);
586 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes"), 1,
'help',
'inline-block');
592 if ($foruserprofile) {
596 print
'<tr class="oddeven"><td class="titlefieldmiddle">'.$langs->trans(
"THEME_MENU_COLORLOGO").
'</td>';
597 print
'<td colspan="'.($colspan - 1).
'" class="valignmiddle">';
599 print ajax_constantonoff(
'THEME_MENU_COLORLOGO', array(),
null, 0, 0, 1);
603 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes"), 1,
'help',
'inline-block');
609 if ($foruserprofile) {
611 print
'<tr class="oddeven">';
612 print
'<td>'.$langs->trans(
"UseBorderOnTable").
'</td>';
613 print
'<td colspan="'.($colspan - 1).
'" class="valignmiddle">';
615 print ajax_constantonoff(
'THEME_ELDY_USEBORDERONTABLE', array(),
null, 0, 0, 1, 2, 0, 1);
619 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes"), 1,
'help',
'inline-block');
622 $listofborderradius = array(
623 0 => array(
'label' => $langs->transnoentitiesnoconv(
"NoRoundedCorners")),
624 4 => array(
'label' => $langs->transnoentitiesnoconv(
"CornerRadius").
' 4'),
625 6 => array(
'label' => $langs->transnoentitiesnoconv(
"CornerRadius").
' 6'),
626 8 => array(
'label' => $langs->transnoentitiesnoconv(
"CornerRadius").
' 8'),
627 10 => array(
'label' => $langs->transnoentitiesnoconv(
"CornerRadius").
' 10'),
628 12 => array(
'label' => $langs->transnoentitiesnoconv(
"CornerRadius").
' 12'),
629 20 => array(
'label' => $langs->transnoentitiesnoconv(
"CornerRadius").
' 20'),
632 print
' ';
634 print $form->selectarray(
'THEME_ELDY_BORDER_RADIUS', $listofborderradius,
getDolGlobalInt(
'THEME_ELDY_BORDER_RADIUS'), 0, 0, 0,
'', 0, 0, 0,
'',
'miwdith150 widthcentpercentminusx maxwidth200');
636 print $listofborderradius[
getDolGlobalInt(
'THEME_ELDY_BORDER_RADIUS')][
'label'];
646 if ($foruserprofile) {
648 print
'<tr class="oddeven">';
649 print
'<td>'.$langs->trans(
"UseBorderOnInputFields").
'</td>';
650 print
'<td colspan="'.($colspan - 1).
'" class="valignmiddle">';
652 print ajax_constantonoff(
'THEME_SHOW_BORDER_ON_INPUT', array(),
null, 0, 0, 1, 2, 0, 1);
656 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes"), 1,
'help',
'inline-block');
713 if ($foruserprofile) {
737 print
'<tr class="oddeven">';
738 print
'<td>'.$langs->trans(
"TopMenuBackgroundColor").
'</td>';
739 print
'<td colspan="'.($colspan - 1).
'">';
745 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
747 print $langs->trans(
"Default");
750 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
751 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
757 if ($foruserprofile) {
781 print
'<tr class="oddeven">';
782 print
'<td>'.$langs->trans(
"LeftMenuBackgroundColor").
'</td>';
783 print
'<td colspan="'.($colspan - 1).
'">';
789 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
791 print $langs->trans(
"Default");
794 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
795 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
801 if ($foruserprofile) {
821 print
'<tr class="oddeven">';
822 print
'<td>'.$langs->trans(
"BackgroundColor").
'</td>';
823 print
'<td colspan="'.($colspan - 1).
'">';
830 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
832 print $langs->trans(
"Default");
835 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
836 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
842 if ($foruserprofile) {
846 print
'<tr class="oddeven">';
847 print
'<td>'.$langs->trans(
"TextTitleColor").
'</td>';
848 print
'<td colspan="'.($colspan - 1).
'">';
852 print $formother->showColor(
getDolGlobalString(
'THEME_ELDY_TEXTTITLENOTAB'), $langs->trans(
"Default"));
854 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
855 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
862 if ($foruserprofile) {
866 print
'<tr class="oddeven">';
867 print
'<td>'.$langs->trans(
"BackgroundTableTitleColor").
'</td>';
868 print
'<td colspan="'.($colspan - 1).
'">';
872 print $formother->showColor(
getDolGlobalString(
'THEME_ELDY_BACKTITLE1'), $langs->trans(
"Default"));
874 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
875 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
882 if ($foruserprofile) {
886 print
'<tr class="oddeven">';
887 print
'<td>'.$langs->trans(
"BackgroundTableTitleTextColor").
'</td>';
888 print
'<td colspan="'.($colspan - 1).
'">';
892 print $formother->showColor(
getDolGlobalString(
'THEME_ELDY_TEXTTITLE'), $langs->trans(
"Default"));
894 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
895 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
902 if ($foruserprofile) {
906 print
'<tr class="oddeven">';
907 print
'<td>'.$langs->trans(
"BackgroundTableTitleTextlinkColor").
'</td>';
908 print
'<td colspan="'.($colspan - 1).
'">';
912 print $formother->showColor(
getDolGlobalString(
'THEME_ELDY_TEXTTITLELINK'), $langs->trans(
"Default"));
914 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
915 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
923 if ($foruserprofile) {
927 print
'<tr class="oddeven">';
928 print
'<td>'.$langs->trans(
"BackgroundTableLineOddColor").
'</td>';
929 print
'<td colspan="'.($colspan - 1).
'">';
935 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
937 print $langs->trans(
"Default");
940 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
941 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
947 if ($foruserprofile) {
951 print
'<tr class="oddeven">';
952 print
'<td>'.$langs->trans(
"BackgroundTableLineEvenColor").
'</td>';
953 print
'<td colspan="'.($colspan - 1).
'">';
959 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
961 print $langs->trans(
"Default");
964 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
965 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
971 if ($foruserprofile) {
995 print
'<tr class="oddeven">';
996 print
'<td>'.$langs->trans(
"LinkColor").
'</td>';
997 print
'<td colspan="'.($colspan - 1).
'">';
1003 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
1007 print $langs->trans(
"Default");
1010 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
1011 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
1017 if ($foruserprofile) {
1031 print
'<tr class="oddeven">';
1032 print
'<td>'.$langs->trans(
"HighlightLinesColor").
'</td>';
1033 print
'<td colspan="'.($colspan - 1).
'">';
1042 print $formother->selectColor($color,
'THEME_ELDY_USE_HOVER',
'', 1, array(),
'',
'colorbacklinepairhover', $default).
' ';
1051 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
1053 print $langs->trans(
"Default");
1056 print $langs->trans(
"Default");
1059 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
1060 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
1065 if ($foruserprofile) {
1079 print
'<tr class="oddeven">';
1080 print
'<td>'.$langs->trans(
"HighlightLinesChecked").
'</td>';
1081 print
'<td colspan="'.($colspan - 1).
'">';
1090 print $formother->selectColor($color,
'THEME_ELDY_USE_CHECKED',
'', 1, array(),
'',
'colorbacklinepairchecked', $default).
' ';
1098 if ($color !=
'e6edf0') {
1099 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
1101 print $langs->trans(
"Default");
1104 print $langs->trans(
"Default");
1107 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
1108 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
1114 if ($foruserprofile) {
1138 print
'<tr class="oddeven">';
1139 print
'<td>'.$langs->trans(
"BtnActionColor").
'</td>';
1140 print
'<td colspan="'.($colspan - 1).
'">';
1146 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
1150 print $langs->trans(
"Default");
1153 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #'.$default.
'">'.$default.
'</span></strong> ';
1154 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
1160 if ($foruserprofile) {
1184 print
'<tr class="oddeven">';
1185 print
'<td>'.$langs->trans(
"TextBtnActionColor").
'</td>';
1186 print
'<td colspan="'.($colspan - 1).
'">';
1192 print
'<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.
'" value="'.$color.
'">';
1196 print $langs->trans(
"Default");
1199 print
' <span class="nowraponall opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong><span style="color: #000">'.$default.
'</span></strong> ';
1200 print $form->textwithpicto(
'', $langs->trans(
"NotSupportedByAllThemes").
', '.$langs->trans(
"PressF5AfterChangingThis"));
1206 if ($foruserprofile) {
1208 $default = $langs->trans(
'No');
1209 print
'<tr class="oddeven">';
1210 print
'<td>'.$langs->trans(
"MAIN_OPTIMIZEFORTEXTBROWSER").
'</td>';
1211 print
'<td colspan="'.($colspan - 1).
'">';
1214 print $form->selectyesno(
'MAIN_OPTIMIZEFORTEXTBROWSER', (isset($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER : 0), 1);
1217 print
yn(isset($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER : 0);
1220 if (empty($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) {
1221 print
' ('.$langs->trans(
"ForcedByGlobalSetup").
')';
1225 print
' <span class="opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
1226 print $form->textwithpicto(
'', $langs->trans(
"MAIN_OPTIMIZEFORTEXTBROWSERDesc"));
1251 if ($foruserprofile) {
1253 $default = $langs->trans(
'No');
1254 print
'<tr class="oddeven">';
1255 print
'<td>'.$langs->trans(
"MAIN_OPTIMIZEFORCOLORBLIND").
'</td>';
1256 print
'<td colspan="'.($colspan - 1).
'">';
1258 $colorBlindOptions = array(
1259 0 => $langs->trans(
'No'),
1260 'flashy' => $langs->trans(
'Flashy'),
1261 'protanopia' => $langs->trans(
'Protanopia'),
1262 'deuteranopes' => $langs->trans(
'Deuteranopes'),
1263 'tritanopes' => $langs->trans(
'Tritanopes'),
1267 print $form->selectArray(
'MAIN_OPTIMIZEFORCOLORBLIND', $colorBlindOptions, (isset($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) ? $fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND : 0), 0);
1269 if (!empty($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) && isset($colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND])) {
1270 print $colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND];
1275 print
' <span class="opacitymedium">'.$langs->trans(
"Default").
'</span>: <strong>'.$default.
'</strong> ';
1276 print $form->textwithpicto(
'', $langs->trans(
"MAIN_OPTIMIZEFORCOLORBLINDDesc"));