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';
40$langs->loadLangs(array(
'admin',
'errors',
'other',
'projects'));
46$action =
GETPOST(
'action',
'aZ09');
47$modulepart =
GETPOST(
'modulepart',
'aZ09');
49$value =
GETPOST(
'value',
'alpha');
50$label =
GETPOST(
'label',
'alpha');
51$scandir =
GETPOST(
'scan_dir',
'alpha');
59include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
61if ($action ==
'updateMask') {
62 $maskconstproject =
GETPOST(
'maskconstproject',
'aZ09');
63 $maskproject =
GETPOST(
'maskproject',
'alpha');
65 if ($maskconstproject && preg_match(
'/_MASK$/', $maskconstproject)) {
66 $res =
dolibarr_set_const($db, $maskconstproject, $maskproject,
'chaine', 0,
'', $conf->entity);
80if ($action ==
'updateMaskTask') {
81 $maskconstmasktask =
GETPOST(
'maskconsttask',
'aZ09');
82 $masktaskt =
GETPOST(
'masktask',
'alpha');
84 if ($maskconstmasktask && preg_match(
'/_MASK$/', $maskconstmasktask)) {
85 $res =
dolibarr_set_const($db, $maskconstmasktask, $masktaskt,
'chaine', 0,
'', $conf->entity);
97} elseif ($action ==
'specimen') {
98 $modele =
GETPOST(
'module',
'alpha');
101 $project->initAsSpecimen();
106 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
107 foreach ($dirmodels as $reldir) {
108 $file =
dol_buildpath($reldir.
"core/modules/project/doc/pdf_".$modele.
".modules.php", 0);
109 if (file_exists($file)) {
110 $classname =
"pdf_".$modele;
115 if ($classname !==
'') {
118 $module =
new $classname($db);
120 '@phan-var-force ModelePDFProjects $module';
122 if ($module->write_file($project, $langs) > 0) {
123 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=project&file=SPECIMEN.pdf");
131 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
133} elseif ($action ==
'specimentask') {
134 $modele =
GETPOST(
'module',
'alpha');
137 $project->initAsSpecimen();
142 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
143 foreach ($dirmodels as $reldir) {
144 $file =
dol_buildpath($reldir.
"core/modules/project/task/doc/pdf_".$modele.
".modules.php", 0);
145 if (file_exists($file)) {
146 $classname =
"pdf_".$modele;
151 if ($classname !==
'') {
154 $module =
new $classname($db);
156 '@phan-var-force ModelePDFTask $module';
158 if ($module->write_file($project, $langs) > 0) {
159 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=project_task&file=SPECIMEN.pdf");
167 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
169} elseif ($action ==
'set') {
172} elseif ($action ==
'settask') {
175} elseif ($action ==
'del') {
182} elseif ($action ==
'deltask') {
189} elseif ($action ==
'setdoc') {
198} elseif ($action ==
'setdoctask') {
199 if (
dolibarr_set_const($db,
"PROJECT_TASK_ADDON_PDF", $value,
'chaine', 0,
'', $conf->entity)) {
202 $conf->global->PROJECT_TASK_ADDON_PDF = $value;
210} elseif ($action ==
'setmod') {
215} elseif ($action ==
'setmodtask') {
219 dolibarr_set_const($db,
"PROJECT_TASK_ADDON", $value,
'chaine', 0,
'', $conf->entity);
220} elseif ($action ==
'updateoptions') {
221 if (
GETPOST(
'PROJECT_USE_SEARCH_TO_SELECT')) {
222 $companysearch =
GETPOST(
'activate_PROJECT_USE_SEARCH_TO_SELECT',
'alpha');
223 if (
dolibarr_set_const($db,
"PROJECT_USE_SEARCH_TO_SELECT", $companysearch,
'chaine', 0,
'', $conf->entity)) {
224 $conf->global->PROJECT_USE_SEARCH_TO_SELECT = $companysearch;
227 if (
GETPOST(
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) {
228 $projectToSelect =
GETPOST(
'projectToSelect',
'alpha');
229 dolibarr_set_const($db,
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY', $projectToSelect,
'chaine', 0,
'', $conf->entity);
231 if (
GETPOST(
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')) {
232 $timesheetFreezeDuration =
GETPOST(
'timesheetFreezeDuration',
'alpha');
233 dolibarr_set_const($db,
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS', intval($timesheetFreezeDuration),
'chaine', 0,
'', $conf->entity);
235} elseif (preg_match(
'/^(set|del)_?([A-Z_]+)$/', $action, $reg)) {
237 if (!
dolibarr_set_const($db, $reg[2], ($reg[1] ===
'set' ?
'1' :
'0'),
'chaine', 0,
'', $conf->entity) > 0) {
246$dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
248llxHeader(
"", $langs->trans(
"ProjectsSetup"),
'',
'', 0, 0,
'',
'',
'',
'mod-project page-admin');
250$form =
new Form($db);
252$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
253print
load_fiche_titre($langs->trans(
"ProjectsSetup"), $linkback,
'title_setup');
262$form =
new Form($db);
264print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
265print
'<input type="hidden" name="token" value="'.newToken().
'">';
266print
'<input type="hidden" name="action" value="setmainoptions">';
268print
'<table class="noborder centpercent">';
269print
'<tr class="liste_titre">';
270print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
271print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
272print
'<td width="80"> </td></tr>'.
"\n";
274print
'<tr class="oddeven">';
275print
'<td width="80%">'.$langs->trans(
"ManageOpportunitiesStatus").
'</td>';
276print
'<td width="60" class="right">';
277print ajax_constantonoff(
"PROJECT_USE_OPPORTUNITIES", array(),
null, 0, 0, 1);
278print
'</td><td class="right">';
283print
'<tr class="oddeven">';
284print
'<td width="80%">'.$langs->trans(
"ManageTasks").
'</td>';
285print
'<td width="60" class="right">';
286print ajax_constantonoff(
"PROJECT_HIDE_TASKS", array(),
null, 1);
287print
'</td><td class="right">';
291print
'</table></form>';
303print
'<div class="div-table-responsive-no-min">';
304print
'<table class="noborder centpercent">';
305print
'<tr class="liste_titre">';
306print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
307print
'<td>'.$langs->trans(
"Description").
'</td>';
308print
'<td>'.$langs->trans(
"Example").
'</td>';
309print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
310print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
315foreach ($dirmodels as $reldir) {
319 $handle = opendir($dir);
320 if (is_resource($handle)) {
321 while (($file = readdir($handle)) !==
false) {
322 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
324 $classname = substr($file, 4);
326 require_once $dir.$file.
'.php';
328 $module =
new $file();
329 '@phan-var-force ModeleNumRefProjects $module';
332 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
335 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
339 if ($module->isEnabled()) {
340 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
341 print $module->info($langs);
345 print
'<td class="nowrap">';
346 $tmp = $module->getExample();
347 if (preg_match(
'/^Error/', $tmp)) {
348 $langs->load(
"errors");
349 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
350 } elseif ($tmp ==
'NotConfigured') {
351 print $langs->trans($tmp);
357 print
'<td class="center">';
359 print
img_picto($langs->trans(
"Activated"),
'switch_on');
361 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>';
366 $project->initAsSpecimen();
370 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
371 $nextval = $module->getNextValue($mysoc, $project);
372 if ((
string) $nextval != $langs->trans(
"NotAvailable")) {
373 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
375 $htmltooltip .= $nextval.
'<br>';
377 $htmltooltip .= $langs->trans($module->error).
'<br>';
381 print
'<td class="center">';
382 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
402 print
'<div class="div-table-responsive-no-min">';
403 print
'<table class="noborder centpercent">';
404 print
'<tr class="liste_titre">';
405 print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
406 print
'<td>'.$langs->trans(
"Description").
'</td>';
407 print
'<td>'.$langs->trans(
"Example").
'</td>';
408 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
409 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
414 foreach ($dirmodels as $reldir) {
418 $handle = opendir($dir);
419 if (is_resource($handle)) {
420 while (($file = readdir($handle)) !==
false) {
421 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
423 $classname = substr($file, 4);
425 require_once $dir.$file.
'.php';
427 $module =
new $file();
428 '@phan-var-force ModeleNumRefTask $module';
431 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
434 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
438 if ($module->isEnabled()) {
439 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
440 print $module->info($langs);
444 print
'<td class="nowrap">';
445 $tmp = $module->getExample();
446 if (preg_match(
'/^Error/', $tmp)) {
447 $langs->load(
"errors");
448 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
449 } elseif ($tmp ==
'NotConfigured') {
450 print $langs->trans($tmp);
456 print
'<td class="center">';
457 if ($conf->global->PROJECT_TASK_ADDON ==
'mod_'.$classname) {
458 print
img_picto($langs->trans(
"Activated"),
'switch_on');
460 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>';
465 $project->initAsSpecimen();
469 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
470 $nextval = $module->getNextValue($mysoc, $project);
471 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
472 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
474 $htmltooltip .= $nextval.
'<br>';
476 $htmltooltip .= $langs->trans($module->error).
'<br>';
480 print
'<td class="center">';
481 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
510$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
511$sql .=
" WHERE type = '".$db->escape($type).
"'";
512$sql .=
" AND entity = ".$conf->entity;
514$resql = $db->query($sql);
517 $num_rows = $db->num_rows($resql);
518 while ($i < $num_rows) {
519 $array = $db->fetch_array($resql);
520 if (is_array($array)) {
521 array_push($def, $array[0]);
529print
'<div class="div-table-responsive-no-min">';
530print
'<table class="noborder" width="100%">'.
"\n";
531print
'<tr class="liste_titre">'.
"\n";
532print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
533print
" <td>".$langs->trans(
"Description").
"</td>\n";
534print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
535print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
536print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
537print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
543foreach ($dirmodels as $reldir) {
544 foreach (array(
'',
'/doc') as $valdir) {
545 $dir =
dol_buildpath($reldir.
"core/modules/project/".$valdir);
548 $handle = opendir($dir);
549 if (is_resource($handle)) {
550 while (($file = readdir($handle)) !==
false) {
556 foreach ($filelist as $file) {
557 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
558 if (file_exists($dir.
'/'.$file)) {
559 $name = substr($file, 4,
dol_strlen($file) - 16);
560 $classname = substr($file, 0,
dol_strlen($file) - 12);
562 require_once $dir.
'/'.$file;
563 $module =
new $classname($db);
565 $modulequalified = 1;
566 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
567 $modulequalified = 0;
569 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
570 $modulequalified = 0;
573 if ($modulequalified) {
574 print
'<tr class="oddeven"><td width="100">';
575 print(empty($module->name) ? $name : $module->
name);
577 if (method_exists($module,
'info')) {
578 print $module->info($langs);
580 print $module->description;
585 if (in_array($name, $def)) {
586 print
"<td class=\"center\">\n";
587 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
588 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
592 print
"<td class=\"center\">\n";
593 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>';
598 print
"<td class=\"center\">";
600 print
img_picto($langs->trans(
"Default"),
'on');
602 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>';
607 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
608 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
609 if ($module->type ==
'pdf') {
610 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
612 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
613 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
615 print
'<td class="center">';
616 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
620 print
'<td class="center">';
621 if ($module->type ==
'pdf') {
622 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
624 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
652 $type =
'project_task';
656 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
657 $sql .=
" WHERE type = '".$db->escape($type).
"'";
658 $sql .=
" AND entity = ".$conf->entity;
660 $resql = $db->query($sql);
663 $num_rows = $db->num_rows($resql);
664 while ($i < $num_rows) {
665 $array = $db->fetch_array($resql);
666 if (is_array($array)) {
667 array_push($def, $array[0]);
675 print
'<div class="div-table-responsive-no-min">';
676 print
'<table class="noborder" width="100%">'.
"\n";
677 print
'<tr class="liste_titre">'.
"\n";
678 print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
679 print
" <td>".$langs->trans(
"Description").
"</td>\n";
680 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
681 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
682 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
683 print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
688 foreach ($dirmodels as $reldir) {
689 foreach (array(
'',
'/doc') as $valdir) {
690 $dir =
dol_buildpath($reldir.
"core/modules/project/task/".$valdir);
693 $handle = opendir($dir);
694 if (is_resource($handle)) {
695 while (($file = readdir($handle)) !==
false) {
701 foreach ($filelist as $file) {
702 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
703 if (file_exists($dir.
'/'.$file)) {
704 $name = substr($file, 4,
dol_strlen($file) - 16);
705 $classname = substr($file, 0,
dol_strlen($file) - 12);
707 require_once $dir.
'/'.$file;
708 $module =
new $classname($db);
710 $modulequalified = 1;
711 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
712 $modulequalified = 0;
714 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
715 $modulequalified = 0;
718 if ($modulequalified) {
719 print
'<tr class="oddeven"><td width="100">';
720 print(empty($module->name) ? $name : $module->
name);
722 if (method_exists($module,
'info')) {
723 print $module->info($langs);
725 print $module->description;
730 if (in_array($name, $def)) {
731 print
'<td class="center">'.
"\n";
732 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=deltask&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
733 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
737 print
'<td class="center">'.
"\n";
738 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>';
743 print
'<td class="center">';
744 if ($conf->global->PROJECT_TASK_ADDON_PDF ==
"$name") {
745 print
img_picto($langs->trans(
"Default"),
'on');
747 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>';
752 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
753 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
754 if ($module->type ==
'pdf') {
755 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
757 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
758 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
760 print
'<td class="center">';
761 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
765 print
'<td class="center">';
766 if ($module->type ==
'pdf') {
767 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimentask&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
769 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
791$form =
new Form($db);
793print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
794print
'<input type="hidden" name="token" value="'.newToken().
'">';
795print
'<input type="hidden" name="action" value="updateoptions">';
796print
'<input type="hidden" name="page_y" value="">';
798print
'<div class="div-table-responsive-no-min">';
799print
'<table class="noborder centpercent">';
800print
'<tr class="liste_titre">';
801print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
802print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
803print
'<td width="80"> </td></tr>'.
"\n";
805print
'<tr class="oddeven">';
806print
'<td width="80%">'.$langs->trans(
"UseSearchToSelectProject").
'</td>';
807if (!$conf->use_javascript_ajax) {
808 print
'<td class="nowrap right" colspan="2">';
809 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
812 print
'<td width="60" class="right">';
813 $arrval = array(
'0' => $langs->trans(
"No"),
814 '1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
815 '2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
816 '3' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
818 print $form->selectarray(
"activate_PROJECT_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
"PROJECT_USE_SEARCH_TO_SELECT"));
819 print
'</td><td class="right">';
820 print
'<input type="submit" class="button small reposition" name="PROJECT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
825print
'<tr class="oddeven">';
826print
'<td>'.$langs->trans(
"AllowToSelectProjectFromOtherCompany").
'</td>';
828print
'<td class="right" width="60" colspan="2">';
829print
'<input type="text" id="projectToSelect" name="projectToSelect" value="' .
getDolGlobalString(
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY').
'"/> ';
830print $form->textwithpicto(
'', $langs->trans(
'AllowToLinkFromOtherCompany'));
831print
'<input type="submit" class="button small reposition" name="PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY" value="'.$langs->trans(
"Modify").
'">';
835$key =
'PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE';
836echo
'<tr class="oddeven">',
838$form->textwithpicto($langs->transnoentities($key), $langs->transnoentities($key .
'_help')),
840'<td class="right" colspan="2">',
841ajax_constantonoff($key),
845print
'<tr class="oddeven">';
846print
'<td>'.$langs->trans(
"TimesheetPreventAfterFollowingMonths").
'</td>';
848print
'<td class="right" width="60" colspan="2">';
849print
'<input type="number" class="width50" id="timesheetFreezeDuration" name="timesheetFreezeDuration" min="0" step="1" value="' .
getDolGlobalString(
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS').
'"/> ';
850print
'<input type="submit" class="button small reposition" name="PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS" value="'.$langs->trans(
"Modify").
'">';
854print
'<tr class="oddeven">';
855print
'<td class="left">';
856print $form->textwithpicto($langs->transnoentities(
'PROJECT_DISPLAY_LINKED_BY_CONTACT'), $langs->transnoentities(
'PROJECT_DISPLAY_LINKED_BY_CONTACT_help'));
858print
'<td class="right" colspan="2">';
859print 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)
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_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'.
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.
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.