FIX: fix checkbox displayed according to module project setup parameters
This commit is contained in:
parent
a29a9e5435
commit
d852816101
@ -550,50 +550,53 @@ 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>';
|
||||
|
||||
// Usage (opp, task, bill time, ...)
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" id="usage_opportunity" name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<script>';
|
||||
print '$( document ).ready(function() {
|
||||
jQuery("#usage_opportunity").change(function() {
|
||||
if (jQuery("#usage_opportunity").prop("checked")) {
|
||||
console.log("Show opportunities fields");
|
||||
jQuery(".classuseopportunity").show();
|
||||
} else {
|
||||
console.log("Hide opportunities fields "+jQuery("#usage_opportunity").prop("checked"));
|
||||
jQuery(".classuseopportunity").hide();
|
||||
}
|
||||
});
|
||||
});';
|
||||
print '</script>';
|
||||
print '<br>';
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
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"' : '') : ' checked="checked"').'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<script>';
|
||||
print '$( document ).ready(function() {
|
||||
jQuery("#usage_opportunity").change(function() {
|
||||
if (jQuery("#usage_opportunity").prop("checked")) {
|
||||
console.log("Show opportunities fields");
|
||||
jQuery(".classuseopportunity").show();
|
||||
} else {
|
||||
console.log("Hide opportunities fields "+jQuery("#usage_opportunity").prop("checked"));
|
||||
jQuery(".classuseopportunity").hide();
|
||||
}
|
||||
});
|
||||
});';
|
||||
print '</script>';
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" id="usage_task" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||
{
|
||||
print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"'.(GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '').'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
/*
|
||||
print '<input type="checkbox" name="usage_organize_event"'.(GETPOST('usage_organize_event', 'alpha')!=''?' checked="checked"':'').'"> ';
|
||||
$htmltext = $langs->trans("OrganizeEvent");
|
||||
print $form->textwithpicto($langs->trans("OrganizeEvent"), $htmltext);*/
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" id="usage_task" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||
{
|
||||
print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"'.(GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '').'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
/*
|
||||
print '<input type="checkbox" name="usage_organize_event"'.(GETPOST('usage_organize_event', 'alpha')!=''?' checked="checked"':'').'"> ';
|
||||
$htmltext = $langs->trans("OrganizeEvent");
|
||||
print $form->textwithpicto($langs->trans("OrganizeEvent"), $htmltext);*/
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Thirdparty
|
||||
if ($conf->societe->enabled)
|
||||
@ -841,17 +844,19 @@ elseif ($object->id > 0)
|
||||
print '</td></tr>';
|
||||
|
||||
// Usage
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
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");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<script>';
|
||||
print '$( document ).ready(function() {
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
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"' : '')) . '"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<script>';
|
||||
print '$( document ).ready(function() {
|
||||
jQuery("#usage_opportunity").change(function() {
|
||||
if (jQuery("#usage_opportunity").prop("checked")) {
|
||||
console.log("Show opportunities fields");
|
||||
@ -862,24 +867,25 @@ elseif ($object->id > 0)
|
||||
}
|
||||
});
|
||||
});';
|
||||
print '</script>';
|
||||
print '<br>';
|
||||
print '</script>';
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')) . '"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')) . '"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Thirdparty
|
||||
if ($conf->societe->enabled)
|
||||
@ -923,18 +929,18 @@ elseif ($object->id > 0)
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Opportunity probability
|
||||
print '<tr class="classuseopportunity'.$classfortr.'"><td>'.$langs->trans("OpportunityProbability").'</td>';
|
||||
print '<td><input size="5" type="text" id="opp_percent" name="opp_percent" value="'.(GETPOSTISSET('opp_percent') ? GETPOST('opp_percent') : (strcmp($object->opp_percent, '') ?vatrate($object->opp_percent) : '')).'"> %';
|
||||
print '<span id="oldopppercent"></span>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
// Opportunity probability
|
||||
print '<tr class="classuseopportunity'.$classfortr.'"><td>'.$langs->trans("OpportunityProbability").'</td>';
|
||||
print '<td><input size="5" type="text" id="opp_percent" name="opp_percent" value="'.(GETPOSTISSET('opp_percent') ? GETPOST('opp_percent') : (strcmp($object->opp_percent, '') ?vatrate($object->opp_percent) : '')).'"> %';
|
||||
print '<span id="oldopppercent"></span>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Opportunity amount
|
||||
print '<tr class="classuseopportunity'.$classfortr.'"><td>'.$langs->trans("OpportunityAmount").'</td>';
|
||||
print '<td><input size="5" type="text" name="opp_amount" value="'.(GETPOSTISSET('opp_amount') ? GETPOST('opp_amount') : (strcmp($object->opp_amount, '') ? price2num($object->opp_amount) : '')).'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
// Opportunity amount
|
||||
print '<tr class="classuseopportunity'.$classfortr.'"><td>'.$langs->trans("OpportunityAmount").'</td>';
|
||||
print '<td><input size="5" type="text" name="opp_amount" value="'.(GETPOSTISSET('opp_amount') ? GETPOST('opp_amount') : (strcmp($object->opp_amount, '') ? price2num($object->opp_amount) : '')).'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
@ -1022,32 +1028,35 @@ elseif ($object->id > 0)
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Usage
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
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");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
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"' : '')) . '"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')) . '"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')) . '"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
@ -1071,16 +1080,16 @@ elseif ($object->id > 0)
|
||||
// Opportunity Amount
|
||||
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
|
||||
/*if ($object->opp_status)
|
||||
{
|
||||
print price($obj->opp_amount, 1, $langs, 1, 0, -1, $conf->currency);
|
||||
}*/
|
||||
{
|
||||
print price($obj->opp_amount, 1, $langs, 1, 0, -1, $conf->currency);
|
||||
}*/
|
||||
if (strcmp($object->opp_amount, '')) print price($object->opp_amount, 0, $langs, 1, 0, -1, $conf->currency);
|
||||
print '</td></tr>';
|
||||
|
||||
// Opportunity Weighted Amount
|
||||
print '<tr><td>'.$langs->trans('OpportunityWeightedAmount').'</td><td>';
|
||||
if (strcmp($object->opp_amount, '') && strcmp($object->opp_percent, '')) print price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency);
|
||||
print '</td></tr>';
|
||||
// Opportunity Weighted Amount
|
||||
print '<tr><td>'.$langs->trans('OpportunityWeightedAmount').'</td><td>';
|
||||
if (strcmp($object->opp_amount, '') && strcmp($object->opp_percent, '')) print price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Date start - end
|
||||
|
||||
@ -63,11 +63,11 @@ if ($action == 'addcontact' && $user->rights->projet->creer)
|
||||
$result = 0;
|
||||
$result = $object->fetch($id);
|
||||
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
|
||||
$result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||
}
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
|
||||
$result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
{
|
||||
@ -93,7 +93,7 @@ if ($action == 'swapstatut' && $user->rights->projet->creer)
|
||||
{
|
||||
if ($object->fetch($id))
|
||||
{
|
||||
$result = $object->swapContactStatus(GETPOST('ligne', 'int'));
|
||||
$result = $object->swapContactStatus(GETPOST('ligne', 'int'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -153,100 +153,102 @@ if ($id > 0 || !empty($ref))
|
||||
dol_fiche_head($head, 'contact', $langs->trans("Project"), -1, ($object->public ? 'projectpub' : 'project'));
|
||||
|
||||
|
||||
// Project card
|
||||
// Project card
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
// Title
|
||||
$morehtmlref .= $object->title;
|
||||
// Thirdparty
|
||||
if ($object->thirdparty->id > 0)
|
||||
{
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project');
|
||||
}
|
||||
$morehtmlref .= '</div>';
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
// Title
|
||||
$morehtmlref .= $object->title;
|
||||
// Thirdparty
|
||||
if ($object->thirdparty->id > 0)
|
||||
{
|
||||
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project');
|
||||
}
|
||||
$morehtmlref .= '</div>';
|
||||
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->rights->projet->all->lire)
|
||||
{
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->rights->projet->all->lire)
|
||||
{
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '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="fichehalfleft">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Usage
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Usage
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($object->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) && $object->opp_status)
|
||||
{
|
||||
// Opportunity status
|
||||
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
|
||||
$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
|
||||
if ($code) print $langs->trans("OppStatus".$code);
|
||||
print '</td></tr>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) && $object->opp_status)
|
||||
{
|
||||
// Opportunity status
|
||||
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
|
||||
$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
|
||||
if ($code) print $langs->trans("OppStatus".$code);
|
||||
print '</td></tr>';
|
||||
|
||||
// Opportunity percent
|
||||
print '<tr><td>'.$langs->trans("OpportunityProbability").'</td><td>';
|
||||
if (strcmp($object->opp_percent, '')) print price($object->opp_percent, '', $langs, 1, 0).' %';
|
||||
print '</td></tr>';
|
||||
// Opportunity percent
|
||||
print '<tr><td>'.$langs->trans("OpportunityProbability").'</td><td>';
|
||||
if (strcmp($object->opp_percent, '')) print price($object->opp_percent, '', $langs, 1, 0).' %';
|
||||
print '</td></tr>';
|
||||
|
||||
// Opportunity Amount
|
||||
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
|
||||
if (strcmp($object->opp_amount, '')) print price($object->opp_amount, '', $langs, 0, 0, 0, $conf->currency);
|
||||
print '</td></tr>';
|
||||
}
|
||||
// Opportunity Amount
|
||||
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
|
||||
if (strcmp($object->opp_amount, '')) print price($object->opp_amount, '', $langs, 0, 0, 0, $conf->currency);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||
$start = dol_print_date($object->date_start, 'day');
|
||||
print ($start ? $start : '?');
|
||||
$end = dol_print_date($object->date_end, 'day');
|
||||
print ' - ';
|
||||
print ($end ? $end : '?');
|
||||
if ($object->hasDelay()) print img_warning("Late");
|
||||
print '</td></tr>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Budget
|
||||
// Budget
|
||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||
if (strcmp($object->budget_amount, '')) print price($object->budget_amount, '', $langs, 0, 0, 0, $conf->currency);
|
||||
print '</td></tr>';
|
||||
@ -257,36 +259,36 @@ if ($id > 0 || !empty($ref))
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '</div>';
|
||||
print '<div class="fichehalfright">';
|
||||
print '<div class="ficheaddleft">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '</div>';
|
||||
print '<div class="fichehalfright">';
|
||||
print '<div class="ficheaddleft">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Description
|
||||
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
print nl2br($object->description);
|
||||
print '</td></tr>';
|
||||
// Description
|
||||
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
print nl2br($object->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth"></div>';
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
dol_fiche_end();
|
||||
dol_fiche_end();
|
||||
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
// Contacts lines (modules that overwrite templates must declare this into descriptor)
|
||||
$dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl'));
|
||||
|
||||
@ -163,32 +163,35 @@ print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Usage
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
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");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
|
||||
@ -409,32 +409,35 @@ if ($id > 0 || !empty($ref))
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Usage
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
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");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
|
||||
@ -151,32 +151,35 @@ if ($id > 0 || !empty($ref))
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Usage
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
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"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
|
||||
@ -223,32 +223,35 @@ if ($id > 0 || !empty($ref))
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Usage
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
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"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
|
||||
@ -167,32 +167,35 @@ if ($object->id > 0)
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Usage
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
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"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
|
||||
@ -146,32 +146,35 @@ if ($object->id > 0)
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Usage
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
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"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
|
||||
@ -261,32 +261,35 @@ if ($id > 0 || !empty($ref))
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Usage
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
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"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
|
||||
@ -656,32 +656,35 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Usage
|
||||
print '<tr><td class="tdtop">';
|
||||
print $langs->trans("Usage");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
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"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowOpportunity");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectFollowTasks");
|
||||
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
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"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
|
||||
$htmltext = $langs->trans("ProjectBillTimeDescription");
|
||||
print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user