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 ==
'unsetdoc') {
210} elseif ($action ==
'setdoctask') {
214 $conf->global->PROJECT_TASK_ADDON_PDF = $value;
222} elseif ($action ==
'unsetdoctask') {
225} elseif ($action ==
'setmod') {
230} elseif ($action ==
'setmodtask') {
235} elseif ($action ==
'updateoptions') {
236 if (
GETPOST(
'PROJECT_USE_SEARCH_TO_SELECT')) {
237 $companysearch =
GETPOST(
'activate_PROJECT_USE_SEARCH_TO_SELECT',
'alpha');
239 $conf->global->PROJECT_USE_SEARCH_TO_SELECT = $companysearch;
242 if (
GETPOST(
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) {
243 $projectToSelect =
GETPOST(
'projectToSelect',
'alpha');
244 dolibarr_set_const($db,
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY', $projectToSelect,
'chaine', 0,
'',
$conf->entity);
246 if (
GETPOST(
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')) {
247 $timesheetFreezeDuration =
GETPOST(
'timesheetFreezeDuration',
'alpha');
248 dolibarr_set_const($db,
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS', intval($timesheetFreezeDuration),
'chaine', 0,
'',
$conf->entity);
250} elseif (preg_match(
'/^(set|del)_?([A-Z_]+)$/', $action, $reg)) {
261$form =
new Form($db);
263$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
265llxHeader(
"", $langs->trans(
"ProjectsSetup"),
'',
'', 0, 0,
'',
'',
'',
'mod-project page-admin');
267$form =
new Form($db);
269$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
270print
load_fiche_titre($langs->trans(
"ProjectsSetup"), $linkback,
'title_setup');
280print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
281print
'<input type="hidden" name="token" value="'.newToken().
'">';
282print
'<input type="hidden" name="action" value="setmainoptions">';
284print
'<table class="noborder centpercent">';
285print
'<tr class="liste_titre">';
286print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
287print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
288print
'<td width="80"> </td></tr>'.
"\n";
290print
'<tr class="oddeven">';
291print
'<td width="80%">'.$langs->trans(
"ManageOpportunitiesStatus").
'</td>';
292print
'<td width="60" class="right">';
293print ajax_constantonoff(
"PROJECT_USE_OPPORTUNITIES", array(),
null, 0, 0, 1);
294print
'</td><td class="right">';
299print
'<tr class="oddeven">';
300print
'<td width="80%">'.$langs->trans(
"ManageTasks").
'</td>';
301print
'<td width="60" class="right">';
302print ajax_constantonoff(
"PROJECT_HIDE_TASKS", array(),
null, 1);
303print
'</td><td class="right">';
307print
'</table></form>';
319print
'<div class="div-table-responsive-no-min">';
320print
'<table class="noborder centpercent">';
321print
'<tr class="liste_titre">';
322print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
323print
'<td>'.$langs->trans(
"Description").
'</td>';
324print
'<td>'.$langs->trans(
"Example").
'</td>';
325print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
326print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
331foreach ($dirmodels as $reldir) {
335 $handle = opendir($dir);
336 if (is_resource($handle)) {
337 while (($file = readdir($handle)) !==
false) {
338 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
340 $classname = substr($file, 4);
342 require_once $dir.$file.
'.php';
344 $module =
new $file();
345 '@phan-var-force ModeleNumRefProjects $module';
348 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
351 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
355 if ($module->isEnabled()) {
356 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
357 print $module->info($langs);
361 print
'<td class="nowrap">';
362 $tmp = $module->getExample();
363 if (preg_match(
'/^Error/', $tmp)) {
364 $langs->load(
"errors");
365 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
366 } elseif ($tmp ==
'NotConfigured') {
367 print $langs->trans($tmp);
373 print
'<td class="center">';
375 print
img_picto($langs->trans(
"Activated"),
'switch_on');
377 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>';
382 $project->initAsSpecimen();
386 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
387 $nextval = $module->getNextValue($mysoc, $project);
388 if ((
string) $nextval != $langs->trans(
"NotAvailable")) {
389 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
391 $htmltooltip .= $nextval.
'<br>';
393 $htmltooltip .= $langs->trans($module->error).
'<br>';
397 print
'<td class="center">';
398 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
418 print
'<div class="div-table-responsive-no-min">';
419 print
'<table class="noborder centpercent">';
420 print
'<tr class="liste_titre">';
421 print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
422 print
'<td>'.$langs->trans(
"Description").
'</td>';
423 print
'<td>'.$langs->trans(
"Example").
'</td>';
424 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
425 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
430 foreach ($dirmodels as $reldir) {
434 $handle = opendir($dir);
435 if (is_resource($handle)) {
436 while (($file = readdir($handle)) !==
false) {
437 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
439 $classname = substr($file, 4);
441 require_once $dir.$file.
'.php';
443 $module =
new $file();
444 '@phan-var-force ModeleNumRefTask $module';
448 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
451 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
455 if ($module->isEnabled()) {
456 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
457 print $module->info($langs);
461 print
'<td class="nowrap">';
462 $tmp = $module->getExample();
463 if (preg_match(
'/^Error/', $tmp)) {
464 $langs->load(
"errors");
465 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
466 } elseif ($tmp ==
'NotConfigured') {
467 print $langs->trans($tmp);
473 print
'<td class="center">';
475 print
img_picto($langs->trans(
"Activated"),
'switch_on');
477 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>';
482 $project->initAsSpecimen();
486 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
487 $nextval = $module->getNextValue($mysoc, $project);
488 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
489 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
491 $htmltooltip .= $nextval.
'<br>';
493 $htmltooltip .= $langs->trans($module->error).
'<br>';
497 print
'<td class="center">';
498 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
527$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
528$sql .=
" WHERE type = '".$db->escape($type).
"'";
529$sql .=
" AND entity = ".$conf->entity;
531$resql = $db->query($sql);
534 $num_rows = $db->num_rows($resql);
535 while ($i < $num_rows) {
536 $array = $db->fetch_array($resql);
537 if (is_array($array)) {
538 array_push($def, $array[0]);
546print
'<div class="div-table-responsive-no-min">';
547print
'<table class="noborder" width="100%">'.
"\n";
548print
'<tr class="liste_titre">'.
"\n";
549print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
550print
" <td>".$langs->trans(
"Description").
"</td>\n";
551print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
552print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
553print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
554print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
560foreach ($dirmodels as $reldir) {
561 foreach (array(
'',
'/doc') as $valdir) {
562 $dir =
dol_buildpath($reldir.
"core/modules/project/".$valdir);
565 $handle = opendir($dir);
566 if (is_resource($handle)) {
567 while (($file = readdir($handle)) !==
false) {
573 foreach ($filelist as $file) {
574 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
575 if (file_exists($dir.
'/'.$file)) {
576 $name = substr($file, 4,
dol_strlen($file) - 16);
577 $classname = substr($file, 0,
dol_strlen($file) - 12);
579 require_once $dir.
'/'.$file;
580 $module =
new $classname($db);
581 '@phan-var-force ModelePDFProjects $module';
583 $modulequalified = 1;
584 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
585 $modulequalified = 0;
587 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
588 $modulequalified = 0;
591 if ($modulequalified) {
592 print
'<tr class="oddeven"><td width="100">';
593 print(empty($module->name) ? $name : $module->
name);
595 if (method_exists($module,
'info')) {
596 print $module->info($langs);
598 print $module->description;
603 if (in_array($name, $def)) {
604 print
'<td class="center">'.
"\n";
605 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
606 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
610 print
'<td class="center">'.
"\n";
611 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
612 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
618 print
'<td class="center">';
620 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>';
623 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>';
628 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
629 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
630 if ($module->type ==
'pdf') {
631 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
633 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
634 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
636 print
'<td class="center">';
637 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
641 print
'<td class="center">';
642 if ($module->type ==
'pdf') {
643 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
645 print
img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
673 $type =
'project_task';
677 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
678 $sql .=
" WHERE type = '".$db->escape($type).
"'";
679 $sql .=
" AND entity = ".$conf->entity;
681 $resql = $db->query($sql);
684 $num_rows = $db->num_rows($resql);
685 while ($i < $num_rows) {
686 $array = $db->fetch_array($resql);
687 if (is_array($array)) {
688 array_push($def, $array[0]);
696 print
'<div class="div-table-responsive-no-min">';
697 print
'<table class="noborder" width="100%">'.
"\n";
698 print
'<tr class="liste_titre">'.
"\n";
699 print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
700 print
" <td>".$langs->trans(
"Description").
"</td>\n";
701 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
702 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
703 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
704 print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
709 foreach ($dirmodels as $reldir) {
710 foreach (array(
'',
'/doc') as $valdir) {
711 $dir =
dol_buildpath($reldir.
"core/modules/project/task/".$valdir);
714 $handle = opendir($dir);
715 if (is_resource($handle)) {
716 while (($file = readdir($handle)) !==
false) {
722 foreach ($filelist as $file) {
723 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
724 if (file_exists($dir.
'/'.$file)) {
725 $name = substr($file, 4,
dol_strlen($file) - 16);
726 $classname = substr($file, 0,
dol_strlen($file) - 12);
728 require_once $dir.
'/'.$file;
729 $module =
new $classname($db);
730 '@phan-var-force ModelePDFTask $module';
732 $modulequalified = 1;
733 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
734 $modulequalified = 0;
736 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
737 $modulequalified = 0;
740 if ($modulequalified) {
741 print
'<tr class="oddeven"><td width="100">';
742 print(empty($module->name) ? $name : $module->
name);
744 if (method_exists($module,
'info')) {
745 print $module->info($langs);
747 print $module->description;
752 if (in_array($name, $def)) {
753 print
'<td class="center">'.
"\n";
754 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=deltask&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
755 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
759 print
'<td class="center">'.
"\n";
760 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>';
765 print
'<td class="center">';
767 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>';
769 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>';
774 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
775 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
776 if ($module->type ==
'pdf') {
777 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
779 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
780 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
782 print
'<td class="center">';
783 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
787 print
'<td class="center">';
788 if ($module->type ==
'pdf') {
789 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimentask&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
791 print
img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
813$form =
new Form($db);
815print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
816print
'<input type="hidden" name="token" value="'.newToken().
'">';
817print
'<input type="hidden" name="action" value="updateoptions">';
818print
'<input type="hidden" name="page_y" value="">';
820print
'<div class="div-table-responsive-no-min">';
821print
'<table class="noborder centpercent">';
822print
'<tr class="liste_titre">';
823print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
827print
'<tr class="oddeven">';
828print
'<td>'.$langs->trans(
"UseSearchToSelectProject").
'</td>';
829if (!
$conf->use_javascript_ajax) {
830 print
'<td class="nowrap right">';
831 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
834 print
'<td class="right">';
835 $arrval = array(
'0' => $langs->trans(
"No"),
836 '1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
837 '2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
838 '3' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
840 print $form->selectarray(
"activate_PROJECT_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalString(
"PROJECT_USE_SEARCH_TO_SELECT"));
841 print
'<input type="submit" class="button small reposition" name="PROJECT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
846print
'<tr class="oddeven">';
847print
'<td>'.$langs->trans(
"AllowToSelectProjectFromOtherCompany").
'</td>';
848print
'<td class="right">';
849print
'<input type="text" id="projectToSelect" name="projectToSelect" value="' .
getDolGlobalString(
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY').
'"/> ';
850print $form->textwithpicto(
'', $langs->trans(
'AllowToLinkFromOtherCompany'));
851print
'<input type="submit" class="button small reposition" name="PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY" value="'.$langs->trans(
"Modify").
'">';
855$key =
'PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE';
856echo
'<tr class="oddeven">',
858$form->textwithpicto($langs->transnoentities($key), $langs->transnoentities($key .
'_help')),
861ajax_constantonoff($key),
865print
'<tr class="oddeven">';
866print
'<td>'.$langs->trans(
"TimesheetPreventAfterFollowingMonths").
'</td>';
867print
'<td class="right">';
868print
'<input type="number" class="width50" id="timesheetFreezeDuration" name="timesheetFreezeDuration" min="0" step="1" value="' .
getDolGlobalString(
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS').
'"/> ';
869print
'<input type="submit" class="button small reposition" name="PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS" value="'.$langs->trans(
"Modify").
'">';
873print
'<tr class="oddeven">';
874print
'<td class="left">';
875print $form->textwithpicto($langs->transnoentities(
'PROJECT_DISPLAY_LINKED_BY_CONTACT'), $langs->transnoentities(
'PROJECT_DISPLAY_LINKED_BY_CONTACT_help'));
877print
'<td class="right">';
878print 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.
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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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)
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.
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.