public function configure() { unset($this['id'], $this['releasing_physician'], $this['releasing_phone'], $this['releasing_fax1'], $this['releasing_fax1_comment'], $this['releasing_email'], $this['medical_release_requested'], $this['medical_release_received'], $this['treating_physician'], $this['treating_phone'], $this['person_id'], $this['passenger_type_id'], $this['parent'], $this['date_of_birth'], $this['weight'], $this['illness'], $this['passenger_illness_category_id'], $this['language_spoken'], $this['best_contact_method'], $this['financial'], $this['public_considerations'], $this['private_considerations'], $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['requester_id'], $this['facility_name'], $this['camp_passenger_list'], $this['camp_pilot_passenger_list']); $pass_types = PassengerTypePeer::getForSelectParent(); $persons = PersonPeer::getNotInPassenger(); # Fields $this->widgetSchema['ground_transportation_comment'] = new sfWidgetFormTextarea(array()); $this->widgetSchema['travel_history_notes'] = new sfWidgetFormTextarea(array()); $this->widgetSchema['need_medical_release'] = new sfWidgetFormChoice(array('choices' => array('1' => 'yes', '0' => 'no'), 'expanded' => false)); $this->widgetSchema['treating_fax1'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['treating_fax1_comment'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['treating_email'] = new sfWidgetFormInput(array(), array('class' => 'text')); # Labels $this->widgetSchema->setLabels(array('ground_transportation_comment' => 'Ground Transportation')); $this->widgetSchema->setLabels(array('travel_history_notes' => 'Travel History Notes')); $this->widgetSchema->setLabels(array('need_medical_release' => 'Med Release Required')); $this->widgetSchema->setLabels(array('treating_fax1' => 'Fax Number')); $this->widgetSchema->setLabels(array('treating_fax1_comment' => 'Comment')); $this->widgetSchema->setLabels(array('treating_email' => 'Email')); # Validation $this->validatorSchema['ground_transportation_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['travel_history_notes'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['need_medical_release'] = new sfValidatorInteger(array('required' => false)); $this->validatorSchema['treating_fax1'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_fax1_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_email'] = new sfValidatorEmail(array('required' => false), array('invalid' => 'Invalid email !')); # Descriptive message #help $this->widgetSchema->setHelp('weight', 'lbs.'); $this->widgetSchema->setNameFormat('pass5_4[%s]'); }
public function configure() { unset($this['id'], $this['person_id'], $this['passenger_type_id'], $this['parent'], $this['date_of_birth'], $this['weight'], $this['illness'], $this['passenger_illness_category_id'], $this['language_spoken'], $this['best_contact_method'], $this['financial'], $this['public_considerations'], $this['private_considerations'], $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['requester_id'], $this['facility_name'], $this['camp_passenger_list'], $this['camp_pilot_passenger_list']); $pass_types = PassengerTypePeer::getForSelectParent(); $phone_options = array('mask' => '(999) 999-9999', 'ok_class' => 'field_ok', 'holder_class' => 'field_hold'); # Fields $this->widgetSchema['ground_transportation_comment'] = new sfWidgetFormTextarea(array(), array('class' => 'text')); $this->widgetSchema['travel_history_notes'] = new sfWidgetFormTextarea(array(), array('class' => 'text')); $this->widgetSchema['releasing_physician'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['releasing_phone'] = new widgetFormInputPhone($phone_options, array('class' => 'text narrow')); $this->widgetSchema['releasing_fax1'] = new widgetFormInputPhone($phone_options, array('class' => 'text narrow')); $this->widgetSchema['releasing_fax1_comment'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['releasing_email'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['need_medical_release'] = new sfWidgetFormInputCheckbox(array(), array('value' => 1)); $this->widgetSchema['medical_release_requested'] = new widgetFormDate(array('change_year' => true, 'change_month' => true, 'format_date' => array('js' => 'mm/dd/yy', 'php' => 'm/d/Y')), array('class' => 'text narrow')); $this->widgetSchema['medical_release_received'] = new widgetFormDate(array('change_year' => true, 'change_month' => true, 'format_date' => array('js' => 'mm/dd/yy', 'php' => 'm/d/Y')), array('class' => 'text narrow')); $this->widgetSchema['treating_physician'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['treating_phone'] = new widgetFormInputPhone($phone_options, array('class' => 'text narrow')); $this->widgetSchema['treating_fax1'] = new widgetFormInputPhone($phone_options, array('class' => 'text narrow')); $this->widgetSchema['treating_fax1_comment'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['treating_email'] = new sfWidgetFormInput(array(), array('class' => 'text')); # Labels $this->widgetSchema->setLabels(array('ground_transportation_comment' => 'Ground Transportation')); $this->widgetSchema->setLabels(array('travel_history_notes' => 'Travel History Notes')); $this->widgetSchema->setLabels(array('releasing_physician' => 'Name')); $this->widgetSchema->setLabels(array('releasing_phone' => 'Phone')); $this->widgetSchema->setLabels(array('releasing_fax1' => 'Fax Number')); $this->widgetSchema->setLabels(array('releasing_fax1_comment' => 'Comment')); $this->widgetSchema->setLabels(array('releasing_email' => 'Email')); $this->widgetSchema->setLabels(array('need_medical_release' => 'Med Release Required')); $this->widgetSchema->setLabels(array('medical_release_requested' => 'Medical Release Requested')); $this->widgetSchema->setLabels(array('medical_release_received' => 'Medical Release Received')); $this->widgetSchema->setLabels(array('treating_physician' => 'Name')); $this->widgetSchema->setLabels(array('treating_phone' => 'Phone')); $this->widgetSchema->setLabels(array('treating_fax1' => 'Fax Number')); $this->widgetSchema->setLabels(array('treating_fax1_comment' => 'Comment')); $this->widgetSchema->setLabels(array('treating_email' => 'Email')); # Validation $this->validatorSchema['ground_transportation_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['travel_history_notes'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['releasing_physician'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['releasing_phone'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['releasing_fax1'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['releasing_fax1_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['releasing_email'] = new sfValidatorEmail(array('required' => false), array('invalid' => 'Invalid email !')); $this->validatorSchema['need_medical_release'] = new sfValidatorInteger(array('required' => false)); $this->validatorSchema['medical_release_requested'] = new sfValidatorDate(array('max' => time(), 'required' => false)); $this->validatorSchema['medical_release_received'] = new sfValidatorDate(array('max' => time(), 'required' => false)); $this->validatorSchema['treating_physician'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_phone'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_fax1'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_fax1_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_email'] = new sfValidatorEmail(array('required' => false), array('invalid' => 'Invalid email !')); # Descriptive message #help $this->setDefault('need_medical_release', 1); $this->setDefault('medical_release_requested', date("m/d/y")); $this->widgetSchema->setNameFormat('pass2[%s]'); $this->disableCSRFProtection(); }
public function configure() { unset($this['id']); $pass_types = PassengerTypePeer::getForSelectParent(); $countries = sfConfig::get('app_countries', array('United States' => 'United States')); $phone_options = array('mask' => '(999) 999-9999', 'ok_class' => 'field_ok', 'holder_class' => 'field_hold'); # Fields $this->widgetSchema['name'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['address1'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['address2'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['city'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['county'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['state'] = new sfWidgetFormInput(array(), array('class' => 'text narrow')); $this->widgetSchema['country'] = new sfWidgetFormSelect(array('choices' => $countries), array('class' => 'text narrow')); $this->widgetSchema['zipcode'] = new widgetFormInputZipcode(array(), array('class' => 'text narrow')); $this->widgetSchema['phone'] = new widgetFormInputPhone($phone_options, array('class' => 'text narrow')); $this->widgetSchema['comment'] = new sfWidgetFormTextarea(array(), array('class' => 'text')); $this->widgetSchema['fax_phone'] = new widgetFormInputPhone($phone_options, array('class' => 'text narrow')); $this->widgetSchema['fax_comment'] = new sfWidgetFormTextarea(array(), array('class' => 'text')); $this->widgetSchema['email'] = new sfWidgetFormInput(array(), array('class' => 'text')); # Labels $this->widgetSchema->setLabels(array('name' => 'Name')); $this->widgetSchema->setLabels(array('address1' => 'Address ')); $this->widgetSchema->setLabels(array('address2' => 'Address')); $this->widgetSchema->setLabels(array('city' => 'City')); $this->widgetSchema->setLabels(array('county' => 'County')); $this->widgetSchema->setLabels(array('state' => 'State')); $this->widgetSchema->setLabels(array('country' => 'Country')); $this->widgetSchema->setLabels(array('zipcode' => 'Zipcode')); $this->widgetSchema->setLabels(array('phone' => 'Phone')); $this->widgetSchema->setLabels(array('comment' => 'Comment')); $this->widgetSchema->setLabels(array('fax_phone' => 'Fax Phone')); $this->widgetSchema->setLabels(array('fax_comment' => 'Fax Comment')); $this->widgetSchema->setLabels(array('email' => 'Email')); # Validation $this->validatorSchema['name'] = new sfValidatorString(array('required' => true), array('required' => 'Please confirm name !')); $this->validatorSchema['address1'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['address2'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['city'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['county'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['state'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['country'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['zipcode'] = new validatorZipcode(array('required' => false), array('max_length' => 10, 'min_length' => 5)); $this->validatorSchema['phone'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['fax_phone'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['fax_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['email'] = new sfValidatorEmail(array('required' => false), array('invalid' => 'Invalid email !')); # Descriptive message #help $this->widgetSchema->setHelp('weight', 'lbs.'); $this->widgetSchema->setNameFormat('agency[%s]'); }
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(); # Fields $this->widgetSchema['passenger_type_id'] = new sfWidgetFormChoice(array('choices' => $pass_types), array('class' => 'text')); $this->widgetSchema['parent'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['date_of_birth'] = new widgetFormDate(array('change_year' => true, 'change_month' => true, 'format_date' => array('js' => 'mm/dd/yy', 'php' => 'm/d/Y')), array('class' => 'text narrow')); $this->widgetSchema['weight'] = new sfWidgetFormInput(array(), array('class' => 'text narrow')); $this->widgetSchema['illness'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['passenger_illness_category_id'] = new sfWidgetFormPropelChoice(array('model' => 'PassengerIllnessCategory', 'add_empty' => '-- select --'), array('class' => 'text')); $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), array('invalid' => 'Weight must be in number format !')); $this->validatorSchema['illness'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['passenger_illness_category_id'] = new sfValidatorPropelChoice(array('model' => 'PassengerIllnessCategory', 'column' => 'id', 'required' => false, 'empty_value' => null)); $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('pass1[%s]'); $this->disableCSRFProtection(); }
public function configure() { unset($this['id'], $this['person_id'], $this['passenger_type_id'], $this['parent'], $this['date_of_birth'], $this['weight'], $this['illness'], $this['passenger_illness_category_id'], $this['language_spoken'], $this['best_contact_method'], $this['financial'], $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['requester_id'], $this['facility_name'], $this['camp_passenger_list'], $this['camp_pilot_passenger_list']); $pass_types = PassengerTypePeer::getForSelectParent(); # Fields $this->widgetSchema['public_considerations'] = new sfWidgetFormTextarea(array(), array('class' => 'text')); $this->widgetSchema['private_considerations'] = new sfWidgetFormTextarea(array(), array('class' => 'text')); $this->widgetSchema['ground_transportation_comment'] = new sfWidgetFormTextarea(array(), array('class' => 'text')); $this->widgetSchema['travel_history_notes'] = new sfWidgetFormTextarea(array(), array('class' => 'text')); # Labels $this->widgetSchema->setLabels(array('ground_transportation_comment' => 'Ground Transportation')); $this->widgetSchema->setLabels(array('travel_history_notes' => 'Travel History Notes')); $this->widgetSchema->setLabels(array('public_considerations' => 'Public Considerations')); $this->widgetSchema->setLabels(array('private_considerations' => 'Private Considerations')); # Validation $this->validatorSchema['public_considerations'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['private_considerations'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['ground_transportation_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['travel_history_notes'] = new sfValidatorString(array('required' => false)); $this->widgetSchema->setNameFormat('pass_popup2[%s]'); }
public function configure() { unset($this['id'], $this['requester_id'], $this['requester_date'], $this['baggage_weight'], $this['baggage_desc'], $this['pass_county'], $this['req_title'], $this['req_county'], $this['req_country'], $this['req_day_phone'], $this['orgin_ident'], $this['orgin_id'], $this['dest_ident'], $this['dest_id'], $this['req_language'], $this['comment'], $this['processed_date'], $this['session_id'], $this['ip_address'], $this['pass_fax_phone1'], $this['pass_fax_comment1'], $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['req_fax_phone1'], $this['req_fax_comment1'], $this['afa_org_id'], $this['afa_org_mission_id'], $this['mission_request_type_id'], $this['last_page_processed'], $this['on_behalf'], $this['request_by'], $this['follow_up_contact_name'], $this['follow_up_contact_phone'], $this['follow_up_email'], $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_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['pass_english'], $this['pass_oxygen'], $this['referral_source_id'], $this['miss_req_orginator_afa_org_id'], $this['_csrf_token'], $this['com1_name'], $this['com1_relationship'], $this['com1_date_of_birth'], $this['com1_weigth'], $this['com1_phone'], $this['com1_comment'], $this['com2_name'], $this['com2_relationship'], $this['com2_date_of_birth'], $this['com2_weigth'], $this['com2_phone'], $this['com2_comment'], $this['com3_name'], $this['com3_relationship'], $this['com3_date_of_birth'], $this['com3_weigth'], $this['com3_phone'], $this['com3_comment'], $this['com4_name'], $this['com4_relationship'], $this['com4_date_of_birth'], $this['com4_weigth'], $this['com4_phone'], $this['com4_comment'], $this['com5_name'], $this['com5_relationship'], $this['com5_date_of_birth'], $this['com5_weigth'], $this['com5_phone'], $this['com5_comment'], $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')); # 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), array('class' => 'text narrow')); $this->widgetSchema['pass_type'] = new sfWidgetFormSelect(array('choices' => $passenger_types), array('class' => 'text narrow')); $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 narrow')); $this->widgetSchema['pass_zipcode'] = new widgetFormInputZipcode(array(), array('class' => 'text narrow')); $this->widgetSchema['pass_country'] = new sfWidgetFormSelect(array('choices' => $countries), array('class' => 'text narrow')); $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['best_contact'] = new sfWidgetFormTextarea(array(), array('class' => 'text')); $this->widgetSchema['illness'] = new sfWidgetFormTextarea(array(), array('class' => 'text')); $this->widgetSchema['financial'] = new sfWidgetFormTextarea(array(), array('class' => 'text')); $this->widgetSchema['pass_private_cons'] = new sfWidgetFormTextarea(array(), array('class' => 'text')); //not have $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')); $this->widgetSchema['pass_medical'] = new sfWidgetFormInputCheckbox(array(), array('value' => 1)); $this->widgetSchema['pass_language'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['pass_date_of_birth'] = new widgetFormDate(array('change_year' => true, 'change_month' => true, 'format_date' => array('js' => 'mm/dd/yy', 'php' => 'm/d/Y')), array('class' => 'text narrow')); $this->widgetSchema['releasing_physician'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['release_phone'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow')); $this->widgetSchema['release_phone_comment'] = new sfWidgetFormInput(array(), array('class' => 'text narrow')); $this->widgetSchema['release_fax'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow')); $this->widgetSchema['release_fax_comment'] = new sfWidgetFormInput(array(), array('class' => 'text narrow')); $this->widgetSchema['release_email'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['treating_physician'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['treating_phone'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow')); $this->widgetSchema['treating_phone_comment'] = new sfWidgetFormInput(array(), array('class' => 'text narrow')); $this->widgetSchema['treating_fax'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow')); $this->widgetSchema['treating_fax_comment'] = new sfWidgetFormInput(array(), array('class' => 'text narrow')); $this->widgetSchema['treating_email'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['facility_name'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['facility_phone'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow')); $this->widgetSchema['facility_phone_comment'] = new sfWidgetFormInput(array(), array('class' => 'text narrow')); $this->widgetSchema['lodging_name'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['lodging_phone'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow')); $this->widgetSchema['lodging_phone_comment'] = new sfWidgetFormInput(array(), array('class' => 'text narrow')); $this->widgetSchema['emergency_name'] = new sfWidgetFormInput(array(), array('class' => 'text')); $this->widgetSchema['emergency_phone1'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow')); $this->widgetSchema['emergency_phone1_comment'] = new sfWidgetFormInput(array(), array('class' => 'text narrow')); $this->widgetSchema['emergency_phone2'] = new widgetFormInputPhone($phone_widget_options, array('class' => 'text narrow')); $this->widgetSchema['emergency_phone2_comment'] = new sfWidgetFormInput(array(), array('class' => 'text narrow')); # Labels $this->widgetSchema->setLabels(array('pass_title' => 'Title')); $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_gender' => 'Gender')); $this->widgetSchema->setLabels(array('pass_type' => 'Passenger Type')); $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_country' => 'Country')); $this->widgetSchema->setLabels(array('pass_email' => 'Email')); $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('best_contact' => 'Best Contact Method')); $this->widgetSchema->setLabels(array('illness' => 'Illness')); $this->widgetSchema->setLabels(array('financial' => 'Financial Condition')); $this->widgetSchema->setLabels(array('pass_private_cons' => 'Private Considerations')); $this->widgetSchema->setLabels(array('pass_public_cons' => 'Public Considerations')); $this->widgetSchema->setLabels(array('pass_medical' => 'Passenger Requires Medical Release?')); $this->widgetSchema->setLabels(array('pass_language' => 'Primary Language')); $this->widgetSchema->setLabels(array('pass_date_of_birth' => 'Date of Birth')); $this->widgetSchema->setLabels(array('releasing_physician' => 'Releasing Physican')); $this->widgetSchema->setLabels(array('release_phone' => 'Releasing Phone')); $this->widgetSchema->setLabels(array('release_phone_comment' => 'Comment')); $this->widgetSchema->setLabels(array('release_fax' => 'Releasing Fax')); $this->widgetSchema->setLabels(array('release_fax_comment' => 'Comment')); $this->widgetSchema->setLabels(array('release_email' => 'Email')); $this->widgetSchema->setLabels(array('treating_physician' => 'Name')); $this->widgetSchema->setLabels(array('treating_phone' => 'Phone')); $this->widgetSchema->setLabels(array('treating_phone_comment' => 'Comment')); $this->widgetSchema->setLabels(array('treating_fax' => 'Fax')); $this->widgetSchema->setLabels(array('treating_fax_comment' => 'Comment')); $this->widgetSchema->setLabels(array('treating_email' => 'Email')); $this->widgetSchema->setLabels(array('facility_name' => 'Name')); $this->widgetSchema->setLabels(array('facility_phone' => 'Phone')); $this->widgetSchema->setLabels(array('facility_phone_comment' => 'Comment')); $this->widgetSchema->setLabels(array('lodging_name' => 'Lodging Name')); $this->widgetSchema->setLabels(array('lodging_phone' => 'Phone')); $this->widgetSchema->setLabels(array('lodging_phone_comment' => 'Comment')); $this->widgetSchema->setLabels(array('emergency_name' => 'Emergency Name')); $this->widgetSchema->setLabels(array('emergency_phone1' => 'Primary Phone')); $this->widgetSchema->setLabels(array('emergency_phone1_comment' => 'Comment')); $this->widgetSchema->setLabels(array('emergency_phone2' => 'Secondary Phone')); $this->widgetSchema->setLabels(array('emergency_phone2_comment' => 'Comment')); $this->widgetSchema->setLabels(array('pass_weight' => 'Weigth')); $this->widgetSchema->setLabels(array('pass_height' => 'Heigth')); # Validation $this->validatorSchema['pass_title'] = new sfValidatorString(array('required' => true), array('required' => 'Please confirm title !')); $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_gender'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['pass_type'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['pass_address1'] = new sfValidatorString(array('required' => true), array('required' => 'Please confirm address !')); $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_country'] = new validatorZipcode(array('required' => true), array('max_length' => 10, 'min_length' => 5, 'required' => 'Please confirm country!')); $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['best_contact'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['illness'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['financial'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['pass_private_cons'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['pass_public_cons'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['pass_medical'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['pass_language'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['pass_date_of_birth'] = new sfValidatorDate(array('max' => time(), 'required' => false), array('invalid' => 'Date of birth is invalid !.')); $this->validatorSchema['releasing_physician'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['release_phone_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['release_fax'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['release_fax_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['release_email'] = new sfValidatorEmail(array('required' => false), array('invalid' => 'Invalid release email !')); $this->validatorSchema['treating_physician'] = new validatorZipcode(array('required' => false), array('max_length' => 10, 'min_length' => 5)); $this->validatorSchema['treating_phone'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_phone_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_fax'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_fax_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_email'] = new sfValidatorEmail(array('required' => false), array('invalid' => 'Invalid treating email !')); $this->validatorSchema['facility_name'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['facility_phone'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['facility_phone_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['lodging_name'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['lodging_phone'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['lodging_phone_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['emergency_name'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['emergency_phone1'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['emergency_phone1_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['emergency_phone2'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['emergency_phone2_comment'] = new sfValidatorString(array('required' => false)); $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_temp6[%s]'); }
public function configure() { unset($this['id'], $this['person_id'], $this['camp_passenger_list'], $this['camp_pilot_passenger_list']); $pass_types = PassengerTypePeer::getForSelectParent(); $persons = PersonPeer::getNotInPassenger(); # Fields $this->widgetSchema['person_id'] = new sfWidgetFormChoice(array('choices' => $persons)); $this->widgetSchema['passenger_type_id'] = new sfWidgetFormChoice(array('choices' => $pass_types)); $this->widgetSchema['parent'] = new sfWidgetFormInput(); $this->widgetSchema['date_of_birth'] = new sfWidgetFormInput(); $this->widgetSchema['weight'] = new sfWidgetFormInput(); $this->widgetSchema['illness'] = new sfWidgetFormInput(); $this->widgetSchema['passenger_illness_category_id'] = new sfWidgetFormChoice(array('choices' => array('Command pilot' => 'Command pilot', 'Orientation Complete' => 'Orientation Complete', 'Verify Orientation' => 'Verify Orientation', 'Non-pilot' => 'Non-pilot', 'Ground Angel' => 'Ground Angel', 'Mission Assistant' => 'Mission Assistant'), 'expanded' => false)); $this->widgetSchema['language_spoken'] = new sfWidgetFormInput(); $this->widgetSchema['best_contact_method'] = new sfWidgetFormInput(); $this->widgetSchema['financial'] = new sfWidgetFormTextarea(array(), array('size' => 80)); $this->widgetSchema['public_considerations'] = new sfWidgetFormTextarea(array(), array('size' => 80)); $this->widgetSchema['private_considerations'] = new sfWidgetFormTextarea(array(), array('size' => 80)); $this->widgetSchema['ground_transportation_comment'] = new sfWidgetFormTextarea(array(), array('size' => 80)); $this->widgetSchema['travel_history_notes'] = new sfWidgetFormTextarea(array(), array('size' => 80)); $this->widgetSchema['releasing_physician'] = new sfWidgetFormInput(); $this->widgetSchema['releasing_phone'] = new sfWidgetFormInput(); $this->widgetSchema['releasing_fax1'] = new sfWidgetFormInput(); $this->widgetSchema['releasing_fax1_comment'] = new sfWidgetFormInput(); $this->widgetSchema['releasing_email'] = new sfWidgetFormInput(); $this->widgetSchema['need_medical_release'] = new sfWidgetFormInputCheckbox(); $this->widgetSchema['medical_release_requested'] = new sfWidgetFormInput(); $this->widgetSchema['medical_release_received'] = new sfWidgetFormInput(); $this->widgetSchema['treating_physician'] = new sfWidgetFormInput(); $this->widgetSchema['treating_phone'] = new sfWidgetFormInput(); $this->widgetSchema['treating_fax1'] = new sfWidgetFormInput(); $this->widgetSchema['treating_fax1_comment'] = new sfWidgetFormInput(); $this->widgetSchema['treating_email'] = new sfWidgetFormInput(); $this->widgetSchema['lodging_name'] = new sfWidgetFormInput(); $this->widgetSchema['lodging_phone'] = new sfWidgetFormInput(); $this->widgetSchema['lodging_phone_comment'] = new sfWidgetFormInput(); $this->widgetSchema['facility_phone'] = new sfWidgetFormInput(); $this->widgetSchema['facility_city'] = new sfWidgetFormInput(); $this->widgetSchema['facility_state'] = new sfWidgetFormInput(); $this->widgetSchema['facility_phone_comment'] = new sfWidgetFormInput(); $this->widgetSchema['emergency_contact_name'] = new sfWidgetFormInput(); $this->widgetSchema['emergency_contact_primary_phone'] = new sfWidgetFormInput(); $this->widgetSchema['emergency_contact_primary_comment'] = new sfWidgetFormInput(); $this->widgetSchema['emergency_contact_secondary_phone'] = new sfWidgetFormInput(); $this->widgetSchema['emergency_contact_secondary_comment'] = new sfWidgetFormInput(); # Labels $this->widgetSchema->setLabels(array('person_id' => 'Person')); $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')); $this->widgetSchema->setLabels(array('ground_transportation_comment' => 'Ground Transportation')); $this->widgetSchema->setLabels(array('travel_history_notes' => 'Travel History Notes')); $this->widgetSchema->setLabels(array('releasing_physician' => 'Name')); $this->widgetSchema->setLabels(array('releasing_phone' => 'Phone')); $this->widgetSchema->setLabels(array('releasing_fax1' => 'Fax Number')); $this->widgetSchema->setLabels(array('releasing_fax1_comment' => 'Comment')); $this->widgetSchema->setLabels(array('releasing_email' => 'Email')); $this->widgetSchema->setLabels(array('need_medical_release' => 'Med Release Required')); $this->widgetSchema->setLabels(array('medical_release_requested' => 'Medical Release Requested')); $this->widgetSchema->setLabels(array('medical_release_received' => 'Medical Release Received')); $this->widgetSchema->setLabels(array('treating_physician' => 'Name')); $this->widgetSchema->setLabels(array('treating_phone' => 'Phone')); $this->widgetSchema->setLabels(array('treating_fax1' => 'Fax Number')); $this->widgetSchema->setLabels(array('treating_fax1_comment' => 'Comment')); $this->widgetSchema->setLabels(array('treating_email' => 'Email')); $this->widgetSchema->setLabels(array('lodging_name' => 'Name')); $this->widgetSchema->setLabels(array('lodging_phone' => 'Phone')); $this->widgetSchema->setLabels(array('lodging_phone_comment' => 'Phone Comment')); $this->widgetSchema->setLabels(array('facility_name' => 'Name')); $this->widgetSchema->setLabels(array('facility_city' => 'Destination City')); $this->widgetSchema->setLabels(array('facility_state' => 'Destination State')); $this->widgetSchema->setLabels(array('facility_phone' => 'Phone')); $this->widgetSchema->setLabels(array('facility_phone_comment' => 'Phone Comment')); $this->widgetSchema->setLabels(array('emergency_contact_name' => 'Emergency Contact Name')); $this->widgetSchema->setLabels(array('emergency_contact_primary_phone' => 'Primary Phone')); $this->widgetSchema->setLabels(array('emergency_contact_primary_comment' => 'Comment')); $this->widgetSchema->setLabels(array('emergency_contact_secondary_phone' => 'Secondary Phone')); $this->widgetSchema->setLabels(array('emergency_contact_secondary_comment' => 'Comment')); # Validation $this->validatorSchema['person_id'] = new sfValidatorInteger(array('required' => true)); $this->validatorSchema['passenger_type_id'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['parent'] = new sfValidatorString(array('required' => true), 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)); $this->validatorSchema['ground_transportation_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['travel_history_notes'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['releasing_physician'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['releasing_phone'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['releasing_fax1'] = new sfValidatorInteger(array('required' => false)); $this->validatorSchema['releasing_fax1_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['releasing_email'] = new sfValidatorEmail(array('required' => false), array('invalid' => 'Invalid email !')); $this->validatorSchema['need_medical_release'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['medical_release_requested'] = new sfValidatorDate(array('max' => time(), 'required' => false)); $this->validatorSchema['medical_release_received'] = new sfValidatorDate(array('max' => time(), 'required' => false)); $this->validatorSchema['treating_physician'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_phone'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_fax1'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_fax1_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['treating_email'] = new sfValidatorEmail(array('required' => false), array('invalid' => 'Invalid email !')); $this->validatorSchema['lodging_name'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['lodging_phone'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['facility_name'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['facility_city'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['facility_state'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['facility_phone'] = new sfValidatorInteger(array('required' => false)); $this->validatorSchema['facility_phone_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['emergency_contact_name'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['emergency_contact_primary_phone'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['emergency_contact_primary_comment'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['emergency_contact_secondary_phone'] = new sfValidatorString(array('required' => false)); $this->validatorSchema['emergency_contact_secondary_comment'] = new sfValidatorString(array('required' => false)); # Descriptive message #help $this->widgetSchema->setHelp('weight', 'lbs.'); $this->widgetSchema->setNameFormat('pass[%s]'); }
/** * 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; }