Add checking for transaction origin. #347
This commit is contained in:
parent
3cd6b16497
commit
1374a91dd4
1 changed files with 12 additions and 8 deletions
|
|
@ -1392,7 +1392,7 @@ class CMBJobOrderHandler implements JobOrderHandlerInterface
|
|||
$this->fillFormTags($params);
|
||||
|
||||
// get template to display
|
||||
$params['template'] = $this->getTwigTemplate('jo_onestep');
|
||||
$params['template'] = $this->getTwigTemplate('jo_onestep_form');
|
||||
|
||||
// return params
|
||||
return $params;
|
||||
|
|
@ -1529,8 +1529,12 @@ class CMBJobOrderHandler implements JobOrderHandlerInterface
|
|||
$this->fillDropdownParameters($params);
|
||||
$this->fillFormTags($params);
|
||||
|
||||
// get template to display
|
||||
$params['template'] = $this->getTwigTemplate('jo_all_form');
|
||||
// get template to display
|
||||
// check transaction origin if walkin
|
||||
if ($obj->getSource() == TransactionOrigin::WALK_IN)
|
||||
$params['template'] = $this->getTwigTemplate('jo_walkin_form');
|
||||
else
|
||||
$params['template'] = $this->getTwigTemplate('jo_onestep_form');
|
||||
|
||||
$params['obj'] = $obj;
|
||||
$params['status_cancelled'] = JOStatus::CANCELLED;
|
||||
|
|
@ -2381,7 +2385,7 @@ class CMBJobOrderHandler implements JobOrderHandlerInterface
|
|||
$this->fillFormTags($params);
|
||||
|
||||
// get template to display
|
||||
$params['template'] = $this->getTwigTemplate('jo_walkin');
|
||||
$params['template'] = $this->getTwigTemplate('jo_walkin_form');
|
||||
|
||||
// return params
|
||||
return $params;
|
||||
|
|
@ -2667,7 +2671,7 @@ class CMBJobOrderHandler implements JobOrderHandlerInterface
|
|||
$this->fillFormTags($params);
|
||||
|
||||
// get template to display
|
||||
$params['template'] = $this->getTwigTemplate('jo_walkin_edit');
|
||||
$params['template'] = $this->getTwigTemplate('jo_walkin_edit_form');
|
||||
|
||||
// return params
|
||||
return $params;
|
||||
|
|
@ -2789,10 +2793,10 @@ class CMBJobOrderHandler implements JobOrderHandlerInterface
|
|||
$this->template_hash['jo_list_fulfillment'] = 'job-order/list.fulfillment.html.twig';
|
||||
$this->template_hash['jo_list_open'] = 'job-order/list.open.html.twig';
|
||||
$this->template_hash['jo_list_all'] = 'job-order/list.all.html.twig';
|
||||
$this->template_hash['jo_onestep'] = 'job-order/cmb.form.onestep.html.twig';
|
||||
$this->template_hash['jo_onestep_form'] = 'job-order/cmb.form.onestep.html.twig';
|
||||
$this->template_hash['jo_onestep_edit_form'] = 'job-order/cmb.form.onestep.html.twig';
|
||||
$this->template_hash['jo_walkin'] = 'job-order/cmb.form.walkin.html.twig';
|
||||
$this->template_hash['jo_walkin_edit'] = 'job-order/cmb.form.walkin.html.twig';
|
||||
$this->template_hash['jo_walkin_form'] = 'job-order/cmb.form.walkin.html.twig';
|
||||
$this->template_hash['jo_walkin_edit_form'] = 'job-order/cmb.form.walkin.html.twig';
|
||||
}
|
||||
|
||||
protected function checkTier($tier)
|
||||
|
|
|
|||
Loading…
Reference in a new issue