Exemple #1
0
 /**
  * 编辑工作流步骤
  *
  * @access public
  */
 public function edit(Process $manger)
 {
     if (Request::method() == 'POST') {
         return $this->updateWorkflowStep();
     }
     $stepId = (int) Request::input('stepid');
     $workflow_Id = (int) Request::input('workflow_id');
     if (!$stepId) {
         return Js::error(Lang::get('common.illegal_operation'), true);
     }
     $workflowInfo = $manger->workflowInfo(['id' => $workflow_Id]);
     if (empty($workflowInfo)) {
         return Js::error(Lang::get('common.illegal_operation'), true);
     }
     $stepList = $manger->workflowStepLevelList();
     $info = $manger->workflowStepInfo(['id' => $stepId]);
     if (empty($info)) {
         return Js::error(Lang::get('workflow.step_not_found'), true);
     }
     $formUrl = route('workflow.step.edit');
     return view('admin.workflow_step.add', compact('info', 'formUrl', 'stepId', 'stepList', 'workflow_Id', 'workflowInfo'));
 }