Add warning if we try to add a task on a draft project
This commit is contained in:
parent
1538823b4c
commit
a514c20183
@ -269,6 +269,7 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur
|
|||||||
WarningAnEntryAlreadyExistForTransKey=An entry already exists for the translation key for this language
|
WarningAnEntryAlreadyExistForTransKey=An entry already exists for the translation key for this language
|
||||||
WarningNumberOfRecipientIsRestrictedInMassAction=Warning, number of different recipient is limited to <b>%s</b> when using the mass actions on lists
|
WarningNumberOfRecipientIsRestrictedInMassAction=Warning, number of different recipient is limited to <b>%s</b> when using the mass actions on lists
|
||||||
WarningDateOfLineMustBeInExpenseReportRange=Warning, the date of line is not in the range of the expense report
|
WarningDateOfLineMustBeInExpenseReportRange=Warning, the date of line is not in the range of the expense report
|
||||||
|
WarningProjectDraft=Project is still in draft mode. Don't forget to validate it if you plan to use tasks.
|
||||||
WarningProjectClosed=Project is closed. You must re-open it first.
|
WarningProjectClosed=Project is closed. You must re-open it first.
|
||||||
WarningSomeBankTransactionByChequeWereRemovedAfter=Some bank transaction were removed after that the receipt including them were generated. So nb of cheques and total of receipt may differ from number and total in list.
|
WarningSomeBankTransactionByChequeWereRemovedAfter=Some bank transaction were removed after that the receipt including them were generated. So nb of cheques and total of receipt may differ from number and total in list.
|
||||||
WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into ECM database index table
|
WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into ECM database index table
|
||||||
|
|||||||
@ -239,7 +239,7 @@ $linktotasks = dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt
|
|||||||
$linktotasks .= dolGetButtonTitle($langs->trans('ViewGantt'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss'=>'reposition marginleftonly btnTitleSelected'));
|
$linktotasks .= dolGetButtonTitle($langs->trans('ViewGantt'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss'=>'reposition marginleftonly btnTitleSelected'));
|
||||||
|
|
||||||
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
|
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
|
||||||
print load_fiche_titre($title, $linktotasks.' '.$linktocreatetask, 'generic');
|
print load_fiche_titre($title, $linktotasks.' '.$linktocreatetask, 'projecttask');
|
||||||
|
|
||||||
|
|
||||||
// Get list of tasks in tasksarray and taskarrayfiltered
|
// Get list of tasks in tasksarray and taskarrayfiltered
|
||||||
|
|||||||
@ -492,13 +492,20 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("NewTask"), '', 'projecttask');
|
print load_fiche_titre($langs->trans("NewTask"), '', 'projecttask');
|
||||||
|
|
||||||
if ($object->statut == Project::STATUS_CLOSED)
|
if ($object->statut == Project::STATUS_CLOSED) {
|
||||||
{
|
|
||||||
print '<div class="warning">';
|
print '<div class="warning">';
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
print $langs->trans("WarningProjectClosed");
|
print $langs->trans("WarningProjectClosed");
|
||||||
print '</div>';
|
print '</div>';
|
||||||
} else {
|
} else {
|
||||||
|
if ($object->statut == Project::STATUS_DRAFT)
|
||||||
|
{
|
||||||
|
print '<div class="warning">';
|
||||||
|
$langs->load("errors");
|
||||||
|
print $langs->trans("WarningProjectDraft");
|
||||||
|
print '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">';
|
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="createtask">';
|
print '<input type="hidden" name="action" value="createtask">';
|
||||||
@ -636,7 +643,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||||||
$linktotasks .= dolGetButtonTitle($langs->trans('ViewGantt'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss'=>'reposition marginleftonly'));
|
$linktotasks .= dolGetButtonTitle($langs->trans('ViewGantt'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss'=>'reposition marginleftonly'));
|
||||||
|
|
||||||
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
|
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
|
||||||
print load_fiche_titre($title, $linktotasks.' '.$linktocreatetask, 'generic');
|
print load_fiche_titre($title, $linktotasks.' '.$linktocreatetask, 'projecttask');
|
||||||
|
|
||||||
// Get list of tasks in tasksarray and taskarrayfiltered
|
// Get list of tasks in tasksarray and taskarrayfiltered
|
||||||
// We need all tasks (even not limited to a user because a task to user can have a parent that is not affected to him).
|
// We need all tasks (even not limited to a user because a task to user can have a parent that is not affected to him).
|
||||||
|
|||||||
@ -4987,9 +4987,14 @@ div.scroll2 {
|
|||||||
width: <?php print isset($_SESSION['dol_screenwidth']) ?max($_SESSION['dol_screenwidth'] - 830, 450) : '450'; ?>px !important;
|
width: <?php print isset($_SESSION['dol_screenwidth']) ?max($_SESSION['dol_screenwidth'] - 830, 450) : '450'; ?>px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gtaskname div, .gtaskname {
|
div#GanttChartDIVglisthead, div#GanttChartDIVgcharthead {
|
||||||
|
line-height: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gtaskname div, .gtaskname, .gstartdate div, .gstartdate, .genddate div, .genddate {
|
||||||
font-size: unset !important;
|
font-size: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.gantt, .gtaskheading, .gmajorheading, .gminorheading, .gminorheadingwkend {
|
div.gantt, .gtaskheading, .gmajorheading, .gminorheading, .gminorheadingwkend {
|
||||||
font-size: unset !important;
|
font-size: unset !important;
|
||||||
font-weight: normal !important;
|
font-weight: normal !important;
|
||||||
|
|||||||
@ -4885,9 +4885,14 @@ div.scroll2 {
|
|||||||
width: <?php print isset($_SESSION['dol_screenwidth']) ?max($_SESSION['dol_screenwidth'] - 830, 450) : '450'; ?>px !important;
|
width: <?php print isset($_SESSION['dol_screenwidth']) ?max($_SESSION['dol_screenwidth'] - 830, 450) : '450'; ?>px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gtaskname div, .gtaskname {
|
div#GanttChartDIVglisthead, div#GanttChartDIVgcharthead {
|
||||||
|
line-height: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gtaskname div, .gtaskname, .gstartdate div, .gstartdate, .genddate div, .genddate {
|
||||||
font-size: unset !important;
|
font-size: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.gantt, .gtaskheading, .gmajorheading, .gminorheading, .gminorheadingwkend {
|
div.gantt, .gtaskheading, .gmajorheading, .gminorheading, .gminorheadingwkend {
|
||||||
font-size: unset !important;
|
font-size: unset !important;
|
||||||
font-weight: normal !important;
|
font-weight: normal !important;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user