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');
74 if ($maskconstproject && preg_match(
'/_MASK$/', $maskconstproject)) {
89if ($action ==
'updateMaskTask') {
90 $maskconstmasktask =
GETPOST(
'maskconsttask',
'aZ09');
91 $masktaskt =
GETPOST(
'masktask',
'alpha');
93 if ($maskconstmasktask && preg_match(
'/_MASK$/', $maskconstmasktask)) {
106} elseif ($action ==
'specimen') {
107 $modele =
GETPOST(
'module',
'alpha');
110 $project->initAsSpecimen();
115 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
116 foreach ($dirmodels as $reldir) {
117 $file =
dol_buildpath($reldir.
"core/modules/project/doc/pdf_".$modele.
".modules.php", 0);
118 if (file_exists($file)) {
119 $classname =
"pdf_".$modele;
124 if ($classname !==
'') {
127 $module =
new $classname($db);
128 '@phan-var-force ModelePDFProjects $module';
131 if ($module->write_file($project, $langs) > 0) {
132 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=project&file=SPECIMEN.pdf");
140 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
142} elseif ($action ==
'specimentask') {
143 $modele =
GETPOST(
'module',
'alpha');
146 $project->initAsSpecimen();
151 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
152 foreach ($dirmodels as $reldir) {
153 $file =
dol_buildpath($reldir.
"core/modules/project/task/doc/pdf_".$modele.
".modules.php", 0);
154 if (file_exists($file)) {
155 $classname =
"pdf_".$modele;
160 if ($classname !==
'') {
163 $module =
new $classname($db);
164 '@phan-var-force ModelePDFTask $module';
167 if ($module->write_file($project, $langs) > 0) {
168 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=project_task&file=SPECIMEN.pdf");
176 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
178} elseif ($action ==
'set') {
181} elseif ($action ==
'settask') {
184} elseif ($action ==
'del') {
191} elseif ($action ==
'deltask') {
198} elseif ($action ==
'setdoc') {
207} elseif ($action ==
'setdoctask') {
211 $conf->global->PROJECT_TASK_ADDON_PDF = $value;
219} elseif ($action ==
'setmod') {
224} elseif ($action ==
'setmodtask') {
229} elseif ($action ==
'updateoptions') {
230 if (
GETPOST(
'PROJECT_USE_SEARCH_TO_SELECT')) {
231 $companysearch =
GETPOST(
'activate_PROJECT_USE_SEARCH_TO_SELECT',
'alpha');
233 $conf->global->PROJECT_USE_SEARCH_TO_SELECT = $companysearch;
236 if (
GETPOST(
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) {
237 $projectToSelect =
GETPOST(
'projectToSelect',
'alpha');
238 dolibarr_set_const($db,
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY', $projectToSelect,
'chaine', 0,
'',
$conf->entity);
240 if (
GETPOST(
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')) {
241 $timesheetFreezeDuration =
GETPOST(
'timesheetFreezeDuration',
'alpha');
242 dolibarr_set_const($db,
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS', intval($timesheetFreezeDuration),
'chaine', 0,
'',
$conf->entity);
244} elseif (preg_match(
'/^(set|del)_?([A-Z_]+)$/', $action, $reg)) {
255$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
257llxHeader(
"", $langs->trans(
"ProjectsSetup"),
'',
'', 0, 0,
'',
'',
'',
'mod-project page-admin');
259$form =
new Form($db);
261$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
262print
load_fiche_titre($langs->trans(
"ProjectsSetup"), $linkback,
'title_setup');
271$form =
new Form($db);
273print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
274print
'<input type="hidden" name="token" value="'.newToken().
'">';
275print
'<input type="hidden" name="action" value="setmainoptions">';
277print
'<table class="noborder centpercent">';
278print
'<tr class="liste_titre">';
279print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
280print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
281print
'<td width="80"> </td></tr>'.
"\n";
283print
'<tr class="oddeven">';
284print
'<td width="80%">'.$langs->trans(
"ManageOpportunitiesStatus").
'</td>';
285print
'<td width="60" class="right">';
286print ajax_constantonoff(
"PROJECT_USE_OPPORTUNITIES", array(),
null, 0, 0, 1);
287print
'</td><td class="right">';
292print
'<tr class="oddeven">';
293print
'<td width="80%">'.$langs->trans(
"ManageTasks").
'</td>';
294print
'<td width="60" class="right">';
295print ajax_constantonoff(
"PROJECT_HIDE_TASKS", array(),
null, 1);
296print
'</td><td class="right">';
300print
'</table></form>';
312print
'<div class="div-table-responsive-no-min">';
313print
'<table class="noborder centpercent">';
314print
'<tr class="liste_titre">';
315print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
316print
'<td>'.$langs->trans(
"Description").
'</td>';
317print
'<td>'.$langs->trans(
"Example").
'</td>';
318print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
319print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
324foreach ($dirmodels as $reldir) {
328 $handle = opendir($dir);
329 if (is_resource($handle)) {
330 while (($file = readdir($handle)) !==
false) {
331 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
333 $classname = substr($file, 4);
335 require_once $dir.$file.
'.php';
337 $module =
new $file();
338 '@phan-var-force ModeleNumRefProjects $module';
341 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
344 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
348 if ($module->isEnabled()) {
349 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
350 print $module->info($langs);
354 print
'<td class="nowrap">';
355 $tmp = $module->getExample();
356 if (preg_match(
'/^Error/', $tmp)) {
357 $langs->load(
"errors");
358 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
359 } elseif ($tmp ==
'NotConfigured') {
360 print $langs->trans($tmp);
366 print
'<td class="center">';
368 print
img_picto($langs->trans(
"Activated"),
'switch_on');
370 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>';
375 $project->initAsSpecimen();
379 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
380 $nextval = $module->getNextValue($mysoc, $project);
381 if ((
string) $nextval != $langs->trans(
"NotAvailable")) {
382 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
384 $htmltooltip .= $nextval.
'<br>';
386 $htmltooltip .= $langs->trans($module->error).
'<br>';
390 print
'<td class="center">';
391 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
411 print
'<div class="div-table-responsive-no-min">';
412 print
'<table class="noborder centpercent">';
413 print
'<tr class="liste_titre">';
414 print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
415 print
'<td>'.$langs->trans(
"Description").
'</td>';
416 print
'<td>'.$langs->trans(
"Example").
'</td>';
417 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
418 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
423 foreach ($dirmodels as $reldir) {
427 $handle = opendir($dir);
428 if (is_resource($handle)) {
429 while (($file = readdir($handle)) !==
false) {
430 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
432 $classname = substr($file, 4);
434 require_once $dir.$file.
'.php';
436 $module =
new $file();
437 '@phan-var-force ModeleNumRefTask $module';
441 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
444 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
448 if ($module->isEnabled()) {
449 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
450 print $module->info($langs);
454 print
'<td class="nowrap">';
455 $tmp = $module->getExample();
456 if (preg_match(
'/^Error/', $tmp)) {
457 $langs->load(
"errors");
458 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
459 } elseif ($tmp ==
'NotConfigured') {
460 print $langs->trans($tmp);
466 print
'<td class="center">';
467 if (
$conf->global->PROJECT_TASK_ADDON ==
'mod_'.$classname) {
468 print
img_picto($langs->trans(
"Activated"),
'switch_on');
470 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>';
475 $project->initAsSpecimen();
479 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
480 $nextval = $module->getNextValue($mysoc, $project);
481 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
482 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
484 $htmltooltip .= $nextval.
'<br>';
486 $htmltooltip .= $langs->trans($module->error).
'<br>';
490 print
'<td class="center">';
491 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
520$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
521$sql .=
" WHERE type = '".$db->escape($type).
"'";
522$sql .=
" AND entity = ".$conf->entity;
524$resql = $db->query($sql);
527 $num_rows = $db->num_rows($resql);
528 while ($i < $num_rows) {
529 $array = $db->fetch_array($resql);
530 if (is_array($array)) {
531 array_push($def, $array[0]);
539print
'<div class="div-table-responsive-no-min">';
540print
'<table class="noborder" width="100%">'.
"\n";
541print
'<tr class="liste_titre">'.
"\n";
542print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
543print
" <td>".$langs->trans(
"Description").
"</td>\n";
544print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
545print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
546print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
547print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
553foreach ($dirmodels as $reldir) {
554 foreach (array(
'',
'/doc') as $valdir) {
555 $dir =
dol_buildpath($reldir.
"core/modules/project/".$valdir);
558 $handle = opendir($dir);
559 if (is_resource($handle)) {
560 while (($file = readdir($handle)) !==
false) {
566 foreach ($filelist as $file) {
567 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
568 if (file_exists($dir.
'/'.$file)) {
569 $name = substr($file, 4,
dol_strlen($file) - 16);
570 $classname = substr($file, 0,
dol_strlen($file) - 12);
572 require_once $dir.
'/'.$file;
573 $module =
new $classname($db);
574 '@phan-var-force ModelePDFProjects $module';
576 $modulequalified = 1;
577 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
578 $modulequalified = 0;
580 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
581 $modulequalified = 0;
584 if ($modulequalified) {
585 print
'<tr class="oddeven"><td width="100">';
586 print(empty($module->name) ? $name : $module->
name);
588 if (method_exists($module,
'info')) {
589 print $module->info($langs);
591 print $module->description;
596 if (in_array($name, $def)) {
597 print
"<td class=\"center\">\n";
598 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
599 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
603 print
"<td class=\"center\">\n";
604 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>';
609 print
"<td class=\"center\">";
611 print
img_picto($langs->trans(
"Default"),
'on');
613 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>';
618 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
619 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
620 if ($module->type ==
'pdf') {
621 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
623 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
624 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
626 print
'<td class="center">';
627 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
631 print
'<td class="center">';
632 if ($module->type ==
'pdf') {
633 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
635 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
663 $type =
'project_task';
667 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
668 $sql .=
" WHERE type = '".$db->escape($type).
"'";
669 $sql .=
" AND entity = ".$conf->entity;
671 $resql = $db->query($sql);
674 $num_rows = $db->num_rows($resql);
675 while ($i < $num_rows) {
676 $array = $db->fetch_array($resql);
677 if (is_array($array)) {
678 array_push($def, $array[0]);
686 print
'<div class="div-table-responsive-no-min">';
687 print
'<table class="noborder" width="100%">'.
"\n";
688 print
'<tr class="liste_titre">'.
"\n";
689 print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
690 print
" <td>".$langs->trans(
"Description").
"</td>\n";
691 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
692 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
693 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
694 print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
699 foreach ($dirmodels as $reldir) {
700 foreach (array(
'',
'/doc') as $valdir) {
701 $dir =
dol_buildpath($reldir.
"core/modules/project/task/".$valdir);
704 $handle = opendir($dir);
705 if (is_resource($handle)) {
706 while (($file = readdir($handle)) !==
false) {
712 foreach ($filelist as $file) {
713 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
714 if (file_exists($dir.
'/'.$file)) {
715 $name = substr($file, 4,
dol_strlen($file) - 16);
716 $classname = substr($file, 0,
dol_strlen($file) - 12);
718 require_once $dir.
'/'.$file;
719 $module =
new $classname($db);
720 '@phan-var-force ModelePDFTask $module';
722 $modulequalified = 1;
723 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
724 $modulequalified = 0;
726 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
727 $modulequalified = 0;
730 if ($modulequalified) {
731 print
'<tr class="oddeven"><td width="100">';
732 print(empty($module->name) ? $name : $module->
name);
734 if (method_exists($module,
'info')) {
735 print $module->info($langs);
737 print $module->description;
742 if (in_array($name, $def)) {
743 print
'<td class="center">'.
"\n";
744 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=deltask&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
745 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
749 print
'<td class="center">'.
"\n";
750 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>';
755 print
'<td class="center">';
756 if (
$conf->global->PROJECT_TASK_ADDON_PDF ==
"$name") {
757 print
img_picto($langs->trans(
"Default"),
'on');
759 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>';
764 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
765 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
766 if ($module->type ==
'pdf') {
767 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
769 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
770 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
772 print
'<td class="center">';
773 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
777 print
'<td class="center">';
778 if ($module->type ==
'pdf') {
779 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimentask&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
781 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
803$form =
new Form($db);
805print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
806print
'<input type="hidden" name="token" value="'.newToken().
'">';
807print
'<input type="hidden" name="action" value="updateoptions">';
808print
'<input type="hidden" name="page_y" value="">';
810print
'<div class="div-table-responsive-no-min">';
811print
'<table class="noborder centpercent">';
812print
'<tr class="liste_titre">';
813print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
814print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
815print
'<td width="80"> </td></tr>'.
"\n";
817print
'<tr class="oddeven">';
818print
'<td width="80%">'.$langs->trans(
"UseSearchToSelectProject").
'</td>';
819if (!
$conf->use_javascript_ajax) {
820 print
'<td class="nowrap right" colspan="2">';
821 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
824 print
'<td width="60" class="right">';
825 $arrval = array(
'0' => $langs->trans(
"No"),
826 '1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
827 '2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
828 '3' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
830 print $form->selectarray(
"activate_PROJECT_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
"PROJECT_USE_SEARCH_TO_SELECT"));
831 print
'</td><td class="right">';
832 print
'<input type="submit" class="button small reposition" name="PROJECT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
837print
'<tr class="oddeven">';
838print
'<td>'.$langs->trans(
"AllowToSelectProjectFromOtherCompany").
'</td>';
840print
'<td class="right" width="60" colspan="2">';
841print
'<input type="text" id="projectToSelect" name="projectToSelect" value="' .
getDolGlobalString(
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY').
'"/> ';
842print $form->textwithpicto(
'', $langs->trans(
'AllowToLinkFromOtherCompany'));
843print
'<input type="submit" class="button small reposition" name="PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY" value="'.$langs->trans(
"Modify").
'">';
847$key =
'PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE';
848echo
'<tr class="oddeven">',
850$form->textwithpicto($langs->transnoentities($key), $langs->transnoentities($key .
'_help')),
852'<td class="right" colspan="2">',
853ajax_constantonoff($key),
857print
'<tr class="oddeven">';
858print
'<td>'.$langs->trans(
"TimesheetPreventAfterFollowingMonths").
'</td>';
860print
'<td class="right" width="60" colspan="2">';
861print
'<input type="number" class="width50" id="timesheetFreezeDuration" name="timesheetFreezeDuration" min="0" step="1" value="' .
getDolGlobalString(
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS').
'"/> ';
862print
'<input type="submit" class="button small reposition" name="PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS" value="'.$langs->trans(
"Modify").
'">';
866print
'<tr class="oddeven">';
867print
'<td class="left">';
868print $form->textwithpicto($langs->transnoentities(
'PROJECT_DISPLAY_LINKED_BY_CONTACT'), $langs->transnoentities(
'PROJECT_DISPLAY_LINKED_BY_CONTACT_help'));
870print
'<td class="right" colspan="2">';
871print ajax_constantonoff(
'PROJECT_DISPLAY_LINKED_BY_CONTACT');
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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage projects.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
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)
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)
Show tabs of a record.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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...
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
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.