Fix: Statut to close a proposal is required.
This commit is contained in:
parent
140de8ef45
commit
12d5b90b6c
@ -293,12 +293,21 @@ if ($_REQUEST['action'] == 'setstatut' && $user->rights->propale->cloturer)
|
||||
{
|
||||
if (! $_POST['cancel'])
|
||||
{
|
||||
$propal = new Propal($db);
|
||||
$propal->fetch($_GET['propalid']);
|
||||
// prevent browser refresh from closing proposal several times
|
||||
if ($propal->statut==1)
|
||||
if (empty($_REQUEST['statut']))
|
||||
{
|
||||
$propal->cloture($user, $_REQUEST['statut'], $_REQUEST['note']);
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("CloseAs")).'</div>';
|
||||
$_REQUEST['action']='statut';
|
||||
$_GET['action']='statut';
|
||||
}
|
||||
else
|
||||
{
|
||||
$propal = new Propal($db);
|
||||
$propal->fetch($_GET['propalid']);
|
||||
// prevent browser refresh from closing proposal several times
|
||||
if ($propal->statut==1)
|
||||
{
|
||||
$propal->cloture($user, $_REQUEST['statut'], $_REQUEST['note']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user