31require
'../../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
38$langs->loadLangs(array(
'admin',
'errors',
'other',
'projects'));
44$action =
GETPOST(
'action',
'aZ09');
45$modulepart =
GETPOST(
'modulepart',
'aZ09');
47$value =
GETPOST(
'value',
'alpha');
48$label =
GETPOST(
'label',
'alpha');
49$scandir =
GETPOST(
'scan_dir',
'alpha');
57include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
59if ($action ==
'updateMask') {
60 $maskconstproject =
GETPOST(
'maskconstproject',
'aZ09');
61 $maskproject =
GETPOST(
'maskproject',
'alpha');
63 if ($maskconstproject && preg_match(
'/_MASK$/', $maskconstproject)) {
64 $res =
dolibarr_set_const($db, $maskconstproject, $maskproject,
'chaine', 0,
'', $conf->entity);
78if ($action ==
'updateMaskTask') {
79 $maskconstmasktask =
GETPOST(
'maskconsttask',
'aZ09');
80 $masktaskt =
GETPOST(
'masktask',
'alpha');
82 if ($maskconstmasktask && preg_match(
'/_MASK$/', $maskconstmasktask)) {
83 $res =
dolibarr_set_const($db, $maskconstmasktask, $masktaskt,
'chaine', 0,
'', $conf->entity);
95} elseif ($action ==
'specimen') {
96 $modele =
GETPOST(
'module',
'alpha');
99 $project->initAsSpecimen();
105 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
106 foreach ($dirmodels as $reldir) {
107 $file =
dol_buildpath($reldir.
"core/modules/project/doc/pdf_".$modele.
".modules.php", 0);
108 if (file_exists($file)) {
110 $classname =
"pdf_".$modele;
118 $module =
new $classname($db);
120 if ($module->write_file($project, $langs) > 0) {
121 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=project&file=SPECIMEN.pdf");
129 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
131} elseif ($action ==
'specimentask') {
132 $modele =
GETPOST(
'module',
'alpha');
135 $project->initAsSpecimen();
141 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
142 foreach ($dirmodels as $reldir) {
143 $file =
dol_buildpath($reldir.
"core/modules/project/task/doc/pdf_".$modele.
".modules.php", 0);
144 if (file_exists($file)) {
146 $classname =
"pdf_".$modele;
154 $module =
new $classname($db);
156 if ($module->write_file($project, $langs) > 0) {
157 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=project_task&file=SPECIMEN.pdf");
165 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
167} elseif ($action ==
'set') {
170} elseif ($action ==
'settask') {
173} elseif ($action ==
'del') {
176 if ($conf->global->PROJECT_ADDON_PDF ==
"$value") {
180} elseif ($action ==
'deltask') {
183 if ($conf->global->PROJECT_TASK_ADDON_PDF ==
"$value") {
187} elseif ($action ==
'setdoc') {
196} elseif ($action ==
'setdoctask') {
197 if (
dolibarr_set_const($db,
"PROJECT_TASK_ADDON_PDF", $value,
'chaine', 0,
'', $conf->entity)) {
200 $conf->global->PROJECT_TASK_ADDON_PDF = $value;
208} elseif ($action ==
'setmod') {
213} elseif ($action ==
'setmodtask') {
217 dolibarr_set_const($db,
"PROJECT_TASK_ADDON", $value,
'chaine', 0,
'', $conf->entity);
218} elseif ($action ==
'updateoptions') {
219 if (
GETPOST(
'PROJECT_USE_SEARCH_TO_SELECT')) {
220 $companysearch =
GETPOST(
'activate_PROJECT_USE_SEARCH_TO_SELECT',
'alpha');
221 if (
dolibarr_set_const($db,
"PROJECT_USE_SEARCH_TO_SELECT", $companysearch,
'chaine', 0,
'', $conf->entity)) {
222 $conf->global->PROJECT_USE_SEARCH_TO_SELECT = $companysearch;
225 if (
GETPOST(
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) {
226 $projectToSelect =
GETPOST(
'projectToSelect',
'alpha');
227 dolibarr_set_const($db,
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY', $projectToSelect,
'chaine', 0,
'', $conf->entity);
229 if (
GETPOST(
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')) {
230 $timesheetFreezeDuration =
GETPOST(
'timesheetFreezeDuration',
'alpha');
231 dolibarr_set_const($db,
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS', intval($timesheetFreezeDuration),
'chaine', 0,
'', $conf->entity);
233} elseif (preg_match(
'/^(set|del)_?([A-Z_]+)$/', $action, $reg)) {
235 if (!
dolibarr_set_const($db, $reg[2], ($reg[1] ===
'set' ?
'1' :
'0'),
'chaine', 0,
'', $conf->entity) > 0) {
244$dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
246llxHeader(
"", $langs->trans(
"ProjectsSetup"));
248$form =
new Form($db);
250$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
251print
load_fiche_titre($langs->trans(
"ProjectsSetup"), $linkback,
'title_setup');
260$form =
new Form($db);
262print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
263print
'<input type="hidden" name="token" value="'.newToken().
'">';
264print
'<input type="hidden" name="action" value="setmainoptions">';
266print
'<table class="noborder centpercent">';
267print
'<tr class="liste_titre">';
268print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
269print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
270print
'<td width="80"> </td></tr>'.
"\n";
272print
'<tr class="oddeven">';
273print
'<td width="80%">'.$langs->trans(
"ManageOpportunitiesStatus").
'</td>';
274print
'<td width="60" class="right">';
275print ajax_constantonoff(
"PROJECT_USE_OPPORTUNITIES",
null,
null, 0, 0, 1);
276print
'</td><td class="right">';
281print
'<tr class="oddeven">';
282print
'<td width="80%">'.$langs->trans(
"ManageTasks").
'</td>';
283print
'<td width="60" class="right">';
284print ajax_constantonoff(
"PROJECT_HIDE_TASKS", array(),
null, 1);
285print
'</td><td class="right">';
289print
'</table></form>';
301print
'<div class="div-table-responsive-no-min">';
302print
'<table class="noborder centpercent">';
303print
'<tr class="liste_titre">';
304print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
305print
'<td>'.$langs->trans(
"Description").
'</td>';
306print
'<td>'.$langs->trans(
"Example").
'</td>';
307print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
308print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
313foreach ($dirmodels as $reldir) {
317 $handle = opendir($dir);
318 if (is_resource($handle)) {
319 while (($file = readdir($handle)) !==
false) {
320 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
322 $classname = substr($file, 4);
324 require_once $dir.$file.
'.php';
326 $module =
new $file();
329 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
332 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
336 if ($module->isEnabled()) {
337 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
338 print $module->info($langs);
342 print
'<td class="nowrap">';
343 $tmp = $module->getExample();
344 if (preg_match(
'/^Error/', $tmp)) {
345 $langs->load(
"errors");
346 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
347 } elseif ($tmp ==
'NotConfigured') {
348 print $langs->trans($tmp);
354 print
'<td class="center">';
355 if ($conf->global->PROJECT_ADDON ==
'mod_'.$classname) {
356 print
img_picto($langs->trans(
"Activated"),
'switch_on');
358 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>';
363 $project->initAsSpecimen();
367 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
368 $nextval = $module->getNextValue($mysoc, $project);
369 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
370 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
372 $htmltooltip .= $nextval.
'<br>';
374 $htmltooltip .= $langs->trans($module->error).
'<br>';
378 print
'<td class="center">';
379 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
399 print
'<div class="div-table-responsive-no-min">';
400 print
'<table class="noborder centpercent">';
401 print
'<tr class="liste_titre">';
402 print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
403 print
'<td>'.$langs->trans(
"Description").
'</td>';
404 print
'<td>'.$langs->trans(
"Example").
'</td>';
405 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
406 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
411 foreach ($dirmodels as $reldir) {
415 $handle = opendir($dir);
416 if (is_resource($handle)) {
417 while (($file = readdir($handle)) !==
false) {
418 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
420 $classname = substr($file, 4);
422 require_once $dir.$file.
'.php';
424 $module =
new $file();
427 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
430 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
434 if ($module->isEnabled()) {
435 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
436 print $module->info($langs);
440 print
'<td class="nowrap">';
441 $tmp = $module->getExample();
442 if (preg_match(
'/^Error/', $tmp)) {
443 $langs->load(
"errors");
444 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
445 } elseif ($tmp ==
'NotConfigured') {
446 print $langs->trans($tmp);
452 print
'<td class="center">';
453 if ($conf->global->PROJECT_TASK_ADDON ==
'mod_'.$classname) {
454 print
img_picto($langs->trans(
"Activated"),
'switch_on');
456 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>';
461 $project->initAsSpecimen();
465 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
466 $nextval = $module->getNextValue($mysoc, $project);
467 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
468 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
470 $htmltooltip .= $nextval.
'<br>';
472 $htmltooltip .= $langs->trans($module->error).
'<br>';
476 print
'<td class="center">';
477 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
506$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
507$sql .=
" WHERE type = '".$db->escape($type).
"'";
508$sql .=
" AND entity = ".$conf->entity;
510$resql = $db->query($sql);
513 $num_rows = $db->num_rows($resql);
514 while ($i < $num_rows) {
515 $array = $db->fetch_array($resql);
516 array_push($def, $array[0]);
523print
'<div class="div-table-responsive-no-min">';
524print
'<table class="noborder" width="100%">'.
"\n";
525print
'<tr class="liste_titre">'.
"\n";
526print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
527print
" <td>".$langs->trans(
"Description").
"</td>\n";
528print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
529print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
530print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
531print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
536foreach ($dirmodels as $reldir) {
537 foreach (array(
'',
'/doc') as $valdir) {
538 $dir =
dol_buildpath($reldir.
"core/modules/project/".$valdir);
541 $handle = opendir($dir);
542 if (is_resource($handle)) {
543 while (($file = readdir($handle)) !==
false) {
549 foreach ($filelist as $file) {
550 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
551 if (file_exists($dir.
'/'.$file)) {
552 $name = substr($file, 4,
dol_strlen($file) - 16);
553 $classname = substr($file, 0,
dol_strlen($file) - 12);
555 require_once $dir.
'/'.$file;
556 $module =
new $classname($db);
558 $modulequalified = 1;
559 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
560 $modulequalified = 0;
562 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
563 $modulequalified = 0;
566 if ($modulequalified) {
567 print
'<tr class="oddeven"><td width="100">';
568 print(empty($module->name) ? $name : $module->
name);
570 if (method_exists($module,
'info')) {
571 print $module->info($langs);
573 print $module->description;
578 if (in_array($name, $def)) {
579 print
"<td class=\"center\">\n";
580 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
581 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
585 print
"<td class=\"center\">\n";
586 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
591 print
"<td class=\"center\">";
592 if ($conf->global->PROJECT_ADDON_PDF ==
"$name") {
593 print
img_picto($langs->trans(
"Default"),
'on');
595 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>';
600 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
601 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
602 if ($module->type ==
'pdf') {
603 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
605 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
606 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
608 print
'<td class="center">';
609 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
613 print
'<td class="center">';
614 if ($module->type ==
'pdf') {
615 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
617 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
645 $type =
'project_task';
649 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
650 $sql .=
" WHERE type = '".$db->escape($type).
"'";
651 $sql .=
" AND entity = ".$conf->entity;
653 $resql = $db->query($sql);
656 $num_rows = $db->num_rows($resql);
657 while ($i < $num_rows) {
658 $array = $db->fetch_array($resql);
659 array_push($def, $array[0]);
666 print
'<div class="div-table-responsive-no-min">';
667 print
'<table class="noborder" width="100%">'.
"\n";
668 print
'<tr class="liste_titre">'.
"\n";
669 print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
670 print
" <td>".$langs->trans(
"Description").
"</td>\n";
671 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
672 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
673 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
674 print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
679 foreach ($dirmodels as $reldir) {
680 foreach (array(
'',
'/doc') as $valdir) {
681 $dir =
dol_buildpath($reldir.
"core/modules/project/task/".$valdir);
684 $handle = opendir($dir);
685 if (is_resource($handle)) {
686 while (($file = readdir($handle)) !==
false) {
692 foreach ($filelist as $file) {
693 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
694 if (file_exists($dir.
'/'.$file)) {
695 $name = substr($file, 4,
dol_strlen($file) - 16);
696 $classname = substr($file, 0,
dol_strlen($file) - 12);
698 require_once $dir.
'/'.$file;
699 $module =
new $classname($db);
701 $modulequalified = 1;
702 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
703 $modulequalified = 0;
705 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
706 $modulequalified = 0;
709 if ($modulequalified) {
710 print
'<tr class="oddeven"><td width="100">';
711 print(empty($module->name) ? $name : $module->
name);
713 if (method_exists($module,
'info')) {
714 print $module->info($langs);
716 print $module->description;
721 if (in_array($name, $def)) {
722 print
'<td class="center">'.
"\n";
723 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=deltask&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
724 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
728 print
'<td class="center">'.
"\n";
729 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>';
734 print
'<td class="center">';
735 if ($conf->global->PROJECT_TASK_ADDON_PDF ==
"$name") {
736 print
img_picto($langs->trans(
"Default"),
'on');
738 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>';
743 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
744 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
745 if ($module->type ==
'pdf') {
746 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
748 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
749 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
751 print
'<td class="center">';
752 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
756 print
'<td class="center">';
757 if ($module->type ==
'pdf') {
758 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimentask&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
760 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
782$form =
new Form($db);
784print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
785print
'<input type="hidden" name="token" value="'.newToken().
'">';
786print
'<input type="hidden" name="action" value="updateoptions">';
787print
'<input type="hidden" name="page_y" value="">';
789print
'<div class="div-table-responsive-no-min">';
790print
'<table class="noborder centpercent">';
791print
'<tr class="liste_titre">';
792print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
793print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
794print
'<td width="80"> </td></tr>'.
"\n";
796print
'<tr class="oddeven">';
797print
'<td width="80%">'.$langs->trans(
"UseSearchToSelectProject").
'</td>';
798if (!$conf->use_javascript_ajax) {
799 print
'<td class="nowrap right" colspan="2">';
800 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
803 print
'<td width="60" class="right">';
804 $arrval = array(
'0'=>$langs->trans(
"No"),
805 '1'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
806 '2'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
807 '3'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
809 print $form->selectarray(
"activate_PROJECT_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
"PROJECT_USE_SEARCH_TO_SELECT"));
810 print
'</td><td class="right">';
811 print
'<input type="submit" class="button small reposition" name="PROJECT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
816print
'<tr class="oddeven">';
817print
'<td>'.$langs->trans(
"AllowToSelectProjectFromOtherCompany").
'</td>';
819print
'<td class="right" width="60" colspan="2">';
820print
'<input type="text" id="projectToSelect" name="projectToSelect" value="' .
getDolGlobalString(
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY').
'"/> ';
821print $form->textwithpicto(
'', $langs->trans(
'AllowToLinkFromOtherCompany'));
822print
'<input type="submit" class="button small reposition" name="PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY" value="'.$langs->trans(
"Modify").
'">';
826$key =
'PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE';
827echo
'<tr class="oddeven">',
829 $form->textwithpicto($langs->transnoentities($key), $langs->transnoentities($key .
'_help')),
831 '<td class="right" colspan="2">',
832 ajax_constantonoff($key),
836print
'<tr class="oddeven">';
837print
'<td>'.$langs->trans(
"TimesheetPreventAfterFollowingMonths").
'</td>';
839print
'<td class="right" width="60" colspan="2">';
840print
'<input type="number" class="width50" id="timesheetFreezeDuration" name="timesheetFreezeDuration" min="0" step="1" value="' .
getDolGlobalString(
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS').
'"/> ';
841print
'<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.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage projects.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
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.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return 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.