Merge pull request #16791 from Robin-Yann/12.0
FIX: fix checkbox displayed according to module project setup parameters - work in progress
This commit is contained in:
commit
d5865dbfcc
@ -550,6 +550,8 @@ if ($action == 'create' && $user->rights->projet->creer)
|
|||||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Label").'</span></td><td><input class="minwidth500" type="text" name="title" value="'.dol_escape_htmltag(GETPOST("title", 'none')).'" autofocus></td></tr>';
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Label").'</span></td><td><input class="minwidth500" type="text" name="title" value="'.dol_escape_htmltag(GETPOST("title", 'none')).'" autofocus></td></tr>';
|
||||||
|
|
||||||
// Usage (opp, task, bill time, ...)
|
// Usage (opp, task, bill time, ...)
|
||||||
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
|
{
|
||||||
print '<tr><td class="tdtop">';
|
print '<tr><td class="tdtop">';
|
||||||
print $langs->trans("Usage");
|
print $langs->trans("Usage");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -594,6 +596,7 @@ if ($action == 'create' && $user->rights->projet->creer)
|
|||||||
print $form->textwithpicto($langs->trans("OrganizeEvent"), $htmltext);*/
|
print $form->textwithpicto($langs->trans("OrganizeEvent"), $htmltext);*/
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
if ($conf->societe->enabled)
|
if ($conf->societe->enabled)
|
||||||
@ -841,13 +844,15 @@ elseif ($object->id > 0)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
|
{
|
||||||
print '<tr><td class="tdtop">';
|
print '<tr><td class="tdtop">';
|
||||||
print $langs->trans("Usage");
|
print $langs->trans("Usage");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" id="usage_opportunity" name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" id="usage_opportunity" name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')) . '"> ';
|
||||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||||
print '<script>';
|
print '<script>';
|
||||||
@ -867,19 +872,20 @@ elseif ($object->id > 0)
|
|||||||
}
|
}
|
||||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')) . '"> ';
|
||||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')) . '"> ';
|
||||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
if ($conf->societe->enabled)
|
if ($conf->societe->enabled)
|
||||||
@ -1014,7 +1020,6 @@ elseif ($object->id > 0)
|
|||||||
|
|
||||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
@ -1022,32 +1027,36 @@ elseif ($object->id > 0)
|
|||||||
print '<table class="border tableforfield" width="100%">';
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
|
{
|
||||||
print '<tr><td class="tdtop">';
|
print '<tr><td class="tdtop">';
|
||||||
print $langs->trans("Usage");
|
print $langs->trans("Usage");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|
||||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')) . '"> ';
|
||||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')) . '"> ';
|
||||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')) . '"> ';
|
||||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
|
|||||||
@ -184,6 +184,8 @@ if ($id > 0 || !empty($ref))
|
|||||||
print '<table class="border tableforfield centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
|
{
|
||||||
print '<tr><td class="tdtop">';
|
print '<tr><td class="tdtop">';
|
||||||
print $langs->trans("Usage");
|
print $langs->trans("Usage");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -202,7 +204,7 @@ if ($id > 0 || !empty($ref))
|
|||||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||||
@ -210,7 +212,7 @@ if ($id > 0 || !empty($ref))
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
if ($object->public) print $langs->trans('SharedProject');
|
if ($object->public) print $langs->trans('SharedProject');
|
||||||
|
|||||||
@ -163,32 +163,35 @@ print '<div class="underbanner clearboth"></div>';
|
|||||||
print '<table class="border tableforfield centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
print '<tr><td class="tdtop">';
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
print $langs->trans("Usage");
|
|
||||||
print '</td>';
|
|
||||||
print '<td>';
|
|
||||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
|
||||||
{
|
{
|
||||||
|
print '<tr><td class="tdtop">';
|
||||||
|
print $langs->trans("Usage");
|
||||||
|
print '</td>';
|
||||||
|
print '<td>';
|
||||||
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||||
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'"> ';
|
||||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
|
|||||||
@ -409,6 +409,8 @@ if ($id > 0 || !empty($ref))
|
|||||||
print '<table class="border tableforfield" width="100%">';
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
|
{
|
||||||
print '<tr><td class="tdtop">';
|
print '<tr><td class="tdtop">';
|
||||||
print $langs->trans("Usage");
|
print $langs->trans("Usage");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -427,7 +429,7 @@ if ($id > 0 || !empty($ref))
|
|||||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||||
@ -435,6 +437,7 @@ if ($id > 0 || !empty($ref))
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
|
|||||||
@ -151,6 +151,8 @@ if ($id > 0 || !empty($ref))
|
|||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
|
{
|
||||||
print '<tr><td class="tdtop">';
|
print '<tr><td class="tdtop">';
|
||||||
print $langs->trans("Usage");
|
print $langs->trans("Usage");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -169,7 +171,7 @@ if ($id > 0 || !empty($ref))
|
|||||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||||
@ -177,6 +179,7 @@ if ($id > 0 || !empty($ref))
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
|
|||||||
@ -223,6 +223,8 @@ if ($id > 0 || !empty($ref))
|
|||||||
print '<table class="border tableforfield centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
|
{
|
||||||
print '<tr><td class="tdtop">';
|
print '<tr><td class="tdtop">';
|
||||||
print $langs->trans("Usage");
|
print $langs->trans("Usage");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -241,7 +243,7 @@ if ($id > 0 || !empty($ref))
|
|||||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||||
@ -249,6 +251,7 @@ if ($id > 0 || !empty($ref))
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
|
|||||||
@ -167,6 +167,8 @@ if ($object->id > 0)
|
|||||||
print '<table class="border tableforfield centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
|
{
|
||||||
print '<tr><td class="tdtop">';
|
print '<tr><td class="tdtop">';
|
||||||
print $langs->trans("Usage");
|
print $langs->trans("Usage");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -185,7 +187,7 @@ if ($object->id > 0)
|
|||||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||||
@ -193,6 +195,7 @@ if ($object->id > 0)
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
|
|||||||
@ -146,6 +146,8 @@ if ($object->id > 0)
|
|||||||
print '<table class="border tableforfield centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
|
{
|
||||||
print '<tr><td class="tdtop">';
|
print '<tr><td class="tdtop">';
|
||||||
print $langs->trans("Usage");
|
print $langs->trans("Usage");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -164,7 +166,7 @@ if ($object->id > 0)
|
|||||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||||
@ -172,6 +174,7 @@ if ($object->id > 0)
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
|
|||||||
@ -261,6 +261,8 @@ if ($id > 0 || !empty($ref))
|
|||||||
print '<table class="border tableforfield centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
|
{
|
||||||
print '<tr><td class="tdtop">';
|
print '<tr><td class="tdtop">';
|
||||||
print $langs->trans("Usage");
|
print $langs->trans("Usage");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -279,7 +281,7 @@ if ($id > 0 || !empty($ref))
|
|||||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||||
@ -287,6 +289,7 @@ if ($id > 0 || !empty($ref))
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
|
|||||||
@ -656,6 +656,8 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
|||||||
print '<table class="border tableforfield centpercent">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
|
{
|
||||||
print '<tr><td class="tdtop">';
|
print '<tr><td class="tdtop">';
|
||||||
print $langs->trans("Usage");
|
print $langs->trans("Usage");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -674,7 +676,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
|||||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||||
{
|
{
|
||||||
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||||
@ -682,6 +684,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user