Skip to content
Snippets Groups Projects
Commit e4b0946e authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

When editing, don't revert status back to pending; Stay on this page after form submit

parent 0289cdc8
No related branches found
No related tags found
No related merge requests found
......@@ -14,15 +14,15 @@ class UNL_Procurement_Submission extends UNL_Procurement_LoginRequired
}
if (isset($this->options['id'])) {
if (!$this->bid = UNL_Procurement_bid::getByID($this->options['id'])) {
if (!$this->bid = UNL_Procurement_Bid::getByID($this->options['id'])) {
throw new Exception('Could not find the bid you were trying to edit!', 404);
}
} else {
$this->bid = new UNL_Procurement_bid();
$this->bid = new UNL_Procurement_Bid();
}
}
public static function handlePost()
function handlePost()
{//var_dump($_FILES);exit();
UNL_Procurement_Controller::filterPostValues();
......@@ -41,7 +41,9 @@ class UNL_Procurement_Submission extends UNL_Procurement_LoginRequired
}
UNL_Procurement_Controller::setObjectFromArray($bid, $_POST);
$bid->status = 'pending';
if (!$bid->status) {
$bid->status = 'pending';
}
if (!$bid->save()) {
throw new Exception('Could not save the bid');
......@@ -91,7 +93,7 @@ class UNL_Procurement_Submission extends UNL_Procurement_LoginRequired
}//end switch
}//end foreach
UNL_Procurement_Controller::redirect('?view=manager&notice=bid');
UNL_Procurement_Controller::redirect(UNL_Procurement_Controller::getURL().'?'.$_SERVER['QUERY_STRING'].'&notice=bid');
}
function __get($var)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment