Fix project were lost on failed creation

This commit is contained in:
Laurent Destailleur 2023-05-04 21:18:06 +02:00
parent 65b0086cfb
commit 75c3fbf28e

View File

@ -156,6 +156,7 @@ if (empty($reshook)) {
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
}
/*
* View
*/
@ -402,6 +403,10 @@ if ($action == 'create') {
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="add">';
if ($withproject) {
print '<input type="hidden" name="withproject" value="'.$withproject.'">';
print '<input type="hidden" name="fk_project" value="'.GETPOST('fk_project', 'int').'">';
}
if ($backtopage) {
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
}