diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 2322ae7a057..70589a516fd 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -95,9 +95,13 @@ if ($action == 'update') if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKBODY', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_BACKBODY', $val,'chaine',0,'',$conf->entity); - $val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'),array())))); + $val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'),array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TOPMENU_BACK1', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_TOPMENU_BACK1', $val,'chaine',0,'',$conf->entity); + else dolibarr_set_const($db, 'THEME_ELDY_TOPMENU_BACK1', $val,'chaine',0,'',$conf->entity); + + $val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_VERMENU_BACK1'),array())))); + if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_VERMENU_BACK1', $conf->entity); + else dolibarr_set_const($db, 'THEME_ELDY_VERMENU_BACK1', $val,'chaine',0,'',$conf->entity); $val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'),array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKTITLE1', $conf->entity); diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 73634f0d5e8..277ff7a3895 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1687,7 +1687,7 @@ class ExtraFields */ function showSeparator($key) { - $out = ''.$this->attribute_label[$key].''; + $out = ''.$this->attribute_label[$key].''; return $out; } diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 04bfa5666e2..428f8451894 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -424,7 +424,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) print ''; print ''.$langs->trans("TopMenuDisableImages").''; print ''.($conf->global->THEME_TOPMENU_DISABLE_IMAGE?$conf->global->THEME_TOPMENU_DISABLE_IMAGE:$langs->trans("Default")).''; - print 'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); + print 'conf->THEME_ELDY_TEXTLINK)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; print ''; @@ -552,6 +552,53 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) print ''; } + // LeftMenuBackgroundColor + if ($foruserprofile) + { + /* + print ''; + print ''.$langs->trans("TopMenuBackgroundColor").''; + print ''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_VERMENU_BACK1:$langs->trans("Default")).''; + print 'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); + print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo + print '> '.$langs->trans("UsePersonalValue").''; + print ''; + if ($edit) + { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1,array()),''),'THEME_ELDY_VERMENU_BACK1','formcolor',1).' '; + } + else + { + $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1,array()),''); + if ($color) print ''; + else print ''; + } + if ($edit) print '
('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + print '';*/ + } + else + { + $default='ffffff'; + if ($conf->theme == 'md') $default='ffffff'; + + print ''; + print ''.$langs->trans("LeftMenuBackgroundColor").''; + print ''; + if ($edit) + { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1,array()),''),'THEME_ELDY_VERMENU_BACK1','formcolor',1).' '; + } + else + { + $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1,array()),''); + if ($color) print ''; + else print $langs->trans("Default"); + } + print '   ('.$langs->trans("Default").': '.$default.') '; + print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); + print ''; + } + // BackgroundTableTitleColor if ($foruserprofile) { @@ -667,18 +714,18 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) /* print ''; print ''.$langs->trans("TopMenuBackgroundColor").''; - print ''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).''; - print 'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); + print ''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TEXTLINK:$langs->trans("Default")).''; + print 'conf->THEME_ELDY_TEXTLINK)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; print ''; 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_TEXTLINK,array()),''),'THEME_ELDY_TEXTLINK','formcolor',1).' '; } else { - $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''); + $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),''); if ($color) print ''; else print ''; } diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 514b76af16c..c065dc7ca53 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -4,7 +4,8 @@ WebsiteSetupDesc=Create here as much entry as number of different websites you n DeleteWebsite=Delete website ConfirmDeleteWebsite=Are you sure you want to delete this web site. All its pages and content will also be removed. WEBSITE_PAGENAME=Page name/alias -WEBSITE_HTML_HEADER=HTML Header +WEBSITE_HTML_HEADER=HTML Header (common to all pages) +HtmlHeaderPage=HTML specific header for ppage WEBSITE_CSS_URL=URL of external CSS file WEBSITE_CSS_INLINE=CSS content WEBSITE_ROBOT=Robot file (robots.txt) diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 560853ac1c9..ba44629cc21 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -120,7 +120,7 @@ $arrayfields=array( 'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), 'p.title'=>array('label'=>$langs->trans("Label"), 'checked'=>1), 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'enabled'=>$conf->societe->enabled), - 'commercial'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>1), + 'commercial'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>0), 'p.dateo'=>array('label'=>$langs->trans("DateStart"), 'checked'=>1, 'position'=>100), 'p.datee'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1, 'position'=>101), 'p.public'=>array('label'=>$langs->trans("Visibility"), 'checked'=>1, 'position'=>102), diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 1941c1a397f..407bbc99b87 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -106,6 +106,7 @@ $borderwith=2; // Case of option always editable if (! isset($conf->global->THEME_ELDY_BACKBODY)) $conf->global->THEME_ELDY_BACKBODY=$colorbackbody; if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1=$colorbackhmenu1; +if (! isset($conf->global->THEME_ELDY_VERMENU_BACK1)) $conf->global->THEME_ELDY_VERMENU_BACK1=$colorbackvmenu1; if (! isset($conf->global->THEME_ELDY_BACKTITLE1)) $conf->global->THEME_ELDY_BACKTITLE1=$colorbacktitle1; if (! isset($conf->global->THEME_ELDY_USE_HOVER)) $conf->global->THEME_ELDY_USE_HOVER=$colorbacklinepairhover; if (! isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) $conf->global->THEME_ELDY_TEXTTITLENOTAB=$colortexttitlenotab; @@ -114,7 +115,6 @@ if (! isset($conf->global->THEME_ELDY_TEXTLINK)) $conf->global->THEME_ELDY_TEXTL // Case of option editable only if option THEME_ELDY_ENABLE_PERSONALIZED is on if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) { - $conf->global->THEME_ELDY_VERMENU_BACK1='255,255,255'; // vmenu $conf->global->THEME_ELDY_BACKTABCARD1='255,255,255'; // card $conf->global->THEME_ELDY_BACKTABACTIVE='234,234,234'; $conf->global->THEME_ELDY_TEXT='0,0,0'; @@ -445,6 +445,9 @@ input[name=weight], input[name=volume], input[name=surface], input[name=sizeheig input[name=surface] { margin-right: 4px; } fieldset { border: 1px solid #AAAAAA !important; } .legendforfieldsetstep { padding-bottom: 10px; } +.trextrafieldseparator td { + border-bottom: 2px solid rgb(120,120,120) !important; +} hr { border: 0; border-top: 1px solid #ccc; } @@ -1087,7 +1090,7 @@ div.fiche { div.fiche { margin-: px; - margin-: dol_optimize_smallscreen)?'16':'12')); ?>px; + margin-: dol_optimize_smallscreen)?'20':'12')); ?>px; dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'."\n"; ?> dol_hide_leftmenu)) print 'margin-bottom: 12px;'."\n"; ?> } diff --git a/htdocs/websites/index.php b/htdocs/websites/index.php index f2b94ff5705..ee95295543f 100644 --- a/htdocs/websites/index.php +++ b/htdocs/websites/index.php @@ -330,7 +330,8 @@ if ($action == 'add') $objectpage->pageurl = GETPOST('WEBSITE_PAGENAME','alpha'); $objectpage->description = GETPOST('WEBSITE_DESCRIPTION','alpha'); $objectpage->keywords = GETPOST('WEBSITE_KEYWORDS','alpha'); - $objectpage->lang = GETPOST('WEBSITE_LANG','alpha'); + $objectpage->lang = GETPOST('WEBSITE_LANG','aZ09'); + $objectpage->htmlheader = GETPOST('htmlheader','none'); } if (! $error) @@ -687,7 +688,8 @@ if ($action == 'updatemeta') $objectpage->title = GETPOST('WEBSITE_TITLE', 'alpha'); $objectpage->description = GETPOST('WEBSITE_DESCRIPTION', 'alpha'); $objectpage->keywords = GETPOST('WEBSITE_KEYWORDS', 'alpha'); - $objectpage->lang = GETPOST('WEBSITE_LANG', 'alpha'); + $objectpage->lang = GETPOST('WEBSITE_LANG', 'aZ09'); + $objectpage->htmlheader = GETPOST('htmlheader', 'none'); $res = $objectpage->update($user); if (! $res > 0) @@ -943,11 +945,11 @@ if (GETPOST('exportsite')) { $fileofzip = exportWebSite($object); - $file_name = basename($yourfile); + $file_name = basename($fileofzip); header("Content-Type: application/zip"); header("Content-Disposition: attachment; filename=".$file_name); - header("Content-Length: " . filesize($yourfile)); + header("Content-Length: " . filesize($fileofzip)); readfile($fileofzip); exit; @@ -1567,12 +1569,14 @@ if ($action == 'editmeta' || $action == 'create') $pagedescription=$objectpage->description; $pagekeywords=$objectpage->keywords; $pagelang=$objectpage->lang; + $pagehtmlheader=$objectpage->htmlheader; } - if (GETPOST('WEBSITE_PAGENAME')) $pageurl=GETPOST('WEBSITE_PAGENAME','alpha'); - if (GETPOST('WEBSITE_TITLE')) $pagetitle=GETPOST('WEBSITE_TITLE','alpha'); - if (GETPOST('WEBSITE_DESCRIPTION')) $pagedescription=GETPOST('WEBSITE_DESCRIPTION','alpha'); - if (GETPOST('WEBSITE_KEYWORDS')) $pagekeywords=GETPOST('WEBSITE_KEYWORDS','alpha'); - if (GETPOST('WEBSITE_LANG')) $pagelang=GETPOST('WEBSITE_LANG','aZ09'); + if (GETPOST('WEBSITE_PAGENAME','alpha')) $pageurl=GETPOST('WEBSITE_PAGENAME','alpha'); + if (GETPOST('WEBSITE_TITLE','alpha')) $pagetitle=GETPOST('WEBSITE_TITLE','alpha'); + if (GETPOST('WEBSITE_DESCRIPTION','alpha')) $pagedescription=GETPOST('WEBSITE_DESCRIPTION','alpha'); + if (GETPOST('WEBSITE_KEYWORDS','alpha')) $pagekeywords=GETPOST('WEBSITE_KEYWORDS','alpha'); + if (GETPOST('WEBSITE_LANG','aZ09')) $pagelang=GETPOST('WEBSITE_LANG','aZ09'); + if (GETPOST('htmlheader','none')) $pagehtmlheader=GETPOST('htmlheader','none'); print ''; print $langs->trans('WEBSITE_PAGENAME'); @@ -1604,6 +1608,13 @@ if ($action == 'editmeta' || $action == 'create') print $formadmin->select_language($pagelang?$pagelang:$langs->defaultlang, 'WEBSITE_LANG'); print ''; + print ''; + print $langs->trans('HtmlHeaderPage'); + print ''; + $doleditor=new DolEditor('htmlheader', $pagehtmlheader, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', ''); + print $doleditor->Create(1, '', true, 'HTML Header', 'html'); + print ''; + print ''; if ($action == 'create')