Fix: data were lost if creation failed

This commit is contained in:
Laurent Destailleur 2016-08-04 10:08:58 +02:00
parent abbe204c97
commit da84fac390
2 changed files with 4 additions and 4 deletions

View File

@ -174,7 +174,7 @@ ProjectOpenedProjectByOppStatus=Open project/lead by opportunity status
ProjectsStatistics=Statistics on projects/leads
TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible.
IdTaskTime=Id task time
YouCanCompleteRef=If you want to complete the ref with some information (to use it as search filters), it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-ABC. You may also prefer to add search keys into label.
YouCanCompleteRef=If you want to complete the ref with some information (to use it as search filters), it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-ABC. You may also prefer to add search keys into label. But best practice may be to add a dedicated field, also called complementary attributes.
OpenedProjectsByThirdparties=Open projects by thirdparties
OnlyOpportunitiesShort=Only opportunities
OpenedOpportunitiesShort=Open opportunities

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -492,7 +492,7 @@ if ($action == 'create' && $user->rights->projet->creer)
// Public
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
$array=array(0 => $langs->trans("PrivateProject"),1 => $langs->trans("SharedProject"));
print $form->selectarray('public',$array,$object->public);
print $form->selectarray('public',$array,GETPOST('public')?GETPOST('public'):(isset($conf->global->PROJECT_DEFAULT_PUBLIC)?$conf->global->PROJECT_DEFAULT_PUBLIC:$object->public));
print '</td></tr>';
// Date start
@ -510,7 +510,7 @@ if ($action == 'create' && $user->rights->projet->creer)
// Opportunity status
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td>';
print '<td>';
print $formproject->selectOpportunityStatus('opp_status',$object->opp_status);
print $formproject->selectOpportunityStatus('opp_status', GETPOST('opp_status')?GETPOST('opp_status'):$object->opp_status);
print '</tr>';
// Opportunity probability