Fix regression

This commit is contained in:
Laurent Destailleur 2017-12-12 10:13:48 +01:00
parent 118b6ce140
commit 9314dcb046
7 changed files with 13 additions and 18 deletions

View File

@ -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

View File

@ -2705,11 +2705,11 @@ if ($action == 'create')
print '</td></tr>';
// Project
if (! empty($conf->projet->enabled) && $socid > 0)
if (! empty($conf->projet->enabled))
{
$langs->load('projects');
print '<tr><td>' . $langs->trans('Project') . '</td><td colspan="2">';
$numprojet = $formproject->select_projects($socid, $projectid, 'projectid', 0);
$numprojet = $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id.($fac_rec?'&fac_rec='.$fac_rec:'')).'">' . $langs->trans("AddProject") . '</a>';
print '</td></tr>';
}

View File

@ -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='';

View File

@ -211,7 +211,7 @@ OppStatusPENDING=Pending
OppStatusWON=Won
OppStatusLOST=Lost
Budget=Budget
AllowToLinkFromOtherCompany=Allow to link project from other company<br /><br /><u>Supported values :</u><br />- "all" : Link all projects<br />- A list of thirdparty id separated with commas : Link all projects with these thirdparty defined<br />Example : 11524,4795,53<br /><br />N.B.: Leave empty to disable this configuration
AllowToLinkFromOtherCompany=Allow to link project from other company<br><br><u>Supported values :</u><br>- Keep empty: Can link any project of the company (default)<br>- "all" : Can link any projects, even project of other companies<br>- A list of thirdparty id separated with commas : Can link all projects of these thirdparty defined (Example : 123,4795,53)<br>
LatestProjects=Latest %s projects
LatestModifiedProjects=Latest %s modified projects
OtherFilteredTasks=Other filtered tasks

View File

@ -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 '<tr class="oddeven">';
print '<td>'.$langs->trans("AllowToSelectProjectFromOtherCompany").'</td>';
print '<td align="right" width="60" colspan="2">';
print '<form action="project.php" method="POST">';
print '<input type="hidden" id="action" name="action" value="linkOtherCompany" />';
print '<input type="text" id="projectToSelect" name="projectToSelect" value="'.$conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.'"/>&nbsp;';
print $form->textwithpicto('', $langs->trans('AllowToLinkFromOtherCompany'));
print '<input type="submit" class="button" name="PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY" value="'.$langs->trans("Modify").'">';
print '</form>';
print '</td>';
print '</table></form>';
print '</table>';
print '</form>';
llxFooter();
$db->close();

View File

@ -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'],

View File

@ -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'],