Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/comm/propal/card.php
	htdocs/projet/card.php
	htdocs/projet/contact.php
	htdocs/projet/element.php
	htdocs/projet/tasks.php
	htdocs/projet/tasks/comment.php
	htdocs/projet/tasks/contact.php
	htdocs/projet/tasks/document.php
	htdocs/projet/tasks/note.php
	htdocs/projet/tasks/task.php
	htdocs/projet/tasks/time.php
This commit is contained in:
Laurent Destailleur 2021-03-20 12:42:46 +01:00
commit 3d3a7bfd37
15 changed files with 382 additions and 334 deletions

View File

@ -300,6 +300,7 @@ if (empty($reshook)) {
} }
} elseif ($action == 'setecheance' && $usercancreate) { } elseif ($action == 'setecheance' && $usercancreate) {
$result = $object->set_echeance($user, dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear'])); $result = $object->set_echeance($user, dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']));
$result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result < 0) { if ($result < 0) {
dol_print_error($db, $object->error); dol_print_error($db, $object->error);
} }

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> /* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
/* Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net> * Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -781,9 +781,9 @@ class pdf_azur extends ModelePDFPropales
} }
} else { } else {
if (!empty($conf->product->enabled)) { if (!empty($conf->product->enabled)) {
$filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product').dol_sanitizeFileName($product->ref); $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product');
} elseif (!empty($conf->service->enabled)) { } elseif (!empty($conf->service->enabled)) {
$filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product').dol_sanitizeFileName($product->ref); $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product');
} }
} }

View File

@ -927,9 +927,9 @@ class pdf_cyan extends ModelePDFPropales
} }
} else { } else {
if (!empty($conf->product->enabled)) { if (!empty($conf->product->enabled)) {
$filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product').dol_sanitizeFileName($product->ref); $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product');
} elseif (!empty($conf->service->enabled)) { } elseif (!empty($conf->service->enabled)) {
$filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product').dol_sanitizeFileName($product->ref); $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product');
} }
} }

View File

@ -579,7 +579,7 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',205); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',205);
-- Removed no more used function -- Removed no more used function
-- VPGSQL8.2 DROP FUNCTION IF EXISTS update_modified_column_date_m CASCADE; -- VPGSQL8.2 DROP FUNCTION IF EXISTS update_modified_column_date_m() CASCADE;
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 6,'AC_EMAIL_IN','system','reception Email',NULL, 1, 4); insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 6,'AC_EMAIL_IN','system','reception Email',NULL, 1, 4);

View File

@ -521,6 +521,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
print '<tr><td><span class="fieldrequired">'.$langs->trans("ProjectLabel").'</span></td><td><input class="minwidth500" type="text" name="title" value="'.dol_escape_htmltag(GETPOST("title", 'alphanohtml')).'" autofocus></td></tr>'; print '<tr><td><span class="fieldrequired">'.$langs->trans("ProjectLabel").'</span></td><td><input class="minwidth500" type="text" name="title" value="'.dol_escape_htmltag(GETPOST("title", 'alphanohtml')).'" 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) || !empty($conf->eventorganization->enabled)) {
print '<tr><td class="tdtop">'; print '<tr><td class="tdtop">';
print $langs->trans("Usage"); print $langs->trans("Usage");
print '</td>'; print '</td>';
@ -556,15 +557,14 @@ if ($action == 'create' && $user->rights->projet->creer) {
print '<label for="usage_bill_time">'.$form->textwithpicto($langs->trans("BillTime"), $htmltext).'</label>'; print '<label for="usage_bill_time">'.$form->textwithpicto($langs->trans("BillTime"), $htmltext).'</label>';
print '<br>'; print '<br>';
} }
if (!empty($conf->eventorganization->enabled)) { if (!empty($conf->eventorganization->enabled)) {
print '<input type="checkbox" name="usage_organize_event"'.(GETPOST('usage_organize_event', 'alpha')!=''?' checked="checked"':'').'"> '; print '<input type="checkbox" name="usage_organize_event"'.(GETPOST('usage_organize_event', 'alpha')!=''?' checked="checked"':'').'"> ';
$htmltext = $langs->trans("EventOrganizationDescriptionLong"); $htmltext = $langs->trans("EventOrganizationDescriptionLong");
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
} }
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
}
// Thirdparty // Thirdparty
if ($conf->societe->enabled) { if ($conf->societe->enabled) {
@ -805,6 +805,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
print '</td></tr>'; print '</td></tr>';
// Usage // Usage
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) {
print '<tr><td class="tdtop">'; print '<tr><td class="tdtop">';
print $langs->trans("Usage"); print $langs->trans("Usage");
print '</td>'; print '</td>';
@ -846,6 +847,8 @@ if ($action == 'create' && $user->rights->projet->creer) {
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
} }
print '</td></tr>'; print '</td></tr>';
}
print '</td></tr>';
// Thirdparty // Thirdparty
if ($conf->societe->enabled) { if ($conf->societe->enabled) {
@ -980,7 +983,6 @@ if ($action == 'create' && $user->rights->projet->creer) {
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>';
@ -988,6 +990,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
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) || !empty($conf->eventorganization->enabled)) {
print '<tr><td class="tdtop">'; print '<tr><td class="tdtop">';
print $langs->trans("Usage"); print $langs->trans("Usage");
print '</td>'; print '</td>';
@ -1004,7 +1007,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
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);
@ -1017,6 +1020,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
} }
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>';

View File

@ -313,6 +313,7 @@ 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) || !empty($conf->eventorganization->enabled)) {
print '<tr><td class="tdtop">'; print '<tr><td class="tdtop">';
print $langs->trans("Usage"); print $langs->trans("Usage");
print '</td>'; print '</td>';
@ -329,7 +330,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");
print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
@ -341,6 +342,7 @@ if ($id > 0 || !empty($ref)) {
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
} }
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>';

View File

@ -235,6 +235,7 @@ print '<div class="underbanner clearboth"></div>';
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) || !empty($conf->eventorganization->enabled)) {
print '<tr><td class="tdtop">'; print '<tr><td class="tdtop">';
print $langs->trans("Usage"); print $langs->trans("Usage");
print '</td>'; print '</td>';
@ -251,7 +252,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) {
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);
@ -263,6 +264,7 @@ if (!empty($conf->eventorganization->enabled)) {
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
} }
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>';

View File

@ -462,6 +462,7 @@ 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) || !empty($conf->eventorganization->enabled)) {
print '<tr><td class="tdtop">'; print '<tr><td class="tdtop">';
print $langs->trans("Usage"); print $langs->trans("Usage");
print '</td>'; print '</td>';
@ -478,7 +479,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");
print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
@ -490,6 +491,7 @@ if ($id > 0 || !empty($ref)) {
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
} }
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>';

View File

@ -147,6 +147,7 @@ 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) || !empty($conf->eventorganization->enabled)) {
print '<tr><td class="tdtop">'; print '<tr><td class="tdtop">';
print $langs->trans("Usage"); print $langs->trans("Usage");
print '</td>'; print '</td>';
@ -163,13 +164,19 @@ 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");
print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
print '<br>'; print '<br>';
} }
if (!empty($conf->eventorganization->enabled)) {
print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> ';
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
}
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>';
@ -180,7 +187,7 @@ if ($id > 0 || !empty($ref)) {
} }
print '</td></tr>'; print '</td></tr>';
// Usage // Opportunities
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) && !empty($object->usage_opportunity)) { if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) && !empty($object->usage_opportunity)) {
// Opportunity status // Opportunity status
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>'; print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';

View File

@ -209,6 +209,7 @@ 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) || !empty($conf->eventorganization->enabled)) {
print '<tr><td class="tdtop">'; print '<tr><td class="tdtop">';
print $langs->trans("Usage"); print $langs->trans("Usage");
print '</td>'; print '</td>';
@ -225,13 +226,19 @@ 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");
print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
print '<br>'; print '<br>';
} }
if (!empty($conf->eventorganization->enabled)) {
print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> ';
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
}
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>';

View File

@ -166,6 +166,7 @@ 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) || !empty($conf->eventorganization->enabled)) {
print '<tr><td class="tdtop">'; print '<tr><td class="tdtop">';
print $langs->trans("Usage"); print $langs->trans("Usage");
print '</td>'; print '</td>';
@ -182,13 +183,19 @@ 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");
print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
print '<br>'; print '<br>';
} }
if (!empty($conf->eventorganization->enabled)) {
print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> ';
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
}
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>';

View File

@ -141,6 +141,7 @@ 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) || !empty($conf->eventorganization->enabled)) {
print '<tr><td class="tdtop">'; print '<tr><td class="tdtop">';
print $langs->trans("Usage"); print $langs->trans("Usage");
print '</td>'; print '</td>';
@ -157,13 +158,19 @@ 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");
print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
print '<br>'; print '<br>';
} }
if (!empty($conf->eventorganization->enabled)) {
print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> ';
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
}
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>';

View File

@ -252,6 +252,7 @@ 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) || !empty($conf->eventorganization->enabled)) {
print '<tr><td class="tdtop">'; print '<tr><td class="tdtop">';
print $langs->trans("Usage"); print $langs->trans("Usage");
print '</td>'; print '</td>';
@ -268,13 +269,19 @@ 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");
print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
print '<br>'; print '<br>';
} }
if (!empty($conf->eventorganization->enabled)) {
print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> ';
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
}
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>';

View File

@ -612,6 +612,7 @@ 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) || !empty($conf->eventorganization->enabled)) {
print '<tr><td class="tdtop">'; print '<tr><td class="tdtop">';
print $langs->trans("Usage"); print $langs->trans("Usage");
print '</td>'; print '</td>';
@ -628,7 +629,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");
print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
@ -640,6 +641,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
} }
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>';