public function actionInterviewSelected() { if (isset($_POST) && isset($_POST['stu_job_id']) && !empty($_POST['stu_job_id'])) { $interviewCancelForm = new InterviewCancelForm(InterviewCancelForm::TYPE_EMP); //$interviewCancelForm->attributes=$_POST['InterviewCancelForm']; $unInteResumes = InterviewStudentJobTitle::getUnInterviewResumes($_POST['stu_job_id'], Yii::app()->user->id); if (count($unInteResumes) > 0) { try { if (InterviewStudentJobTitle::saveInterviewResumes($unInteResumes, Yii::app()->user->id, $_POST['interviewDate'])) { echo "I am here "; $interviewCancelForm->sendIn(); echo "I am here after send"; $this->renderPartial('/common/_alerts', array('type' => 'success', 'msg' => Yii::t('app', 'msg.success.interview_resumes'))); } echo CHtml::hiddenField('interviewed-date', $_POST['interviewDate']); } catch (Exception $e) { $this->renderPartial('/common/_alerts', array('type' => 'danger', 'msg' => Yii::t('app', 'msg.error.interview_resumes'))); } echo CHtml::hiddenField('interviewed-resumes', implode(',', $unInteResumes)); } else { $this->renderPartial('/common/_alerts', array('type' => 'warning', 'msg' => Yii::t('app', 'msg.alert.no_interview_resumes'))); } } else { $this->renderPartial('/common/_alerts', array('type' => 'danger', 'msg' => Yii::t('app', 'msg.error.resumes_not_found'))); } }
protected function performCancel($data) { if (isset($_POST['InterviewCancelForm'])) { $interviewCancelForm = new InterviewCancelForm(InterviewCancelForm::TYPE_STU); $interviewCancelForm->attributes = $_POST['InterviewCancelForm']; if ($interviewCancelForm->validate() && $interviewCancelForm->send()) { $data['alertType'] = 'success'; $data['alertMsg'] = Yii::t('app', 'msg.success.del_interview_resume'); } else { $data['alertType'] = 'error'; $data['alertMsg'] = Yii::t('app', 'msg.error.del_interview_resume'); } } return $data; }