Esempio n. 1
0
 public function configure()
 {
     unset($this['id'], $this['person_id'], $this['requester_id'], $this['ground_transportation_comment'], $this['travel_history_notes'], $this['releasing_physician'], $this['releasing_phone'], $this['releasing_fax1'], $this['releasing_fax1_comment'], $this['releasing_email'], $this['need_medical_release'], $this['medical_release_requested'], $this['medical_release_received'], $this['treating_physician'], $this['treating_phone'], $this['treating_fax1'], $this['treating_fax1_comment'], $this['treating_email'], $this['lodging_name'], $this['lodging_phone'], $this['lodging_phone_comment'], $this['facility_phone'], $this['facility_phone_comment'], $this['emergency_contact_name'], $this['emergency_contact_primary_phone'], $this['emergency_contact_primary_comment'], $this['emergency_contact_secondary_phone'], $this['emergency_contact_secondary_comment'], $this['facility_name'], $this['camp_passenger_list'], $this['camp_pilot_passenger_list']);
     $pass_types = PassengerTypePeer::getForSelectParent();
     $pass_cats = PassengerIllnessCategoryPeer::getForSelectParent();
     # Fields
     $this->widgetSchema['passenger_type_id'] = new sfWidgetFormChoice(array('choices' => $pass_types));
     $this->widgetSchema['parent'] = new sfWidgetFormInput(array(), array('class' => 'text'));
     $this->widgetSchema['date_of_birth'] = new widgetFormDate(array('format_date' => array('js' => 'mm/dd/yy', 'php' => 'm/d/Y')), array('class' => 'text narrow'));
     $this->widgetSchema['weight'] = new sfWidgetFormInput();
     $this->widgetSchema['illness'] = new sfWidgetFormInput(array(), array('class' => 'text'));
     $this->widgetSchema['passenger_illness_category_id'] = new sfWidgetFormChoice(array('choices' => $pass_cats));
     $this->widgetSchema['language_spoken'] = new sfWidgetFormInput(array(), array('class' => 'text'));
     $this->widgetSchema['best_contact_method'] = new sfWidgetFormInput(array(), array('class' => 'text'));
     $this->widgetSchema['financial'] = new sfWidgetFormTextarea(array(), array('class' => 'text'));
     $this->widgetSchema['public_considerations'] = new sfWidgetFormTextarea(array(), array('class' => 'text'));
     $this->widgetSchema['private_considerations'] = new sfWidgetFormTextarea(array(), array('class' => 'text'));
     # Labels
     $this->widgetSchema->setLabels(array('passenger_type_id' => 'Passenger Type'));
     $this->widgetSchema->setLabels(array('parent' => 'Parent Name'));
     $this->widgetSchema->setLabels(array('date_of_birth' => 'Date of birth'));
     $this->widgetSchema->setLabels(array('weight' => 'Weight'));
     $this->widgetSchema->setLabels(array('illness' => 'Passenger Illness'));
     $this->widgetSchema->setLabels(array('passenger_illness_category_id' => 'Illness Category'));
     $this->widgetSchema->setLabels(array('language_spoken' => 'Language Spoken'));
     $this->widgetSchema->setLabels(array('best_contact_method' => 'Best Contacted By'));
     $this->widgetSchema->setLabels(array('financial' => 'Financial Information'));
     $this->widgetSchema->setLabels(array('public_considerations' => 'Public Considerations'));
     $this->widgetSchema->setLabels(array('private_considerations' => 'Private Considerations'));
     # Validation
     $this->validatorSchema['passenger_type_id'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['parent'] = new sfValidatorString(array('required' => false), array('required' => 'Please confirm first name !.'));
     $this->validatorSchema['date_of_birth'] = new sfValidatorDate(array('max' => time(), 'required' => false), array('invalid' => 'Date of birth is invalid !.'));
     $this->validatorSchema['weight'] = new sfValidatorInteger(array('required' => false));
     $this->validatorSchema['illness'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['passenger_illness_category_id'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['language_spoken'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['best_contact_method'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['financial'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['public_considerations'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['private_considerations'] = new sfValidatorString(array('required' => false));
     # Descriptive message
     #help
     $this->widgetSchema->setHelp('weight', 'lbs.');
     $this->widgetSchema->setNameFormat('pass5_2[%s]');
 }
 /**
  * Populates the object using an array.
  *
  * This is particularly useful when populating an object from one of the
  * request arrays (e.g. $_POST).  This method goes through the column
  * names, checking to see whether a matching key exists in populated
  * array. If so the setByName() method is called for that column.
  *
  * You can specify the key type of the array by additionally passing one
  * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  * The default key type is the column's phpname (e.g. 'AuthorId')
  *
  * @param      array  $arr     An array to populate the object from.
  * @param      string $keyType The type of keys the array uses.
  * @return     void
  */
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = PassengerIllnessCategoryPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setCategoryDescription($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setSuperCategoryDescription($arr[$keys[2]]);
     }
 }
Esempio n. 3
0
 /**
  * Add or edit Passenger illness delete
  * CODE: passenger_illness_delete
  */
 public function executeDeleteIllness(sfWebRequest $request)
 {
     if (!$this->getUser()->hasCredential(array('Administrator'), false)) {
         $this->getUser()->setFlash("warning", 'You don\'t have permission to access this url ' . $request->getReferer());
         $this->redirect('dashboard/index');
     }
     if ($request->isMethod('post')) {
         try {
             $ill = PassengerIllnessCategoryPeer::retrieveByPK($request->getParameter('id'));
             $this->forward404Unless($ill);
             $ill->delete();
             $this->getUser()->setFlash('success', 'Passenger Illness Category information has been successfully deleted!');
         } catch (Exception $e) {
             $this->getUser()->setFlash('warning', "There are related persons to this Passenger Illness Category. Please remove them first.");
         }
     }
     return $this->redirect('@pill');
 }
Esempio n. 4
0
 /**
  * Get the associated PassengerIllnessCategory object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     PassengerIllnessCategory The associated PassengerIllnessCategory object.
  * @throws     PropelException
  */
 public function getPassengerIllnessCategory(PropelPDO $con = null)
 {
     if ($this->aPassengerIllnessCategory === null && $this->passenger_illness_category_id !== null) {
         $c = new Criteria(PassengerIllnessCategoryPeer::DATABASE_NAME);
         $c->add(PassengerIllnessCategoryPeer::ID, $this->passenger_illness_category_id);
         $this->aPassengerIllnessCategory = PassengerIllnessCategoryPeer::doSelectOne($c, $con);
         /* The following can be used additionally to
         		   guarantee the related object contains a reference
         		   to this object.  This level of coupling may, however, be
         		   undesirable since it could result in an only partially populated collection
         		   in the referenced object.
         		   $this->aPassengerIllnessCategory->addPassengers($this);
         		 */
     }
     return $this->aPassengerIllnessCategory;
 }
Esempio n. 5
0
 /**
  * missionRequests step2
  * CODE: mission_request_create
  */
 public function executeStep2(sfWebRequest $request)
 {
     # security
     if (!$this->getUser()->hasCredential(array('Administrator', 'Staff', 'Coordinator'), false)) {
         $this->getUser()->setFlash("warning", 'You don\'t have permission to access this url ' . $request->getReferer());
         $this->redirect('dashboard/index');
     }
     $this->setTemplate('step1');
     if (!$this->getUser()->getAttribute('miss_req')) {
         return $this->forward('missionRequest', 'step1');
     } else {
         $miss_req_session = $this->getUser()->getAttribute('miss_req');
     }
     if (isset($miss_req_session)) {
         $miss_req = $miss_req_session;
     } else {
         $miss_req = new MissionRequest();
     }
     //find Passenger
     $this->pass_firstname = $miss_req->getPassFirstName();
     $this->pass_lastname = $miss_req->getPassLastName();
     $this->form2 = new MissionRequestForm6($miss_req);
     $this->title = 'Mission Request Process';
     $this->sub_title = 'Find Matching Passenger';
     //passengers
     $this->pass_illness_cats = PassengerIllnessCategoryPeer::getForSelectParent();
     $this->pass_types = PassengerTypePeer::getForSelectParent();
     $this->old_passengers = PassengerPeer::getFLName($this->pass_firstname, $this->pass_lastname);
     if ($request->isMethod('post')) {
         $this->referer = $request->getReferer();
         $this->form2->bind($request->getParameter('miss_req_temp6'));
         if ($this->form2->isValid() && $request->getParameter('miss_req_temp6[pass_type]') != 0) {
             $miss_req->passenger_id = $request->getParameter('passenger_id');
             //set datas to MissionRequest
             $miss_req->setPassTitle($request->getParameter('miss_req_temp6[pass_title]'));
             $miss_req->setPassGender($request->getParameter('miss_req_temp6[pass_gender]'));
             $miss_req->setPassType($request->getParameter('miss_req_temp6[pass_type]'));
             $miss_req->setPassAddress1($request->getParameter('miss_req_temp6[pass_address1]'));
             $miss_req->setPassAddress2($request->getParameter('miss_req_temp6[pass_address2]'));
             $miss_req->setPassCity($request->getParameter('miss_req_temp6[pass_city]'));
             $miss_req->setPassState($request->getParameter('miss_req_temp6[pass_state]'));
             $miss_req->setPassZipcode($request->getParameter('miss_req_temp6[pass_zipcode]'));
             $miss_req->setPassCountry($request->getParameter('miss_req_temp6[pass_country]'));
             $miss_req->setPassEmail($request->getParameter('miss_req_temp6[pass_email]'));
             $miss_req->setPassDayPhone($request->getParameter('miss_req_temp6[pass_day_phone]'));
             $miss_req->setPassDayComment($request->getParameter('miss_req_temp6[pass_day_comment]'));
             $miss_req->setPassEvePhone($request->getParameter('miss_req_temp6[pass_eve_phone]'));
             $miss_req->setPassEveComment($request->getParameter('miss_req_temp6[pass_eve_comment]'));
             $miss_req->setPassMobilePhone($request->getParameter('miss_req_temp6[pass_mobile_phone]'));
             $miss_req->setPassMobileComment($request->getParameter('miss_req_temp6[pass_mobile_comment]'));
             $miss_req->setPassPagerPhone($request->getParameter('miss_req_temp6[pass_pager_phone]'));
             $miss_req->setPassPagerComment($request->getParameter('miss_req_temp6[pass_pager_comment]'));
             $miss_req->setPassOtherPhone($request->getParameter('miss_req_temp6[pass_other_phone]'));
             $miss_req->setPassOtherComment($request->getParameter('miss_req_temp6[pass_other_comment]'));
             $miss_req->setBestContact($request->getParameter('miss_req_temp6[best_contact]'));
             $miss_req->setIllness($request->getParameter('miss_req_temp6[illness]'));
             $miss_req->setFinancial($request->getParameter('miss_req_temp6[financial]'));
             $miss_req->setPassPrivateCons($request->getParameter('miss_req_temp6[pass_private_cons]'));
             $miss_req->setPassPublicCons($request->getParameter('miss_req_temp6[pass_public_cons]'));
             $miss_req->setPassWeight($request->getParameter('miss_req_temp6[pass_weight]'));
             $miss_req->setPassHeight($request->getParameter('miss_req_temp6[pass_height]'));
             $miss_req->setPassMedical($request->getParameter('miss_req_temp6[pass_medical]'));
             $miss_req->setPassLanguage($request->getParameter('miss_req_temp6[pass_language]'));
             $miss_req->setPassDateOfBirth($request->getParameter('miss_req_temp6[pass_date_of_birth]'));
             $miss_req->setReleasingPhysician($request->getParameter('miss_req_temp6[releasing_physician]'));
             $miss_req->setReleasePhone($request->getParameter('miss_req_temp6[release_phone]'));
             $miss_req->setReleasePhoneComment($request->getParameter('miss_req_temp6[release_phone_comment]'));
             $miss_req->setReleaseFax($request->getParameter('miss_req_temp6[release_fax]'));
             $miss_req->setReleaseFaxComment($request->getParameter('miss_req_temp6[release_fax_comment]'));
             $miss_req->setReleaseEmail($request->getParameter('miss_req_temp6[release_email]'));
             $miss_req->setTreatingPhysician($request->getParameter('miss_req_temp6[treating_physician]'));
             $miss_req->setTreatingPhone($request->getParameter('miss_req_temp6[treating_phone]'));
             $miss_req->setTreatingPhoneComment($request->getParameter('miss_req_temp6[treating_phone_comment]'));
             $miss_req->setTreatingFax($request->getParameter('miss_req_temp6[treating_fax]'));
             $miss_req->setTreatingFaxComment($request->getParameter('miss_req_temp6[treating_fax_comment]'));
             $miss_req->setTreatingEmail($request->getParameter('miss_req_temp6[treating_email]'));
             $miss_req->setFacilityName($request->getParameter('miss_req_temp6[facility_name]'));
             $miss_req->setFacilityPhone($request->getParameter('miss_req_temp6[facility_phone]'));
             $miss_req->setFacilityPhoneComment($request->getParameter('miss_req_temp6[facility_phone_comment]'));
             $miss_req->setLodgingName($request->getParameter('miss_req_temp6[lodging_name]'));
             $miss_req->setLodgingPhone($request->getParameter('miss_req_temp6[lodging_phone]'));
             $miss_req->setLodgingPhoneComment($request->getParameter('miss_req_temp6[lodging_phone_comment]'));
             $miss_req->setEmergencyName($request->getParameter('miss_req_temp6[emergency_name]'));
             $miss_req->setEmergencyPhone1($request->getParameter('miss_req_temp6[emergency_phone1]'));
             $miss_req->setEmergencyPhone1Comment($request->getParameter('miss_req_temp6[emergency_phone1_comment]'));
             $miss_req->setEmergencyPhone2($request->getParameter('miss_req_temp6[emergency_phone2]'));
             $miss_req->setEmergencyPhone2Comment($request->getParameter('miss_req_temp6[emergency_phone2_comment]'));
             $this->getUser()->setAttribute('miss_req', $miss_req);
             return $this->redirect('missionRequest/step3');
         } else {
             if ($request->getParameter('miss_req_temp6[pass_type]') == 0) {
                 $this->type_error = 1;
             }
         }
     } else {
         $this->referer = $request->getReferer() ? $request->getReferer() : '@missionRequest/step2';
     }
     $this->form1 = new MissionRequestForm3($miss_req);
     $this->form3 = new MissionRequestForm7();
     $this->miss_req = $miss_req;
 }
Esempio n. 6
0
 /**
  * Selects a collection of Passenger objects pre-filled with all related objects except Requester.
  *
  * @param      Criteria  $c
  * @param      PropelPDO $con
  * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  * @return     array Array of Passenger objects.
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function doSelectJoinAllExceptRequester(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 {
     $c = clone $c;
     // Set the correct dbName if it has not been overridden
     // $c->getDbName() will return the same object if not set to another value
     // so == check is okay and faster
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     PassengerPeer::addSelectColumns($c);
     $startcol2 = PassengerPeer::NUM_COLUMNS - PassengerPeer::NUM_LAZY_LOAD_COLUMNS;
     PersonPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + (PersonPeer::NUM_COLUMNS - PersonPeer::NUM_LAZY_LOAD_COLUMNS);
     PassengerTypePeer::addSelectColumns($c);
     $startcol4 = $startcol3 + (PassengerTypePeer::NUM_COLUMNS - PassengerTypePeer::NUM_LAZY_LOAD_COLUMNS);
     PassengerIllnessCategoryPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + (PassengerIllnessCategoryPeer::NUM_COLUMNS - PassengerIllnessCategoryPeer::NUM_LAZY_LOAD_COLUMNS);
     $c->addJoin(array(PassengerPeer::PERSON_ID), array(PersonPeer::ID), $join_behavior);
     $c->addJoin(array(PassengerPeer::PASSENGER_TYPE_ID), array(PassengerTypePeer::ID), $join_behavior);
     $c->addJoin(array(PassengerPeer::PASSENGER_ILLNESS_CATEGORY_ID), array(PassengerIllnessCategoryPeer::ID), $join_behavior);
     $stmt = BasePeer::doSelect($c, $con);
     $results = array();
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key1 = PassengerPeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj1 = PassengerPeer::getInstanceFromPool($key1))) {
             // We no longer rehydrate the object, since this can cause data loss.
             // See http://propel.phpdb.org/trac/ticket/509
             // $obj1->hydrate($row, 0, true); // rehydrate
         } else {
             $omClass = PassengerPeer::getOMClass();
             $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
             $obj1 = new $cls();
             $obj1->hydrate($row);
             PassengerPeer::addInstanceToPool($obj1, $key1);
         }
         // if obj1 already loaded
         // Add objects for joined Person rows
         $key2 = PersonPeer::getPrimaryKeyHashFromRow($row, $startcol2);
         if ($key2 !== null) {
             $obj2 = PersonPeer::getInstanceFromPool($key2);
             if (!$obj2) {
                 $omClass = PersonPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj2 = new $cls();
                 $obj2->hydrate($row, $startcol2);
                 PersonPeer::addInstanceToPool($obj2, $key2);
             }
             // if $obj2 already loaded
             // Add the $obj1 (Passenger) to the collection in $obj2 (Person)
             $obj2->addPassenger($obj1);
         }
         // if joined row is not null
         // Add objects for joined PassengerType rows
         $key3 = PassengerTypePeer::getPrimaryKeyHashFromRow($row, $startcol3);
         if ($key3 !== null) {
             $obj3 = PassengerTypePeer::getInstanceFromPool($key3);
             if (!$obj3) {
                 $omClass = PassengerTypePeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj3 = new $cls();
                 $obj3->hydrate($row, $startcol3);
                 PassengerTypePeer::addInstanceToPool($obj3, $key3);
             }
             // if $obj3 already loaded
             // Add the $obj1 (Passenger) to the collection in $obj3 (PassengerType)
             $obj3->addPassenger($obj1);
         }
         // if joined row is not null
         // Add objects for joined PassengerIllnessCategory rows
         $key4 = PassengerIllnessCategoryPeer::getPrimaryKeyHashFromRow($row, $startcol4);
         if ($key4 !== null) {
             $obj4 = PassengerIllnessCategoryPeer::getInstanceFromPool($key4);
             if (!$obj4) {
                 $omClass = PassengerIllnessCategoryPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj4 = new $cls();
                 $obj4->hydrate($row, $startcol4);
                 PassengerIllnessCategoryPeer::addInstanceToPool($obj4, $key4);
             }
             // if $obj4 already loaded
             // Add the $obj1 (Passenger) to the collection in $obj4 (PassengerIllnessCategory)
             $obj4->addPassenger($obj1);
         }
         // if joined row is not null
         $results[] = $obj1;
     }
     $stmt->closeCursor();
     return $results;
 }
 public function configure()
 {
     unset($this['id'], $this['pass_title'], $this['on_behalf'], $this['request_by'], $this['follow_up_contact_name'], $this['follow_up_contact_phone'], $this['follow_up_email'], $this['pass_zipcode'], $this['pass_date_of_birth'], $this['orgin_city'], $this['orgin_state'], $this['orgin_zipcode'], $this['dest_city'], $this['dest_state'], $this['dest_zipcode'], $this['req_first_name'], $this['req_last_name'], $this['agency_name'], $this['req_address1'], $this['req_address2'], $this['req_city'], $this['req_state'], $this['req_zipcode'], $this['req_day_phone'], $this['req_day_comment'], $this['req_eve_phone'], $this['req_eve_comment'], $this['req_mobile_phone'], $this['req_mobile_comment'], $this['req_pager_phone'], $this['req_pager_comment'], $this['req_other_phone'], $this['req_other_comment'], $this['req_email'], $this['appt_date'], $this['return_date'], $this['releasing_physician'], $this['release_phone'], $this['release_phone_comment'], $this['release_fax'], $this['release_fax_comment'], $this['release_email'], $this['treating_physician'], $this['treating_phone'], $this['treating_phone_comment'], $this['treating_fax'], $this['treating_fax_comment'], $this['treating_email'], $this['facility_name'], $this['facility_phone'], $this['facility_phone_comment'], $this['lodging_name'], $this['lodging_phone'], $this['lodging_phone_comment'], $this['emergency_name'], $this['emergency_phone1'], $this['emergency_phone1_comment'], $this['pass_english'], $this['pass_language'], $this['pass_oxygen'], $this['illness'], $this['financial'], $this['pass_medical'], $this['referral_source_id'], $this['com1_name'], $this['com1_relationship'], $this['com1_date_of_birth'], $this['com1_weight'], $this['com1_phone'], $this['com1_comment'], $this['com2_name'], $this['com2_relationship'], $this['com2_date_of_birth'], $this['com2_weight'], $this['com2_phone'], $this['com2_comment'], $this['com3_name'], $this['com3_relationship'], $this['com3_date_of_birth'], $this['com3_weight'], $this['com3_phone'], $this['com3_comment'], $this['com4_name'], $this['com4_relationship'], $this['com4_date_of_birth'], $this['com4_weight'], $this['com4_phone'], $this['com5_comment'], $this['com5_name'], $this['com5_relationship'], $this['com5_date_of_birth'], $this['com5_weight'], $this['com5_phone'], $this['com5_comment'], $this['guar_first_name'], $this['guar_last_name'], $this['guar_address1'], $this['guar_address2'], $this['guar_city'], $this['guar_state'], $this['guar_zipcode'], $this['guar_day_phone'], $this['guar_day_comment'], $this['guar_eve_phone'], $this['guar_eve_comment'], $this['guar_fax_phone'], $this['guar_fax_comment'], $this['guar_mobile_phone'], $this['guar_mobile_comment'], $this['guar_other_phone'], $this['guar_other_comment'], $this['guar_pager_phone'], $this['guar_pager_comment'], $this['guar_guar_email'], $this['afa_org_id'], $this['afa_org_mission_id'], $this['mission_request_type_id'], $this['last_page_processed'], $this['emergency_phone2'], $this['emergency_phone2_comment'], $this['comment'], $this['processed_date'], $this['session_id'], $this['ip_address'], $this['pass_fax_phone1'], $this['pass_fax_comment1'], $this['req_language'], $this['best_contact'], $this['dest_id'], $this['dest_ident'], $this['orgin_ident'], $this['orgin_id'], $this['req_title'], $this['requester_id'], $this['requester_date'], $this['baggage_weight'], $this['baggage_desc'], $this['req_county'], $this['req_country'], $this['req_fax_phone1'], $this['req_fax_comment1'], $this['miss_req_orginator_afa_org_id'], $this['_csrf_token'], $this['req_secondary_email'], $this['req_pager_email'], $this['req_position'], $this['req_discharge'], $this['appt_time'], $this['flight_time'], $this['mission_date'], $this['waiver_required']);
     $phone_widget_options = array('mask' => '(999) 999-9999', 'ok_class' => 'field_ok', 'holder_class' => 'field_hold');
     $states = sfConfig::get('app_states', array('AL' => 'Alabama', 'AK' => 'Alaska'));
     $gender_types = sfConfig::get('app_gender_types', array('male' => 'Male', 'female' => 'Female', 'unknown' => 'Unknown'));
     $passenger_types = PassengerTypePeer::getForSelectParent();
     $countries = sfConfig::get('app_countries', array('United States' => 'United States'));
     $illness_cats = PassengerIllnessCategoryPeer::getForSelectParent();
     # Fields
     $this->widgetSchema['pass_title'] = new sfWidgetFormInput(array(), array('class' => 'text narrowest'));
     $this->widgetSchema['pass_first_name'] = new sfWidgetFormInput(array(), array('class' => 'text'));
     $this->widgetSchema['pass_last_name'] = new sfWidgetFormInput(array(), array('class' => 'text'));
     $this->widgetSchema['pass_gender'] = new sfWidgetFormSelect(array('choices' => $gender_types));
     $this->widgetSchema['pass_type'] = new sfWidgetFormSelect(array('choices' => $passenger_types));
     $this->widgetSchema['pass_address1'] = new sfWidgetFormInput(array(), array('class' => 'text'));
     $this->widgetSchema['pass_address2'] = new sfWidgetFormInput(array(), array('class' => 'text'));
     $this->widgetSchema['pass_city'] = new sfWidgetFormInput(array(), array('class' => 'text'));
     $this->widgetSchema['pass_state'] = new sfWidgetFormSelect(array('choices' => $states), array('class' => 'text'));
     $this->widgetSchema['pass_zipcode'] = new widgetFormInputZipcode(array(), array('class' => 'text narrow'));
     $this->widgetSchema['pass_country'] = new sfWidgetFormSelect(array('choices' => $countries));
     $this->widgetSchema['pass_email'] = new sfWidgetFormInput(array(), array('class' => 'text'));
     $this->widgetSchema['pass_day_phone'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow'));
     $this->widgetSchema['pass_day_comment'] = new sfWidgetFormInput(array(), array('class' => 'text narrow'));
     $this->widgetSchema['pass_eve_phone'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow'));
     $this->widgetSchema['pass_eve_comment'] = new sfWidgetFormInput(array(), array('class' => 'text narrow'));
     $this->widgetSchema['pass_mobile_phone'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow'));
     $this->widgetSchema['pass_mobile_comment'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow'));
     $this->widgetSchema['pass_pager_phone'] = new sfWidgetFormInput(array(), array('class' => 'text narrow'));
     $this->widgetSchema['pass_pager_comment'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow'));
     $this->widgetSchema['pass_other_phone'] = new sfWidgetFormInput(array(), array('class' => 'text narrow'));
     $this->widgetSchema['pass_other_comment'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow'));
     $this->widgetSchema['pass_best_contact'] = new sfWidgetFormTextarea(array(), array('class' => 'text'));
     $this->widgetSchema['illness'] = new sfWidgetFormSelect(array('choices' => $illness_cats));
     $this->widgetSchema['financial'] = new sfWidgetFormTextarea(array(), array('class' => 'text'));
     $this->widgetSchema['pass_private_cons'] = new sfWidgetFormTextarea(array(), array('class' => 'text'));
     $this->widgetSchema['pass_public_cons'] = new sfWidgetFormTextarea(array(), array('class' => 'text'));
     $this->widgetSchema['pass_public_cons'] = new sfWidgetFormTextarea(array(), array('class' => 'text'));
     $this->widgetSchema['pass_public_cons'] = new sfWidgetFormTextarea(array(), array('class' => 'text'));
     $this->widgetSchema['pass_weight'] = new sfWidgetFormInput(array(), array('class' => 'text narrowest'));
     $this->widgetSchema['pass_height'] = new sfWidgetFormInput(array(), array('class' => 'text narrowest'));
     # Labels
     $this->widgetSchema->setLabels(array('pass_first_name' => 'First Name*'));
     $this->widgetSchema->setLabels(array('pass_last_name' => 'Last Name*'));
     $this->widgetSchema->setLabels(array('pass_address1' => 'Address1'));
     $this->widgetSchema->setLabels(array('pass_address2' => 'Address2'));
     $this->widgetSchema->setLabels(array('pass_city' => 'City*'));
     $this->widgetSchema->setLabels(array('pass_state' => 'State*'));
     $this->widgetSchema->setLabels(array('pass_zipcode' => 'ZipCode*'));
     $this->widgetSchema->setLabels(array('pass_day_phone' => 'Work'));
     $this->widgetSchema->setLabels(array('pass_day_comment' => ' '));
     $this->widgetSchema->setLabels(array('pass_eve_phone' => 'Home'));
     $this->widgetSchema->setLabels(array('pass_eve_comment' => ' '));
     $this->widgetSchema->setLabels(array('pass_mobile_phone' => 'Mobile'));
     $this->widgetSchema->setLabels(array('pass_mobile_comment' => ' '));
     $this->widgetSchema->setLabels(array('pass_pager_phone' => 'Pager'));
     $this->widgetSchema->setLabels(array('pass_pager_comment' => ' '));
     $this->widgetSchema->setLabels(array('pass_other_phone' => 'Other'));
     $this->widgetSchema->setLabels(array('pass_other_comment' => ' '));
     $this->widgetSchema->setLabels(array('pass_email' => 'Email'));
     $this->widgetSchema->setLabels(array('pass_weight' => 'Weight'));
     $this->widgetSchema->setLabels(array('pass_height' => 'Height'));
     # Validation
     $this->validatorSchema['pass_first_name'] = new sfValidatorString(array('required' => true), array('required' => 'Please confirm firstname !'));
     $this->validatorSchema['pass_last_name'] = new sfValidatorString(array('required' => true), array('required' => 'Please confirm lastname !'));
     $this->validatorSchema['pass_address1'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['pass_address2'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['pass_city'] = new sfValidatorString(array('required' => true), array('required' => 'Please confirm city!'));
     $this->validatorSchema['pass_state'] = new sfValidatorString(array('required' => true), array('required' => 'Please confirm state!'));
     $this->validatorSchema['pass_zipcode'] = new validatorZipcode(array('required' => true), array('max_length' => 10, 'min_length' => 5, 'required' => 'Please confirm zipcode!'));
     $this->validatorSchema['pass_day_phone'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['pass_day_comment'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['pass_eve_phone'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['pass_eve_comment'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['pass_mobile_phone'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['pass_mobile_comment'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['pass_pager_phone'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['pass_pager_comment'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['pass_other_phone'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['pass_other_comment'] = new sfValidatorString(array('required' => false));
     $this->validatorSchema['pass_email'] = new sfValidatorEmail(array('required' => false), array('invalid' => 'Invalid secondary email !'));
     $this->validatorSchema['pass_weight'] = new sfValidatorInteger(array('required' => false));
     $this->validatorSchema['pass_height'] = new sfValidatorInteger(array('required' => false));
     # Descriptive message
     $this->widgetSchema->setNameFormat('miss_req_temp2[%s]');
 }
 /**
  * Retrieve multiple objects by pkey.
  *
  * @param      array $pks List of primary keys
  * @param      PropelPDO $con the connection to use
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function retrieveByPKs($pks, PropelPDO $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(PassengerIllnessCategoryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(PassengerIllnessCategoryPeer::DATABASE_NAME);
         $criteria->add(PassengerIllnessCategoryPeer::ID, $pks, Criteria::IN);
         $objs = PassengerIllnessCategoryPeer::doSelect($criteria, $con);
     }
     return $objs;
 }