FIX Show warning when trying to create task on closed project
This commit is contained in:
parent
853566cc28
commit
f3a67d6c3f
@ -235,3 +235,4 @@ 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
|
||||||
|
WarningProjectClosed=Project is closed. You must re-open it before.
|
||||||
@ -450,6 +450,15 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("NewTask"), '', 'title_project');
|
print load_fiche_titre($langs->trans("NewTask"), '', 'title_project');
|
||||||
|
|
||||||
|
if ($object->statut == Project::STATUS_CLOSED)
|
||||||
|
{
|
||||||
|
print '<div class="warning">';
|
||||||
|
$langs->load("errors");
|
||||||
|
print $langs->trans("WarningProjectClosed");
|
||||||
|
print '</div>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">';
|
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="createtask">';
|
print '<input type="hidden" name="action" value="createtask">';
|
||||||
@ -553,6 +562,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if ($id > 0 || ! empty($ref))
|
else if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user