33require
'../../main.inc.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
49$langs->loadLangs(array(
'admin',
'errors',
'other',
'projects'));
55$action =
GETPOST(
'action',
'aZ09');
56$modulepart =
GETPOST(
'modulepart',
'aZ09');
58$value =
GETPOST(
'value',
'alpha');
59$label =
GETPOST(
'label',
'alpha');
60$scandir =
GETPOST(
'scan_dir',
'alpha');
68include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
70if ($action ==
'updateMask') {
71 $maskconstproject =
GETPOST(
'maskconstproject',
'aZ09');
72 $maskproject =
GETPOST(
'maskproject',
'alpha');
75 if ($maskconstproject && preg_match(
'/_MASK$/', $maskconstproject)) {
90if ($action ==
'updateMaskTask') {
91 $maskconstmasktask =
GETPOST(
'maskconsttask',
'aZ09');
92 $masktaskt =
GETPOST(
'masktask',
'alpha');
94 if ($maskconstmasktask && preg_match(
'/_MASK$/', $maskconstmasktask)) {
107} elseif ($action ==
'specimen') {
108 $modele =
GETPOST(
'module',
'alpha');
111 $project->initAsSpecimen();
116 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
117 foreach ($dirmodels as $reldir) {
118 $file =
dol_buildpath($reldir.
"core/modules/project/doc/pdf_".$modele.
".modules.php", 0);
119 if (file_exists($file)) {
120 $classname =
"pdf_".$modele;
125 if ($classname !==
'') {
128 $module =
new $classname(
$db);
129 '@phan-var-force ModelePDFProjects $module';
132 if ($module->write_file($project, $langs) > 0) {
133 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=project&file=SPECIMEN.pdf");
141 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
143} elseif ($action ==
'specimentask') {
144 $modele =
GETPOST(
'module',
'alpha');
147 $project->initAsSpecimen();
152 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
153 foreach ($dirmodels as $reldir) {
154 $file =
dol_buildpath($reldir.
"core/modules/project/task/doc/pdf_".$modele.
".modules.php", 0);
155 if (file_exists($file)) {
156 $classname =
"pdf_".$modele;
161 if ($classname !==
'') {
164 $module =
new $classname(
$db);
165 '@phan-var-force ModelePDFTask $module';
168 if ($module->write_file($project, $langs) > 0) {
169 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=project_task&file=SPECIMEN.pdf");
177 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
179} elseif ($action ==
'set') {
182} elseif ($action ==
'settask') {
185} elseif ($action ==
'del') {
192} elseif ($action ==
'deltask') {
199} elseif ($action ==
'setdoc') {
208} elseif ($action ==
'unsetdoc') {
211} elseif ($action ==
'setdoctask') {
215 $conf->global->PROJECT_TASK_ADDON_PDF = $value;
223} elseif ($action ==
'unsetdoctask') {
226} elseif ($action ==
'setmod') {
231} elseif ($action ==
'setmodtask') {
236} elseif ($action ==
'updateoptions') {
237 if (
GETPOST(
'PROJECT_USE_SEARCH_TO_SELECT')) {
238 $companysearch =
GETPOST(
'activate_PROJECT_USE_SEARCH_TO_SELECT',
'alpha');
240 $conf->global->PROJECT_USE_SEARCH_TO_SELECT = $companysearch;
243 if (
GETPOST(
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) {
244 $projectToSelect =
GETPOST(
'projectToSelect',
'alpha');
247 if (
GETPOST(
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')) {
248 $timesheetFreezeDuration =
GETPOST(
'timesheetFreezeDuration',
'alpha');
249 dolibarr_set_const(
$db,
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS', intval($timesheetFreezeDuration),
'chaine', 0,
'',
$conf->entity);
251} elseif (preg_match(
'/^(set|del)_?([A-Z_]+)$/', $action, $reg)) {
264$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
266llxHeader(
"", $langs->trans(
"ProjectsSetup"),
'',
'', 0, 0,
'',
'',
'',
'mod-project page-admin');
270$linkback =
'<a href="'.dolBuildUrl(DOL_URL_ROOT.
'/admin/modules.php', [
'restore_lastsearch_values' => 1]).
'">'.
img_picto($langs->trans(
"BackToModuleList"),
'back',
'class="pictofixedwidth"').
'<span class="hideonsmartphone">'.$langs->trans(
"BackToModuleList").
'</span></a>';
271print
load_fiche_titre($langs->trans(
"ProjectsSetup"), $linkback,
'title_setup');
281print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
282print
'<input type="hidden" name="token" value="'.newToken().
'">';
283print
'<input type="hidden" name="action" value="setmainoptions">';
285print
'<table class="noborder centpercent">';
286print
'<tr class="liste_titre">';
287print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
288print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
289print
'<td width="80"> </td></tr>'.
"\n";
291print
'<tr class="oddeven">';
292print
'<td width="80%">'.$langs->trans(
"ManageOpportunitiesStatus").
'</td>';
293print
'<td width="60" class="right">';
294print ajax_constantonoff(
"PROJECT_USE_OPPORTUNITIES", array(),
null, 0, 0, 1);
295print
'</td><td class="right">';
300print
'<tr class="oddeven">';
301print
'<td width="80%">'.$langs->trans(
"ManageTasks").
'</td>';
302print
'<td width="60" class="right">';
303print ajax_constantonoff(
"PROJECT_HIDE_TASKS", array(),
null, 1);
304print
'</td><td class="right">';
308print
'</table></form>';
320print
'<div class="div-table-responsive-no-min">';
321print
'<table class="noborder centpercent">';
322print
'<tr class="liste_titre">';
323print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
324print
'<td>'.$langs->trans(
"Description").
'</td>';
325print
'<td>'.$langs->trans(
"Example").
'</td>';
326print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
327print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
332foreach ($dirmodels as $reldir) {
336 $handle = opendir($dir);
337 if (is_resource($handle)) {
338 while (($file = readdir($handle)) !==
false) {
339 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
341 $classname = substr($file, 4);
343 require_once $dir.$file.
'.php';
345 $module =
new $file();
346 '@phan-var-force ModeleNumRefProjects $module';
349 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
352 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
356 if ($module->isEnabled()) {
357 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
358 print $module->info($langs);
362 print
'<td class="nowrap">';
363 $tmp = $module->getExample();
364 if (preg_match(
'/^Error/', $tmp)) {
365 $langs->load(
"errors");
366 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
367 } elseif ($tmp ==
'NotConfigured') {
368 print $langs->trans($tmp);
374 print
'<td class="center">';
376 print
img_picto($langs->trans(
"Activated"),
'switch_on');
378 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&token='.newToken().
'&value=mod_'.$classname.
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
383 $project->initAsSpecimen();
387 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
388 $nextval = $module->getNextValue(
$mysoc, $project);
389 if ((
string) $nextval != $langs->trans(
"NotAvailable")) {
390 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
392 $htmltooltip .= $nextval.
'<br>';
394 $htmltooltip .= $langs->trans($module->error).
'<br>';
398 print
'<td class="center">';
399 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
419 print
'<div class="div-table-responsive-no-min">';
420 print
'<table class="noborder centpercent">';
421 print
'<tr class="liste_titre">';
422 print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
423 print
'<td>'.$langs->trans(
"Description").
'</td>';
424 print
'<td>'.$langs->trans(
"Example").
'</td>';
425 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
426 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
431 foreach ($dirmodels as $reldir) {
435 $handle = opendir($dir);
436 if (is_resource($handle)) {
437 while (($file = readdir($handle)) !==
false) {
438 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
440 $classname = substr($file, 4);
442 require_once $dir.$file.
'.php';
444 $module =
new $file();
445 '@phan-var-force ModeleNumRefTask $module';
449 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
452 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
456 if ($module->isEnabled()) {
457 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
458 print $module->info($langs);
462 print
'<td class="nowrap">';
463 $tmp = $module->getExample();
464 if (preg_match(
'/^Error/', $tmp)) {
465 $langs->load(
"errors");
466 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
467 } elseif ($tmp ==
'NotConfigured') {
468 print $langs->trans($tmp);
474 print
'<td class="center">';
476 print
img_picto($langs->trans(
"Activated"),
'switch_on');
478 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setmodtask&token='.newToken().
'&value=mod_'.$classname.
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
483 $project->initAsSpecimen();
487 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
488 $nextval = $module->getNextValue(
$mysoc, $project);
489 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
490 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
492 $htmltooltip .= $nextval.
'<br>';
494 $htmltooltip .= $langs->trans($module->error).
'<br>';
498 print
'<td class="center">';
499 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
528$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
529$sql .=
" WHERE type = '".$db->escape($type).
"'";
530$sql .=
" AND entity = ".((int)
$conf->entity);
532$resql =
$db->query($sql);
535 $num_rows =
$db->num_rows($resql);
536 while ($i < $num_rows) {
537 $array =
$db->fetch_array($resql);
538 if (is_array($array)) {
539 array_push($def, $array[0]);
547print
'<div class="div-table-responsive-no-min">';
548print
'<table class="noborder" width="100%">'.
"\n";
549print
'<tr class="liste_titre">'.
"\n";
550print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
551print
" <td>".$langs->trans(
"Description").
"</td>\n";
552print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
553print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
554print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
555print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
561foreach ($dirmodels as $reldir) {
562 foreach (array(
'',
'/doc') as $valdir) {
563 $dir =
dol_buildpath($reldir.
"core/modules/project/".$valdir);
566 $handle = opendir($dir);
567 if (is_resource($handle)) {
568 while (($file = readdir($handle)) !==
false) {
574 foreach ($filelist as $file) {
575 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
576 if (file_exists($dir.
'/'.$file)) {
577 $name = substr($file, 4,
dol_strlen($file) - 16);
578 $classname = substr($file, 0,
dol_strlen($file) - 12);
580 require_once $dir.
'/'.$file;
581 $module =
new $classname(
$db);
582 '@phan-var-force ModelePDFProjects $module';
584 $modulequalified = 1;
585 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
586 $modulequalified = 0;
588 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
589 $modulequalified = 0;
592 if ($modulequalified) {
593 print
'<tr class="oddeven"><td width="100">';
594 print(empty($module->name) ? $name : $module->
name);
596 if (method_exists($module,
'info')) {
597 print $module->info($langs);
599 print $module->description;
604 if (in_array($name, $def)) {
605 print
'<td class="center">'.
"\n";
606 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
607 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
611 print
'<td class="center">'.
"\n";
612 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
613 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
619 print
'<td class="center">';
621 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=unsetdoc&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'on').
'</a>';
624 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoc&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
629 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
630 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
631 if ($module->type ==
'pdf') {
632 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
634 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
635 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
637 print
'<td class="center">';
638 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
642 print
'<td class="center">';
643 if ($module->type ==
'pdf') {
644 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
646 print
img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
674 $type =
'project_task';
678 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
679 $sql .=
" WHERE type = '".$db->escape($type).
"'";
680 $sql .=
" AND entity = ".((int)
$conf->entity);
682 $resql =
$db->query($sql);
685 $num_rows =
$db->num_rows($resql);
686 while ($i < $num_rows) {
687 $array =
$db->fetch_array($resql);
688 if (is_array($array)) {
689 array_push($def, $array[0]);
697 print
'<div class="div-table-responsive-no-min">';
698 print
'<table class="noborder" width="100%">'.
"\n";
699 print
'<tr class="liste_titre">'.
"\n";
700 print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
701 print
" <td>".$langs->trans(
"Description").
"</td>\n";
702 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
703 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
704 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
705 print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
710 foreach ($dirmodels as $reldir) {
711 foreach (array(
'',
'/doc') as $valdir) {
712 $dir =
dol_buildpath($reldir.
"core/modules/project/task/".$valdir);
715 $handle = opendir($dir);
716 if (is_resource($handle)) {
717 while (($file = readdir($handle)) !==
false) {
723 foreach ($filelist as $file) {
724 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
725 if (file_exists($dir.
'/'.$file)) {
726 $name = substr($file, 4,
dol_strlen($file) - 16);
727 $classname = substr($file, 0,
dol_strlen($file) - 12);
729 require_once $dir.
'/'.$file;
730 $module =
new $classname(
$db);
731 '@phan-var-force ModelePDFTask $module';
733 $modulequalified = 1;
734 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
735 $modulequalified = 0;
737 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
738 $modulequalified = 0;
741 if ($modulequalified) {
742 print
'<tr class="oddeven"><td width="100">';
743 print(empty($module->name) ? $name : $module->
name);
745 if (method_exists($module,
'info')) {
746 print $module->info($langs);
748 print $module->description;
753 if (in_array($name, $def)) {
754 print
'<td class="center">'.
"\n";
755 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=deltask&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
756 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
760 print
'<td class="center">'.
"\n";
761 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=settask&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
766 print
'<td class="center">';
768 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=unsetdoctask&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'on').
'</a>';
770 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoctask&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
775 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
776 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
777 if ($module->type ==
'pdf') {
778 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
780 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
781 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
783 print
'<td class="center">';
784 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
788 print
'<td class="center">';
789 if ($module->type ==
'pdf') {
790 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimentask&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
792 print
img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
816print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
817print
'<input type="hidden" name="token" value="'.newToken().
'">';
818print
'<input type="hidden" name="action" value="updateoptions">';
819print
'<input type="hidden" name="page_y" value="">';
821print
'<div class="div-table-responsive-no-min">';
822print
'<table class="noborder centpercent">';
823print
'<tr class="liste_titre">';
824print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
828print
'<tr class="oddeven">';
829print
'<td>'.$langs->trans(
"UseSearchToSelectProject").
'</td>';
830if (!
$conf->use_javascript_ajax) {
831 print
'<td class="nowrap right">';
832 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
835 print
'<td class="right">';
836 $arrval = array(
'0' => $langs->trans(
"No"),
837 '1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
838 '2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
839 '3' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
841 print $form->selectarray(
"activate_PROJECT_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
"PROJECT_USE_SEARCH_TO_SELECT"));
842 print
'<input type="submit" class="button small reposition" name="PROJECT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
847print
'<tr class="oddeven">';
848print
'<td>'.$langs->trans(
"AllowToSelectProjectFromOtherCompany").
'</td>';
849print
'<td class="right">';
850print
'<input type="text" id="projectToSelect" name="projectToSelect" value="' .
getDolGlobalString(
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY').
'"/> ';
851print $form->textwithpicto(
'', $langs->trans(
'AllowToLinkFromOtherCompany'));
852print
'<input type="submit" class="button small reposition" name="PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY" value="'.$langs->trans(
"Modify").
'">';
856$key =
'PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE';
857echo
'<tr class="oddeven">',
859$form->textwithpicto($langs->transnoentities($key), $langs->transnoentities($key .
'_help')),
862ajax_constantonoff($key),
866print
'<tr class="oddeven">';
867print
'<td>'.$langs->trans(
"TimesheetPreventAfterFollowingMonths").
'</td>';
868print
'<td class="right">';
869print
'<input type="number" class="width50" id="timesheetFreezeDuration" name="timesheetFreezeDuration" min="0" step="1" value="' .
getDolGlobalString(
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS').
'"/> ';
870print
'<input type="submit" class="button small reposition" name="PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS" value="'.$langs->trans(
"Modify").
'">';
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
delDocumentModel($name, $type)
Delete document model used by doc generator.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage projects.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
project_admin_prepare_head()
Prepare array with list of tabs.
$conf db name
Only used if Module[ID]Name translation string is not found.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.