formcolor parameter is deprecated

This commit is contained in:
Frédéric FRANCE 2020-10-27 18:46:42 +01:00
parent d750dc48a1
commit 900452a47d
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1

View File

@ -38,8 +38,7 @@ function user_prepare_head($object)
$langs->load("users");
$canreadperms = true;
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS))
{
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
$canreadperms = ($user->admin || ($user->id != $object->id && $user->rights->user->user_advance->readperms) || ($user->id == $object->id && $user->rights->user->self_advance->readperms));
}
@ -52,8 +51,7 @@ function user_prepare_head($object)
$h++;
if ((!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_SYNCHRO_ACTIVE))
&& (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin)))
{
&& (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) {
$langs->load("ldap");
$head[$h][0] = DOL_URL_ROOT.'/user/ldap.php?id='.$object->id;
$head[$h][1] = $langs->trans("LDAPCard");
@ -61,8 +59,7 @@ function user_prepare_head($object)
$h++;
}
if ($canreadperms)
{
if ($canreadperms) {
$head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$object->id;
$head[$h][1] = $langs->trans("Rights").(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.($object->nb_rights).'</span>' : '');
$head[$h][2] = 'rights';
@ -74,15 +71,13 @@ function user_prepare_head($object)
$head[$h][2] = 'guisetup';
$h++;
if (!empty($conf->agenda->enabled))
{
if (!empty($conf->agenda->enabled)) {
if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB = 5;
$MAXAGENDA = $conf->global->AGENDA_EXT_NB;
$i = 1;
$nbagenda = 0;
while ($i <= $MAXAGENDA)
{
while ($i <= $MAXAGENDA) {
$key = $i;
$name = 'AGENDA_EXT_NAME_'.$object->id.'_'.$key;
$src = 'AGENDA_EXT_SRC_'.$object->id.'_'.$key;
@ -99,8 +94,7 @@ function user_prepare_head($object)
$h++;
}
if (!empty($conf->clicktodial->enabled))
{
if (!empty($conf->clicktodial->enabled)) {
$head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$object->id;
$head[$h][1] = $langs->trans("ClickToDial");
$head[$h][2] = 'clicktodial';
@ -108,19 +102,16 @@ function user_prepare_head($object)
}
// Notifications
if ($user->socid == 0 && !empty($conf->notification->enabled))
{
if ($user->socid == 0 && !empty($conf->notification->enabled)) {
$nbNote = 0;
$sql = "SELECT COUNT(n.rowid) as nb";
$sql .= " FROM ".MAIN_DB_PREFIX."notify_def as n";
$sql .= " WHERE fk_user = ".$object->id;
$resql = $db->query($sql);
if ($resql)
{
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num)
{
while ($i < $num) {
$obj = $db->fetch_object($resql);
$nbNote = $obj->nb;
$i++;
@ -147,8 +138,7 @@ function user_prepare_head($object)
|| (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))
|| (!empty($conf->expensereport->enabled) && !empty($user->rights->expensereport->lire) && ($user->id == $object->id || $user->rights->expensereport->readall))
|| (!empty($conf->holiday->enabled) && !empty($user->rights->holiday->read) && ($user->id == $object->id || $user->rights->holiday->read_all))
)
{
) {
// Bank
$head[$h][0] = DOL_URL_ROOT.'/user/bank.php?id='.$object->id;
$head[$h][1] = $langs->trans("HRAndBank");
@ -157,8 +147,7 @@ function user_prepare_head($object)
}
// Such info on users is visible only by internal user
if (empty($user->socid))
{
if (empty($user->socid)) {
// Notes
$nbNote = 0;
if (!empty($object->note)) $nbNote++;
@ -202,8 +191,7 @@ function group_prepare_head($object)
global $langs, $conf, $user;
$canreadperms = true;
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS))
{
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
$canreadperms = ($user->admin || $user->rights->user->group_advance->readperms);
}
@ -216,8 +204,7 @@ function group_prepare_head($object)
$h++;
if ((!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_SYNCHRO_ACTIVE))
&& (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin)))
{
&& (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) {
$langs->load("ldap");
$head[$h][0] = DOL_URL_ROOT.'/user/group/ldap.php?id='.$object->id;
$head[$h][1] = $langs->trans("LDAPCard");
@ -225,8 +212,7 @@ function group_prepare_head($object)
$h++;
}
if ($canreadperms)
{
if ($canreadperms) {
$head[$h][0] = DOL_URL_ROOT.'/user/group/perms.php?id='.$object->id;
$head[$h][1] = $langs->trans("GroupRights").'<span class="badge marginleftonlyshort">'.($object->nb_rights).'</span>';
$head[$h][2] = 'rights';
@ -305,10 +291,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
$formother = new FormOther($db);
$dirthemes = array('/theme');
if (!empty($conf->modules_parts['theme'])) // Using this feature slow down application
{
foreach ($conf->modules_parts['theme'] as $reldir)
{
if (!empty($conf->modules_parts['theme'])) { // Using this feature slow down application
foreach ($conf->modules_parts['theme'] as $reldir) {
$dirthemes = array_merge($dirthemes, (array) ($reldir.'theme'));
}
}
@ -334,8 +318,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<table class="noborder centpercent'.($edit ? ' editmode' : '').' tableforfield">';
// Title
if ($foruserprofile)
{
if ($foruserprofile) {
print '<tr class="liste_titre"><th class="titlefield">'.$langs->trans("Parameter").'</th><th>'.$langs->trans("DefaultValue").'</th>';
print '<th colspan="2">&nbsp;</th>';
print '</tr>';
@ -348,8 +331,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '</tr>';
} else {
$dirthemestring = '';
foreach ($dirthemes as $dirtheme)
{
foreach ($dirthemes as $dirtheme) {
$dirthemestring .= '"'.$dirtheme.'" ';
}
@ -369,22 +351,17 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<table class="nobordernopadding" width="100%"><tr><td><div class="center">';
$i = 0;
foreach ($dirthemes as $dir)
{
foreach ($dirthemes as $dir) {
//print $dirroot.$dir;exit;
$dirtheme = dol_buildpath($dir, 0); // This include loop on $conf->file->dol_document_root
$urltheme = dol_buildpath($dir, 1);
if (is_dir($dirtheme))
{
if (is_dir($dirtheme)) {
$handle = opendir($dirtheme);
if (is_resource($handle))
{
while (($subdir = readdir($handle)) !== false)
{
if (is_resource($handle)) {
while (($subdir = readdir($handle)) !== false) {
if (is_dir($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.'
&& substr($subdir, 0, 3) <> 'CVS' && !preg_match('/common|phones/i', $subdir))
{
&& substr($subdir, 0, 3) <> 'CVS' && !preg_match('/common|phones/i', $subdir)) {
// Disable not stable themes (dir ends with _exp or _dev)
if ($conf->global->MAIN_FEATURES_LEVEL < 2 && preg_match('/_dev$/i', $subdir)) continue;
if ($conf->global->MAIN_FEATURES_LEVEL < 1 && preg_match('/_exp$/i', $subdir)) continue;
@ -398,8 +375,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
else $title = $langs->trans("ShowPreview");
print '<img class="img-skinthumb shadow" src="'.$url.'" alt="'.$title.'" title="'.$title.'" style="border: none; margin-bottom: 5px;">';
print '</a><br>';
if ($subdir == $selected_theme)
{
if ($subdir == $selected_theme) {
print '<input '.($edit ? '' : 'disabled').' type="radio" class="themethumbs" style="border: 0px;" checked name="main_theme" value="'.$subdir.'"> <b>'.$subdir.'</b>';
} else {
print '<input '.($edit ? '' : 'disabled').' type="radio" class="themethumbs" style="border: 0px;" name="main_theme" value="'.$subdir.'"> '.$subdir;
@ -435,14 +411,12 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// Show logo
if ($foruserprofile)
{
if ($foruserprofile) {
// Nothing
} else {
// Show logo
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("EnableShowLogo").'</td><td>';
if ($edit)
{
if ($edit) {
print ajax_constantonoff('MAIN_SHOW_LOGO', array(), null, 0, 0, 1);
//print $form->selectyesno('MAIN_SHOW_LOGO', $conf->global->MAIN_SHOW_LOGO, 1);
} else {
@ -457,8 +431,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
// TopMenuDisableImages
if ($foruserprofile)
{
if ($foruserprofile) {
/*
print '<tr class="oddeven">';
print '<td>'.$langs->trans("TopMenuDisableImages").'</td>';
@ -469,7 +442,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<td>';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_TOPMENU_DISABLE_IMAGE,array()),''),'THEME_TOPMENU_DISABLE_IMAGE','formcolor',1).' ';
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_TOPMENU_DISABLE_IMAGE,array()),''),'THEME_TOPMENU_DISABLE_IMAGE','',1).' ';
}
else
{
@ -484,8 +457,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<tr class="oddeven">';
print '<td>'.$langs->trans("TopMenuDisableImages").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit)
{
if ($edit) {
print ajax_constantonoff('THEME_TOPMENU_DISABLE_IMAGE', array(), null, 0, 0, 1);
//print $form->selectyesno('THEME_TOPMENU_DISABLE_IMAGE', $conf->global->THEME_TOPMENU_DISABLE_IMAGE, 1);
} else {
@ -498,8 +470,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// Background color THEME_ELDY_BACKBODY
if ($foruserprofile)
{
if ($foruserprofile) {
/*
print '<tr class="oddeven">';
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
@ -510,7 +481,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<td>';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' ';
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','',1).' ';
}
else
{
@ -525,9 +496,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<td>'.$langs->trans("BackgroundColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
//var_dump($conf->global->THEME_ELDY_BACKBODY);
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), ''), 'THEME_ELDY_BACKBODY', 'formcolor', 1, '', '', 'colorbackbody').' ';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), ''), 'THEME_ELDY_BACKBODY', '', 1, '', '', 'colorbackbody').' ';
} else {
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), '');
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
@ -540,8 +510,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// TopMenuBackgroundColor
if ($foruserprofile)
{
if ($foruserprofile) {
/*
print '<tr class="oddeven">';
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
@ -552,7 +521,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<td>';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' ';
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','',1).' ';
}
else
{
@ -568,9 +537,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<tr class="oddeven">';
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), ''), 'THEME_ELDY_TOPMENU_BACK1', 'formcolor', 1, '', '', 'colorbackhmenu1').' ';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), ''), 'THEME_ELDY_TOPMENU_BACK1', '', 1, '', '', 'colorbackhmenu1').' ';
} else {
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), '');
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
@ -583,8 +551,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// LeftMenuBackgroundColor
if ($foruserprofile)
{
if ($foruserprofile) {
/*
print '<tr class="oddeven">';
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
@ -595,7 +562,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<td>';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1,array()),''),'THEME_ELDY_VERMENU_BACK1','formcolor',1).' ';
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1,array()),''),'THEME_ELDY_VERMENU_BACK1','',1).' ';
}
else
{
@ -611,9 +578,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<tr class="oddeven">';
print '<td>'.$langs->trans("LeftMenuBackgroundColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1, array()), ''), 'THEME_ELDY_VERMENU_BACK1', 'formcolor', 1, '', '', 'colorbackvmenu1').' ';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1, array()), ''), 'THEME_ELDY_VERMENU_BACK1', '', 1, '', '', 'colorbackvmenu1').' ';
} else {
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1, array()), '');
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
@ -626,17 +592,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// TextTitleColor for title of Pages
if ($foruserprofile)
{
if ($foruserprofile) {
} else {
$default = (empty($colortexttitlenotab) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitlenotab)));
print '<tr class="oddeven">';
print '<td>'.$langs->trans("TextTitleColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLENOTAB, array()), ''), 'THEME_ELDY_TEXTTITLENOTAB', 'formcolor', 1, '', '', 'colortexttitlenotab').' ';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLENOTAB, array()), ''), 'THEME_ELDY_TEXTTITLENOTAB', '', 1, '', '', 'colortexttitlenotab').' ';
} else {
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default"));
}
@ -648,17 +612,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// BackgroundTableTitleColor
if ($foruserprofile)
{
if ($foruserprofile) {
} else {
$default = (empty($colorbacktitle1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacktitle1)));
print '<tr class="oddeven">';
print '<td>'.$langs->trans("BackgroundTableTitleColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKTITLE1, array()), ''), 'THEME_ELDY_BACKTITLE1', 'formcolor', 1, '', '', 'colorbacktitle1').' ';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKTITLE1, array()), ''), 'THEME_ELDY_BACKTITLE1', '', 1, '', '', 'colorbacktitle1').' ';
} else {
print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default"));
}
@ -670,17 +632,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// TextTitleColor
if ($foruserprofile)
{
if ($foruserprofile) {
} else {
$default = (empty($colortexttitle) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitle)));
print '<tr class="oddeven">';
print '<td>'.$langs->trans("BackgroundTableTitleTextColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLE, array()), ''), 'THEME_ELDY_TEXTTITLE', 'formcolor', 1, '', '', 'colortexttitle').' ';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLE, array()), ''), 'THEME_ELDY_TEXTTITLE', '', 1, '', '', 'colortexttitle').' ';
} else {
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLE, $langs->trans("Default"));
}
@ -692,17 +652,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// TextTitleLinkColor
if ($foruserprofile)
{
if ($foruserprofile) {
} else {
$default=(empty($colortexttitlelink) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitlelink)));
print '<tr class="oddeven">';
print '<td>'.$langs->trans("BackgroundTableTitleTextlinkColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLELINK, array()), ''), 'THEME_ELDY_TEXTTITLELINK', 'formcolor', 1, '', '', 'colortexttitlelink').' ';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLELINK, array()), ''), 'THEME_ELDY_TEXTTITLELINK', '', 1, '', '', 'colortexttitlelink').' ';
} else {
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLELINK, $langs->trans("Default"));
}
@ -715,17 +673,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// BackgroundTableLineOddColor
if ($foruserprofile)
{
if ($foruserprofile) {
} else {
$default = (empty($colorbacklineimpair1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklineimpair1)));
print '<tr class="oddeven">';
print '<td>'.$langs->trans("BackgroundTableLineOddColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEIMPAIR1, array()), ''), 'THEME_ELDY_LINEIMPAIR1', 'formcolor', 1, '', '', 'colorbacklinepair2').' ';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEIMPAIR1, array()), ''), 'THEME_ELDY_LINEIMPAIR1', '', 1, '', '', 'colorbacklinepair2').' ';
} else {
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEIMPAIR1, array()), '');
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
@ -738,17 +694,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// BackgroundTableLineEvenColor
if ($foruserprofile)
{
if ($foruserprofile) {
} else {
$default = (empty($colorbacklinepair1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklinepair1)));
print '<tr class="oddeven">';
print '<td>'.$langs->trans("BackgroundTableLineEvenColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEPAIR1, array()), ''), 'THEME_ELDY_LINEPAIR1', 'formcolor', 1, '', '', 'colorbacklineimpair2').' ';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEPAIR1, array()), ''), 'THEME_ELDY_LINEPAIR1', '', 1, '', '', 'colorbacklineimpair2').' ';
} else {
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEPAIR1, array()), '');
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
@ -761,8 +715,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// Text LinkColor
if ($foruserprofile)
{
if ($foruserprofile) {
/*
print '<tr class="oddeven">';
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
@ -773,7 +726,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<td>';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),''),'THEME_ELDY_TEXTLINK','formcolor',1).' ';
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),''),'THEME_ELDY_TEXTLINK','',1).' ';
}
else
{
@ -789,9 +742,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<tr class="oddeven">';
print '<td>'.$langs->trans("LinkColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit)
{
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), ''), 'THEME_ELDY_TEXTLINK', 'formcolor', 1, '', '', 'colortextlink').' ';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), ''), 'THEME_ELDY_TEXTLINK', '', 1, '', '', 'colortextlink').' ';
} else {
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), '');
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
@ -808,8 +760,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// Use Hover
if ($foruserprofile)
{
if ($foruserprofile) {
/* Must first change option to choose color of highlight instead of yes or no.
print '<tr class="oddeven">';
print '<td>'.$langs->trans("HighlightLinesOnMouseHover").'</td>';
@ -828,16 +779,14 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<td colspan="'.($colspan - 1).'">';
//print '<input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
//print ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
if ($edit)
{
if ($edit) {
if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color = colorArrayToHex(colorStringToArray($colorbacklinepairhover));
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), '');
print $formother->selectColor($color, 'THEME_ELDY_USE_HOVER', 'formcolor', 1, '', '', 'colorbacklinepairhover').' ';
print $formother->selectColor($color, 'THEME_ELDY_USE_HOVER', '', 1, '', '', 'colorbacklinepairhover').' ';
} else {
if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color = colorArrayToHex(colorStringToArray($colorbacklinepairhover));
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), '');
if ($color)
{
if ($color) {
if ($color != colorArrayToHex(colorStringToArray($colorbacklinepairhover))) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
else print $langs->trans("Default");
} else print $langs->trans("Default");
@ -848,8 +797,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// Use Checked
if ($foruserprofile)
{
if ($foruserprofile) {
/* Must first change option to choose color of highlight instead of yes or no.
print '<tr class="oddeven">';
print '<td>'.$langs->trans("HighlightLinesOnMouseHover").'</td>';
@ -868,16 +816,14 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<td colspan="'.($colspan - 1).'">';
//print '<input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
//print ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
if ($edit)
{
if ($edit) {
if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color = 'e6edf0';
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_CHECKED, array()), '');
print $formother->selectColor($color, 'THEME_ELDY_USE_CHECKED', 'formcolor', 1, '', '', 'colorbacklinepairchecked').' ';
print $formother->selectColor($color, 'THEME_ELDY_USE_CHECKED', '', 1, '', '', 'colorbacklinepairchecked').' ';
} else {
if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color = 'e6edf0';
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_CHECKED, array()), '');
if ($color)
{
if ($color) {
if ($color != 'e6edf0') print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
else print $langs->trans("Default");
} else print $langs->trans("Default");
@ -889,20 +835,17 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
}
// Use MAIN_OPTIMIZEFORTEXTBROWSER
if ($foruserprofile)
{
if ($foruserprofile) {
//$default=yn($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);
$default = $langs->trans('No');
print '<tr class="oddeven">';
print '<td>'.$langs->trans("MAIN_OPTIMIZEFORTEXTBROWSER").'</td>';
print '<td colspan="'.($colspan - 1).'">';
//print ajax_constantonoff("MAIN_OPTIMIZEFORTEXTBROWSER", array(), null, 0, 0, 1, 0);
if ($edit)
{
if ($edit) {
print $form->selectyesno('MAIN_OPTIMIZEFORTEXTBROWSER', $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER, 1);
} else {
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
print yn($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER);
} else {
print yn(1);
@ -937,8 +880,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
// Use MAIN_OPTIMIZEFORTEXTBROWSER
if ($foruserprofile)
{
if ($foruserprofile) {
//$default=yn($conf->global->MAIN_OPTIMIZEFORCOLORBLIND);
$default = $langs->trans('No');
print '<tr class="oddeven">';
@ -953,8 +895,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
'tritanopes' => $langs->trans('Tritanopes'),
);
if ($edit)
{
if ($edit) {
print $form->selectArray('MAIN_OPTIMIZEFORCOLORBLIND', $colorBlindOptions, $fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND, 0);
} else {
if (!empty($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) && isset($colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND])) {