2
0
forked from Wavyzz/dolibarr

clean code

This commit is contained in:
Laurent Destailleur
2022-02-06 15:21:49 +01:00
parent 3e6d922cc0
commit 3fa3cd28cd
3 changed files with 10 additions and 8 deletions

View File

@@ -407,7 +407,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 '<img class="img-skinthumb shadow" src="'.$url.'" alt="'.dol_escape_htmltag($title).'" title="'.dol_escape_htmltag($title).'" style="border: none; margin-bottom: 5px;">';
print '</a><br>';
if ($subdir == $selected_theme) {
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>';
@@ -440,6 +440,9 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
$colorbacklinepairhover = '';
$colorbacklinepairhover = '';
$colorbacklinepairchecked = '';
$butactionbg = '';
$textbutaction = '';
// Set the variables with the default value
if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php')) {
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
}
@@ -954,7 +957,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<td>'.$langs->trans("BtnActionColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_BTNACTION) ? $conf->global->THEME_ELDY_BTNACTION : ''), array()), ''), 'THEME_ELDY_BTNACTION', '', 1, '', '', 'colorbtnaction').' ';
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_BTNACTION) ? $conf->global->THEME_ELDY_BTNACTION : ''), array()), ''), 'THEME_ELDY_BTNACTION', '', 1, '', '', 'butactionbg').' ';
} else {
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BTNACTION, array()), '');
if ($color) {
@@ -971,7 +974,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '</tr>';
}
// Text btn action
// Text btn action
if ($foruserprofile) {
/*
print '<tr class="oddeven">';
@@ -1000,7 +1003,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<td>'.$langs->trans("TextBtnActionColor").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit) {
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTBTNACTION) ? $conf->global->THEME_ELDY_TEXTBTNACTION : ''), array()), ''), 'THEME_ELDY_TEXTBTNACTION', '', 1, '', '', 'colortextbtnaction').' ';
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTBTNACTION) ? $conf->global->THEME_ELDY_TEXTBTNACTION : ''), array()), ''), 'THEME_ELDY_TEXTBTNACTION', '', 1, '', '', 'textbutaction').' ';
} else {
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTBTNACTION, array()), '');
if ($color) {