From 9314dcb0460b7244dc5c645563b25815b9970ef5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 Dec 2017 10:13:48 +0100 Subject: [PATCH] Fix regression --- htdocs/compta/bank/card.php | 8 ++------ htdocs/compta/facture/card.php | 4 ++-- htdocs/core/class/html.formprojet.class.php | 2 +- htdocs/langs/en_US/projects.lang | 2 +- htdocs/projet/admin/project.php | 11 +++++------ htdocs/theme/eldy/ckeditor/config.js | 2 +- htdocs/theme/md/ckeditor/config.js | 2 +- 7 files changed, 13 insertions(+), 18 deletions(-) diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 75eeeac551f..c43ee812953 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -39,13 +39,9 @@ if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; -$langs->load("banks"); -$langs->load("bills"); -$langs->load("categories"); -$langs->load("companies"); -$langs->load("compta"); +$langs->loadLangs(array("banks","bills","categories","companies","compta")); -$action=GETPOST('action','aZ09'); +$action = GETPOST('action','aZ09'); $cancel = GETPOST('cancel', 'alpha'); // Security check diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 2e4c9afef4f..50ff7059f91 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2705,11 +2705,11 @@ if ($action == 'create') print ''; // Project - if (! empty($conf->projet->enabled) && $socid > 0) + if (! empty($conf->projet->enabled)) { $langs->load('projects'); print '' . $langs->trans('Project') . ''; - $numprojet = $formproject->select_projects($socid, $projectid, 'projectid', 0); + $numprojet = $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1); print '   id.($fac_rec?'&fac_rec='.$fac_rec:'')).'">' . $langs->trans("AddProject") . ''; print ''; } diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index 798c4981eba..6027941931d 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -68,7 +68,7 @@ class FormProjets global $langs,$conf,$form; $out=''; - + var_dump($conf->global->PROJECT_USE_SEARCH_TO_SELECT); if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->PROJECT_USE_SEARCH_TO_SELECT)) { $placeholder=''; diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index ad260ac6f66..7075f45ecd2 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -211,7 +211,7 @@ OppStatusPENDING=Pending OppStatusWON=Won OppStatusLOST=Lost Budget=Budget -AllowToLinkFromOtherCompany=Allow to link project from other company

Supported values :
- "all" : Link all projects
- A list of thirdparty id separated with commas : Link all projects with these thirdparty defined
Example : 11524,4795,53

N.B.: Leave empty to disable this configuration +AllowToLinkFromOtherCompany=Allow to link project from other company

Supported values :
- Keep empty: Can link any project of the company (default)
- "all" : Can link any projects, even project of other companies
- A list of thirdparty id separated with commas : Can link all projects of these thirdparty defined (Example : 123,4795,53)
LatestProjects=Latest %s projects LatestModifiedProjects=Latest %s modified projects OtherFilteredTasks=Other filtered tasks diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index 17091527e80..37624b49b2c 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -277,7 +277,7 @@ elseif ($action == 'updateoptions') else if ($action == "linkOtherCompany") { $projectToSelect = GETPOST('projectToSelect'); - + dolibarr_set_const($db, 'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY', $projectToSelect, 'chaine', 0, '', $conf->entity); //Allow to disable this configuration if empty value } @@ -919,16 +919,15 @@ print ''; print ''.$langs->trans("AllowToSelectProjectFromOtherCompany").''; print ''; - -print '
'; -print ''; print ' '; print $form->textwithpicto('', $langs->trans('AllowToLinkFromOtherCompany')); print ''; -print '
'; print ''; -print ''; +print ''; + + +print ''; llxFooter(); $db->close(); diff --git a/htdocs/theme/eldy/ckeditor/config.js b/htdocs/theme/eldy/ckeditor/config.js index b70e371fcfb..54383d04196 100644 --- a/htdocs/theme/eldy/ckeditor/config.js +++ b/htdocs/theme/eldy/ckeditor/config.js @@ -84,7 +84,7 @@ CKEDITOR.editorConfig = function( config ) [ ['Maximize'], ['SpellChecker', 'Scayt'], // 'Cut','Copy','Paste','-', are useless, can be done with right click, even on smarpthone - ['Format','Font','FontSize'], + ['Format','FontSize'], ['Bold','Italic','Underline','Strike','-','TextColor','RemoveFormat'], // ,'Subscript','Superscript' useless ['NumberedList','BulletedList','Outdent','Indent'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], diff --git a/htdocs/theme/md/ckeditor/config.js b/htdocs/theme/md/ckeditor/config.js index b70e371fcfb..54383d04196 100644 --- a/htdocs/theme/md/ckeditor/config.js +++ b/htdocs/theme/md/ckeditor/config.js @@ -84,7 +84,7 @@ CKEDITOR.editorConfig = function( config ) [ ['Maximize'], ['SpellChecker', 'Scayt'], // 'Cut','Copy','Paste','-', are useless, can be done with right click, even on smarpthone - ['Format','Font','FontSize'], + ['Format','FontSize'], ['Bold','Italic','Underline','Strike','-','TextColor','RemoveFormat'], // ,'Subscript','Superscript' useless ['NumberedList','BulletedList','Outdent','Indent'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],