FIX: fix checkbox displayed according to module project setup parameters - work in progress
This commit is contained in:
parent
a29a9e5435
commit
b3757a6f69
@ -841,12 +841,12 @@ 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);
|
||||||
@ -865,21 +865,20 @@ elseif ($object->id > 0)
|
|||||||
print '</script>';
|
print '</script>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
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)
|
||||||
@ -1022,32 +1021,31 @@ 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_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>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user