Beispiel #1
0
 /**
  * missionRequests UserStep3 - MissionReququestForm3
  */
 public function executeUserStep3(sfWebRequest $request)
 {
     $this->setTemplate('userStep1');
     if (!$this->getUser()->getAttribute('miss_temp')) {
         return $this->forward('missionRequest', 'userStep2');
     } else {
         $temp_session = $this->getUser()->getAttribute('miss_temp');
     }
     if (isset($temp_session)) {
         $mission_temp = $temp_session;
     } else {
         $mission_temp = new MissionRequest();
     }
     $this->form3 = new MissionRequestForm3($mission_temp);
     $this->mission_request_temp = $mission_temp;
     $this->back = $request->getReferer();
     if ($request->isMethod('post')) {
         $this->referer = $request->getReferer();
         $this->form3->bind($request->getParameter('miss_req_temp3'));
         if ($this->form3->isValid()) {
             //step3
             $mission_temp->setReqFirstName($request->getParameter('miss_req_temp3[req_first_name]'));
             $mission_temp->setReqlastName($request->getParameter('miss_req_temp3[req_last_name]'));
             $mission_temp->setAgencyName($request->getParameter('miss_req_temp3[agency_name]'));
             $mission_temp->setReqAddress1($request->getParameter('miss_req_temp3[req_address1]'));
             $mission_temp->setReqAddress2($request->getParameter('miss_req_temp3[req_address2]'));
             $mission_temp->setReqCity($request->getParameter('miss_req_temp3[req_city]'));
             $mission_temp->setReqState($request->getParameter('miss_req_temp3[req_state]'));
             $mission_temp->setReqZipCode($request->getParameter('miss_req_temp3[req_zipcode]'));
             $mission_temp->setReqEmail($request->getParameter('miss_req_temp3[req_email]'));
             $mission_temp->setReqDayPhone($request->getParameter('miss_req_temp3[req_day_phone]'));
             $mission_temp->setReqDayComment($request->getParameter('miss_req_temp3[req_day_comment]'));
             $mission_temp->setReqEvePhone($request->getParameter('miss_req_temp3[req_eve_phone]'));
             $mission_temp->setReqEveComment($request->getParameter('miss_req_temp3[req_eve_comment]'));
             $mission_temp->setReqMobilePhone($request->getParameter('miss_req_temp3[req_mobile_phone]'));
             $mission_temp->setReqMobileComment($request->getParameter('miss_req_temp3[req_mobile_comment]'));
             $mission_temp->setReqPagerPhone($request->getParameter('miss_req_temp3[req_pager_phone]'));
             $mission_temp->setReqPagerComment($request->getParameter('miss_req_temp3[req_pager_comment]'));
             $mission_temp->setReqOtherPhone($request->getParameter('miss_req_temp3[req_other_phone]'));
             $mission_temp->setReqOtherComment($request->getParameter('miss_req_temp3[req_other_comment]'));
             $this->getUser()->setAttribute('miss_temp', $mission_temp);
             return $this->redirect('missionRequest/userStep4');
         } else {
         }
     } else {
         $this->referer = $request->getReferer() ? $request->getReferer() : '@passenger/userStep3';
     }
     // set other form1
     $this->form1 = new MissionRequestForm1($this->getUser()->getAttribute('miss_temp'));
     // set other form2
     $this->form2 = new MissionRequestForm2($this->getUser()->getAttribute('miss_temp'));
     // set other form4
     $this->form4 = new MissionRequestForm4();
     // set other form5
     $this->form5 = new MissionRequestForm5();
     $this->mission_request_temp = $mission_temp;
 }