From 9eec20c754ba6f68683113465bffb36263a0938c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 25 Feb 2010 21:28:17 +0000 Subject: [PATCH] Fix: Project choice lost when create failed --- htdocs/comm/action/fiche.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 7f186137ed3..c0da1e0c446 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -496,7 +496,7 @@ if ($_GET["action"] == 'create') $langs->load("project"); print ''.$langs->trans("Project").''; - $numprojet=select_projects($societe->id,$projetid,'projectid'); + $numprojet=select_projects($societe->id,$_REQUEST["projectid"]?$_REQUEST["projectid"]:$projetid,'projectid'); if ($numprojet==0) { print '   '.$langs->trans("AddProject").''; @@ -508,13 +508,13 @@ if ($_GET["action"] == 'create') print '
'; print ''; - // Affecte a + // Affected by print ''; - // Realise par + // Realised by print ''; @@ -579,13 +579,13 @@ if ($_GET["action"] == 'create') } print ''; - print '
'.$langs->trans("ActionAffectedTo").''; // $html->select_users($_REQUEST["affectedto"]?$_REQUEST["affectedto"]:$actioncomm->usertodo,'affectedto',1); $html->select_users($_REQUEST["affectedto"]?$_REQUEST["affectedto"]:($actioncomm->usertodo->id > 0 ? $actioncomm->usertodo : $user),'affectedto',1); print '
'.$langs->trans("ActionDoneBy").''; $html->select_users($_REQUEST["doneby"]?$_REQUEST["doneby"]:$actioncomm->userdone,'doneby',1); print '
'; + print '
'; + + print '

'; print ''; print '     '; print ''; - print ''; - - print ''; + print '
'; print ""; } @@ -759,11 +759,13 @@ if ($_GET["id"]) print ''; - print ''; - print '     '; - print ''; + print ''; - print ''; + print '

'; + print '     '; + print '
'; + + print ''; } else {