Fix: Project choice lost when create failed
This commit is contained in:
parent
c08b7def4f
commit
9eec20c754
@ -496,7 +496,7 @@ if ($_GET["action"] == 'create')
|
|||||||
$langs->load("project");
|
$langs->load("project");
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("Project").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("Project").'</td><td>';
|
||||||
$numprojet=select_projects($societe->id,$projetid,'projectid');
|
$numprojet=select_projects($societe->id,$_REQUEST["projectid"]?$_REQUEST["projectid"]:$projetid,'projectid');
|
||||||
if ($numprojet==0)
|
if ($numprojet==0)
|
||||||
{
|
{
|
||||||
print ' <a href="../../projet/fiche.php?socid='.$societe->id.'&action=create">'.$langs->trans("AddProject").'</a>';
|
print ' <a href="../../projet/fiche.php?socid='.$societe->id.'&action=create">'.$langs->trans("AddProject").'</a>';
|
||||||
@ -508,13 +508,13 @@ if ($_GET["action"] == 'create')
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Affecte a
|
// Affected by
|
||||||
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>';
|
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>';
|
||||||
// $html->select_users($_REQUEST["affectedto"]?$_REQUEST["affectedto"]:$actioncomm->usertodo,'affectedto',1);
|
// $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);
|
$html->select_users($_REQUEST["affectedto"]?$_REQUEST["affectedto"]:($actioncomm->usertodo->id > 0 ? $actioncomm->usertodo : $user),'affectedto',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Realise par
|
// Realised by
|
||||||
print '<tr><td nowrap>'.$langs->trans("ActionDoneBy").'</td><td>';
|
print '<tr><td nowrap>'.$langs->trans("ActionDoneBy").'</td><td>';
|
||||||
$html->select_users($_REQUEST["doneby"]?$_REQUEST["doneby"]:$actioncomm->userdone,'doneby',1);
|
$html->select_users($_REQUEST["doneby"]?$_REQUEST["doneby"]:$actioncomm->userdone,'doneby',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -579,13 +579,13 @@ if ($_GET["action"] == 'create')
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td align="center" colspan="2">';
|
print '</table>';
|
||||||
|
|
||||||
|
print '<center><br>';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
print '</td></tr>';
|
print '</center>';
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print "</form>";
|
print "</form>";
|
||||||
}
|
}
|
||||||
@ -759,11 +759,13 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td align="center" colspan="4"><input type="submit" class="button" name="edit" value="'.$langs->trans("Save").'">';
|
print '</table>';
|
||||||
print ' <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '</table></form>';
|
print '<center><br><input type="submit" class="button" name="edit" value="'.$langs->trans("Save").'">';
|
||||||
|
print ' <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
|
print '</center>';
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user