diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index ab67974c920..68ab91c4638 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -160,7 +160,6 @@ if ($action == 'update') dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", GETPOST('MAIN_HELPCENTER_DISABLELINK', 'aZ09'), 'chaine', 0, '', 0); // Param for all entities dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'none')), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr(GETPOST("main_home", 'none')), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities @@ -278,8 +277,10 @@ print ''; // Disable javascript and ajax print ''.$langs->trans("DisableJavascript").''; print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0); +print '     '.$langs->trans("DisableJavascriptNote").''; +print ''; +print ''; print ''; -print ' '; print ''; // Max size of lists @@ -392,6 +393,13 @@ print ''.$langs->trans("LoginPage print ' '; print ''; +// Hide helpcenter link on login page +print ''.$langs->trans("DisableLinkToHelpCenter").''; +print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0); +print ''; +print ' '; +print ''; + // Message on login page $substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount', 'user')); complete_substitutions_array($substitutionarray, $langs); @@ -407,13 +415,6 @@ $doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf $doleditor->Create(); print ''."\n"; -// Hide helpcenter link on login page -print ''.$langs->trans("DisableLinkToHelpCenter").''; -print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK', isset($conf->global->MAIN_HELPCENTER_DISABLELINK) ? $conf->global->MAIN_HELPCENTER_DISABLELINK : 0, 1); -print ''; -print ' '; -print ''; - // Background print ''; print '
'; diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 4ca7086c132..13d67c942ed 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -106,6 +106,7 @@ if ($resql) $total = 0; $totalinprocess = 0; $dataseries = array(); + $colorseries = array(); $vals = array(); // -1=Canceled, 0=Draft, 1=Validated, 2=Accepted/On process, 3=Closed (Sent/Received, billed or not) while ($i < $num) diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 9a4ce5b0427..4d4f56a1354 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -462,7 +462,7 @@ if (count($amount)) { print ''; print ''.$langs->trans("Total").''; if ($modecompta != 'CREANCES-DETTES') { - print ''; + print ''; } else { print ''.price($catotal_ht).''; } diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index c563d8c5ae6..bec20998cfa 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -625,7 +625,7 @@ if (count($amount)) { print ' '; print ' '; if ($modecompta != 'CREANCES-DETTES') { - print ''; + print ''; } else { print ''.price($catotal_ht).''; } diff --git a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php index a9cdef94711..fcae12f744b 100644 --- a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php +++ b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php @@ -574,7 +574,7 @@ if (count($amount)) { print ' '; print ' '; if ($modecompta != 'CREANCES-DETTES') { - print ''; + print ''; } else { print ''.price($catotal_ht).''; } diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 35e5d00bab8..da41a02491b 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -247,7 +247,7 @@ class FormTicket $doleditor->Create(); print ''; - // FK_USER_CREATE + // User of creation if ($this->withusercreate > 0 && $this->fk_user_create) { print ''.$langs->trans("CreatedBy").''; $langs->load("users"); @@ -270,6 +270,7 @@ class FormTicket print ''.$langs->trans("ThirdParty").''; $events = array(); $events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled')); + print img_picto('', 'company', 'class="paddingright"'); print $form->select_company($this->withfromsocid, 'socid', '', 1, 1, '', $events, 0, 'minwidth200'); print ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT)) { @@ -330,6 +331,7 @@ class FormTicket print ''.$langs->trans("Contact").''; // If no socid, set to -1 to avoid full contacts list $selectedCompany = ($this->withfromsocid > 0) ? $this->withfromsocid : -1; + print img_picto('', 'contact', 'class="paddingright"'); $nbofcontacts = $form->select_contacts($selectedCompany, $this->withfromcontactid, 'contactid', 3, '', '', 0, 'minwidth200'); print ' '; $formcompany->selectTypeContact($ticketstatic, '', 'type', 'external', '', 0, 'maginleftonly'); diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index c29b82f4329..329d177a33d 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -533,8 +533,8 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof '."\n"; $out .= ''; - $out .= ''.($revertonoff ?img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).''; - $out .= ''.($revertonoff ?img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort)).''; + $out .= ''.($revertonoff ?img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).''; + $out .= ''.($revertonoff ?img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort)).''; $out .= "\n"; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 850879e262e..94a32ceacaf 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3146,20 +3146,20 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt', 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help', 'intervention', 'language', 'list', 'listlight', 'lot', - 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', 'stock', + 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', 'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom', 'object_category', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice', - 'object_holiday', 'object_hrm', 'object_intervention', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment', + 'object_holiday', 'object_hrm', 'object_intervention', 'object_margin', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment', 'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal', 'object_other', 'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask', 'object_supplier_invoice', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock', 'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', 'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'off', 'on', 'order', - 'paiment', 'play', 'playdisabled', 'poll', 'printer', 'product', 'propal', 'resize', 'service', 'stats', 'trip', - 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench', + 'paiment', 'play', 'playdisabled', 'poll', 'printer', 'product', 'propal', 'projecttask', 'stock', 'resize', 'service', 'stats', 'trip', + 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp', 'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'home', 'companies', 'products', 'commercial', 'invoicing', 'preview', 'project', 'projectpub', 'supplier_invoice', 'hrm', 'members', 'ticket', 'generic', @@ -3185,7 +3185,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly', - 'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode', + 'hrm'=>'umbrella-beach', 'margin'=>'calculator', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode', 'email'=>'at', 'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'info-circle', 'generic'=>'file', 'holiday'=>'umbrella-beach', 'member'=>'users', 'mrp'=>'cubes', 'trip'=>'wallet', 'group'=>'users', diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 428d976ab6d..581a7ebab74 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -2241,7 +2241,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { if (!in_array('prospectionstatus', $hiddenfields)) { - print ''; + print ''; // Because color of prospection status has no meaning yet, it is used if hidden constant is set if (empty($conf->global->USE_COLOR_FOR_PROSPECTION_STATUS)) { $oppStatusCode = dol_getIdFromCode($db, $objp->opp_status, 'c_lead_status', 'rowid', 'code'); diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 5b7c923001b..d41965bdf1f 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -502,9 +502,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) { print yn($conf->global->THEME_TOPMENU_DISABLE_IMAGE); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -549,9 +548,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($color) print ''; else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': ffffff) '; + print '   '.$langs->trans("Default").': ffffff '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -597,9 +595,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($color) print ''; else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -645,9 +642,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($color) print ''; else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -671,9 +667,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) { print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default")); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; @@ -698,9 +693,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) { print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default")); } - print '   ('.$langs->trans("Default").': '.$default.') '; // $colorbacktitle1 in CSS + print '   '.$langs->trans("Default").': '.$default.' '; // $colorbacktitle1 in CSS print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; @@ -725,9 +719,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) { print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLE, $langs->trans("Default")); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; @@ -754,9 +747,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($color) print ''; else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -782,9 +774,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($color) print ''; else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -835,9 +826,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print $langs->trans("Default"); } } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -881,9 +871,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; } @@ -927,9 +916,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -959,7 +947,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if (empty($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) print ' ('.$langs->trans("ForcedByGlobalSetup").')'; } } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("MAIN_OPTIMIZEFORTEXTBROWSERDesc")); print ''; print ''; @@ -979,7 +967,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) { print yn($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   wspan class="opacitymedium">'.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("MAIN_OPTIMIZEFORTEXTBROWSERDesc")); print ''; print ''; @@ -1018,7 +1006,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print yn(0); } } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("MAIN_OPTIMIZEFORCOLORBLINDDesc")); print ''; print ''; diff --git a/htdocs/margin/admin/margin.php b/htdocs/margin/admin/margin.php index a2ac11abf7d..5b6cd01ba97 100644 --- a/htdocs/margin/admin/margin.php +++ b/htdocs/margin/admin/margin.php @@ -39,6 +39,7 @@ $action = GETPOST('action', 'alpha'); /* * Action */ + if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; @@ -107,6 +108,8 @@ if ($action == 'contact') * View */ +$form = new Form($db); + llxHeader('', $langs->trans("margesSetup")); @@ -118,16 +121,13 @@ $head = marges_admin_prepare_head(); dol_fiche_head($head, 'parameters', $langs->trans("Margins"), -1, 'margin'); -print load_fiche_titre($langs->trans("MemberMainOptions"), '', ''); print ''; print ''; -print ''; -print ''."\n"; +print ''; +print ''."\n"; print ''."\n"; print ''; -$form = new Form($db); - // GLOBAL DISCOUNT MANAGEMENT print ''; print ''; @@ -162,7 +162,7 @@ print ''; // DISPLAY MARGIN RATES print ''; print ''; -print ''; // DISPLAY MARK RATES print ''; print ''; -print ''; print ''; print ''; -print ''; - print ''; - print ''; - print ''; - print ''; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 67131c29ef4..b7a3f33c117 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -441,7 +441,7 @@ else else $texthelp .= $langs->trans("TasksOnProjectsPublicDesc"); } -print_barre_liste($form->textwithpicto($title, $texthelp), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'project', 0, $newcardbutton, '', $limit, 0, 0, 1); +print_barre_liste($form->textwithpicto($title, $texthelp), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'projecttask', 0, $newcardbutton, '', $limit, 0, 0, 1); $topicmail = "Information"; $modelmail = "task"; diff --git a/htdocs/projet/tasks/stats/index.php b/htdocs/projet/tasks/stats/index.php index c758664d2c6..bbb275ef5df 100644 --- a/htdocs/projet/tasks/stats/index.php +++ b/htdocs/projet/tasks/stats/index.php @@ -67,7 +67,7 @@ llxHeader('', $langs->trans('Tasks')); $title = $langs->trans("TasksStatistics"); $dir = $conf->projet->dir_output.'/temp'; -print load_fiche_titre($title, '', 'project'); +print load_fiche_titre($title, '', 'projecttask'); dol_mkdir($dir); diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index cae4e5a81ad..b4708780c63 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -534,7 +534,7 @@ if ($resql) // Date if (!empty($arrayfields['sp.date_valid']['checked'])) { - print '
'.$langs->trans("Description").''.$langs->trans("Value").''.$langs->trans("MemberMainOptions").''.$langs->trans("Value").''.$langs->trans("Description").'
'.$langs->trans("DisplayMarginRates").''; +print ''; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('DISPLAY_MARGIN_RATES'); @@ -185,7 +185,7 @@ print '
'.$langs->trans("DisplayMarkRates").''; +print ''; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('DISPLAY_MARK_RATES'); @@ -208,7 +208,7 @@ print '
'.$langs->trans("ForceBuyingPriceIfNull").''; +print ''; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('ForceBuyingPriceIfNull'); diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index 63115350bbc..107bcb4e4e3 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -21,7 +21,7 @@ /** * \file htdocs/projet/activity/index.php * \ingroup projet - * \brief Page activite perso du module projet + * \brief Page on activity of projects */ require "../../main.inc.php"; @@ -92,7 +92,7 @@ else else $tooltiphelp = $langs->trans("TasksPublicDesc"); } -print_barre_liste($form->textwithpicto($title, $tooltiphelp), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'project', 0, $morehtml); +print_barre_liste($form->textwithpicto($title, $tooltiphelp), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'projecttask', 0, $morehtml); print '
'; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index cb004bc33a0..ebc6a7dc556 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -499,7 +499,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third { if ($id > 0 || !empty($ref)) print '
'; - print load_fiche_titre($langs->trans("NewTask"), '', 'project'); + print load_fiche_titre($langs->trans("NewTask"), '', 'projecttask'); if ($object->statut == Project::STATUS_CLOSED) { diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 0c9a09b37c0..415859127db 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -395,11 +395,11 @@ if ($id > 0 || !empty($ref)) print img_object('', 'user').' '.$langs->trans("Users"); print '
'; + print ''; print $conf->global->MAIN_INFO_SOCIETE_NOM; print ''; + print ''; // On recupere les id des users deja selectionnes if ($object->project->public) $contactsofproject = ''; // Everybody else $contactsofproject = $projectstatic->getListContactId('internal'); @@ -430,13 +430,13 @@ if ($id > 0 || !empty($ref)) print img_object('', 'contact').' '.$langs->trans("ThirdPartyContacts"); print ''; + print ''; $thirdpartyofproject = $projectstatic->getListContactId('thirdparty'); $selectedCompany = isset($_GET["newcompany"]) ? $_GET["newcompany"] : $projectstatic->socid; $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', $thirdpartyofproject, 0, '&withproject='.$withproject); print ''; + print ''; $contactofproject = $projectstatic->getListContactId('external'); $nbofcontacts = $form->select_contacts($selectedCompany, '', 'contactid', 0, '', $contactofproject); print ''; + print ''; //print $langs->trans('Month').': '; print ''; //print ' '.$langs->trans('Year').': '; @@ -545,7 +545,7 @@ if ($resql) // Date if (!empty($arrayfields['sp.date_livraison']['checked'])) { - print ''; + print ''; //print $langs->trans('Month').': '; print ''; //print ' '.$langs->trans('Year').': '; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 172309a233e..85c900eaf55 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1177,116 +1177,41 @@ class Ticket extends CommonObject // phpcs:enable global $langs; - if ($mode == 0) { - return $langs->trans($this->statuts[$status]); + $labelStatus = $this->statuts[$status]; + $labelStatusShort = $this->statuts_short[$status]; + + if ($status == self::STATUS_NOT_READ) { + $statusType = 'status0'; } - elseif ($mode == 1) { - return $langs->trans($this->statuts_short[$status]); + elseif ($status == self::STATUS_READ) { + $statusType = 'status1'; } - elseif ($mode == 2) { - if ($status == self::STATUS_NOT_READ) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_READ) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_ASSIGNED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_IN_PROGRESS) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_NEED_MORE_INFO) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_WAITING) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_CLOSED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_CANCELED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } + elseif ($status == self::STATUS_ASSIGNED) { + $statusType = 'status3'; } - elseif ($mode == 3) { - if ($status == self::STATUS_NOT_READ) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket'); - } - elseif ($status == self::STATUS_READ) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket'); - } - elseif ($status == self::STATUS_ASSIGNED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket'); - } - elseif ($status == self::STATUS_IN_PROGRESS) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket'); - } - elseif ($status == self::STATUS_NEED_MORE_INFO) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket'); - } - elseif ($status == self::STATUS_WAITING) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket'); - } - elseif ($status == self::STATUS_CLOSED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket'); - } - elseif ($status == self::STATUS_CANCELED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket'); - } + elseif ($status == self::STATUS_IN_PROGRESS) { + $statusType = 'status4'; } - elseif ($mode == 4) { - if ($status == self::STATUS_NOT_READ) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_READ) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_ASSIGNED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_IN_PROGRESS) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_NEED_MORE_INFO) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_WAITING) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_CLOSED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_CANCELED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } + elseif ($status == self::STATUS_WAITING) { + $statusType = 'status3'; } - elseif ($mode == 5 || $mode == 6) { - if ($status == self::STATUS_NOT_READ) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket'); - } - elseif ($status == self::STATUS_READ) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket'); - } - elseif ($status == self::STATUS_ASSIGNED) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket'); - } - elseif ($status == self::STATUS_IN_PROGRESS) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket'); - } - elseif ($status == self::STATUS_NEED_MORE_INFO) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket'); - } - elseif ($status == self::STATUS_WAITING) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket'); - } - elseif ($status == self::STATUS_CLOSED) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket'); - } - elseif ($status == self::STATUS_CANCELED) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket'); - } + elseif ($status == self::STATUS_NEED_MORE_INFO) { + $statusType = 'status9'; } + elseif ($status == self::STATUS_CANCELED) { + $statusType = 'status9'; + } + elseif ($status == self::STATUS_CLOSED) { + $statusType = 'status6'; + } + else { + $labelStatus = $langs->trans('Unknown'); + $labelStatusShort = $langs->trans('Unknown'); + $statusType = 'status0'; + $mode = 0; + } + + return dolGetStatus($langs->trans($labelStatus), $langs->trans($labelStatusShort), '', $statusType, $mode); } diff --git a/htdocs/ticket/index.php b/htdocs/ticket/index.php index 86929157d25..cfd8e3f26f3 100644 --- a/htdocs/ticket/index.php +++ b/htdocs/ticket/index.php @@ -181,15 +181,27 @@ if ($result) { } } + include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + $dataseries = array(); + $colorseries = array(); + $dataseries[] = array('label' => $langs->trans("Unread"), 'data' => round($tick['unread'])); + $colorseries[Ticket::STATUS_NOT_READ] = '-'.$badgeStatus0; $dataseries[] = array('label' => $langs->trans("Read"), 'data' => round($tick['read'])); - $dataseries[] = array('label' => $langs->trans("NeedMoreInformation"), 'data' => round($tick['needmoreinfo'])); + $colorseries[Ticket::STATUS_READ] = $badgeStatus1; $dataseries[] = array('label' => $langs->trans("Assigned"), 'data' => round($tick['assigned'])); + $colorseries[Ticket::STATUS_ASSIGNED] = $badgeStatus3; $dataseries[] = array('label' => $langs->trans("InProgress"), 'data' => round($tick['inprogress'])); - $dataseries[] = array('label' => $langs->trans("Waiting"), 'data' => round($tick['waiting'])); - $dataseries[] = array('label' => $langs->trans("Closed"), 'data' => round($tick['closed'])); + $colorseries[Ticket::STATUS_IN_PROGRESS] = $badgeStatus4; + $dataseries[] = array('label' => $langs->trans("Suspended"), 'data' => round($tick['waiting'])); + $colorseries[Ticket::STATUS_WAITING] = '-'.$badgeStatus3; + $dataseries[] = array('label' => $langs->trans("NeedMoreInformation"), 'data' => round($tick['needmoreinfo'])); + $colorseries[Ticket::STATUS_NEED_MORE_INFO] = $badgeStatus9; $dataseries[] = array('label' => $langs->trans("Canceled"), 'data' => round($tick['canceled'])); + $colorseries[Ticket::STATUS_CANCELED] = $badgeStatus9; + $dataseries[] = array('label' => $langs->trans("Closed"), 'data' => round($tick['closed'])); + $colorseries[Ticket::STATUS_CLOSED] = $badgeStatus6; } else { dol_print_error($db); } @@ -233,6 +245,8 @@ if (!empty($dataseries) && count($dataseries) > 1) { $mesg = $px1->isGraphKo(); if (!$mesg) { $px1->SetData($data); + $px1->SetDataColor(array_values($colorseries)); + unset($data1); $i = $startyear; $legend = array();