From: Steve Sutton Date: Fri, 12 Dec 2014 14:03:33 +0000 (-0500) Subject: Clean up how to pull in the setting files and thier location X-Git-Tag: v1.0.1~28 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=c2731333b94c302b8ab5623a348d8857e3e54e4b;p=WP-Plugins%2Fglm-employment.git Clean up how to pull in the setting files and thier location starts with form 1 using settings1.php and so on... --- diff --git a/config/settings1.php b/config/settings1.php new file mode 100644 index 0000000..88c13ad --- /dev/null +++ b/config/settings1.php @@ -0,0 +1,378 @@ + 'text', + 'name' => 'fname', + 'label' => 'First Name', + 'grid' => 5, + 'req' => true +]; +$lname = [ + 'type' => 'text', + 'name' => 'lname', + 'label' => 'Last Name', + 'grid' => 5 +]; +$mname = [ + 'type' => 'text', + 'name' => 'mname', + 'label' => 'Middle Name', + 'grid' => 2 +]; +$street = [ + 'type' => 'text', + 'name' => 'street', + 'label' => 'Street', + 'grid' => 3 +]; +$city = [ + 'type' => 'text', + 'name' => 'city', + 'label' => 'City', + 'grid' => 3 +]; +$state = [ + 'type' => 'text', + 'name' => 'state', + 'label' => 'State', + 'grid' => 3 +]; +$zip = [ + 'type' => 'text', + 'name' => 'zip', + 'label' => 'ZIP', + 'grid' => 3 +]; + +$phone = [ + 'type' => 'tel', + 'name' => 'phone', + 'label' => 'Phone', + 'grid' => 4 +]; +$altPhone = [ + 'type' => 'tel', + 'name' => 'alt_phone', + 'label' => 'Alternate Phone', + 'grid' => 4 +]; +$email = [ + 'type' => 'email', + 'name' => 'email', + 'label' => 'Email', + 'grid' => 4, + 'req' => true +]; +$over_18 = [ + 'type' => 'radio', + 'name' => 'over_18', + 'label' => 'Are you 18 years or older?', + 'grid' => 4, + 'req' => true, + 'opts' => [[ + 'name' => 'over_18_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'over_18_no', + 'label' => 'No', + 'value' => 0]] +]; +$us_citizen = [ + 'type' => 'radio', + 'name' => 'us_citizen', + 'label' => 'Are you an U.S. citizen?', + 'grid' => 4, + 'req' => true, + 'opts' => [[ + 'name' => 'us_citizen_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'us_citizen_no', + 'label' => 'No', + 'value' => 0]] +]; +$us_auth = [ + 'type' => 'radio', + 'name' => 'us_auth', + 'label' => 'Are you authorized to work in the United States?', + 'grid' => 4, + 'req' => true, + 'opts' => [[ + 'name' => 'us_auth_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'us_auth_no', + 'label' => 'No', + 'value' => 0]] +]; +$employed_before = [ + 'type' => 'radio', + 'name' => 'employed_before', + 'label' => 'Have you been previously employed here?', + 'grid' => 6, + 'req' => true, + 'opts' => [[ + 'name' => 'employed_before_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'employed_before_no', + 'label' => 'No', + 'value' => 0]] +]; +$employed_before_dates = [ + 'type' => 'text', + 'name' => 'employed_before_dates', + 'label' => 'If yes, date(s)', + 'grid' => 6 +]; +$supervisor = [ + 'type' => 'text', + 'name' => 'supervisor', + 'label' => 'Supervisor Name(s)', + 'grid' => 12 +]; +$applied_before = [ + 'type' => 'radio', + 'name' => 'applied_before', + 'label' => 'Have you ever applied to this Company before?', + 'grid' => 6, + 'req' => true, + 'opts' => [[ + 'name' => 'applied_before_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'applied_before_no', + 'label' => 'No', + 'value' => 0]] +]; +$applied_before_dates = [ + 'type' => 'text', + 'name' => 'applied_before_dates', + 'label' => 'Where?', + 'grid' => 6 +]; +$applied_before_under_what_name = [ + 'type' => 'text', + 'name' => 'applied_before_under_what_name', + 'label' => 'Under what name?', + 'grid' => 6 +]; +$applied_before_when = [ + 'type' => 'text', + 'name' => 'applied_before_when', + 'label' => 'When?', + 'grid' => 6 +]; +$list_any_friends = [ + 'type' => 'text', + 'name' => 'list_any_friends', + 'label' => 'List any friends or relatives working here', + 'grid' => 12 +]; +$have_drivers_license = [ + 'type' => 'radio', + 'name' => 'have_drivers_license', + 'label' => 'DO YOU HAVE A DRIVER\'S LICENSE?', + 'grid' => 6, + 'req' => true, + 'opts' => [[ + 'name' => 'have_drivers_license_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'have_drivers_license_no', + 'label' => 'No', + 'value' => 0]] +]; +$means_of_travel = [ + 'type' => 'text', + 'name' => 'means_of_travel', + 'label' => 'What is your means of transportation to work?', + 'grid' => 6 +]; +$drivers_license = [ + 'type' => 'text', + 'name' => 'drivers_license', + 'label' => 'Driver\'/s License Number', + 'grid' => 6 +]; +$license_state = [ + 'type' => 'text', + 'name' => 'license_state', + 'label' => 'State of issue', + 'grid' => 6 +]; +$license_type = [ + 'type' => 'radio', + 'name' => 'license_type', + 'label' => 'Drivers License', + 'grid' => 6, + 'req' => true, + 'opts' => [[ + 'name' => 'license_type_operator', + 'label' => 'Operator', + 'value' => 'Operator' + ],[ + 'name' => 'license_type_commercial', + 'label' => 'Commercial', + 'value' => 'Commercial' + ],[ + 'name' => 'license_type_chauffeur', + 'label' => 'Chauffeur', + 'value' => 'Chauffeur']] +]; +$license_exp_date = [ + 'type' => 'text', + 'name' => 'license_exp_date', + 'label' => 'Expiration date', + 'grid' => 6 +]; +$had_accident_in_past_three_years = [ + 'type' => 'radio', + 'name' => 'had_accident_in_past_three_years', + 'label' => 'Have you had any accidents during the past three years?', + 'grid' => 8, + 'req' => true, + 'opts' => [[ + 'name' => 'had_accident_in_past_three_years_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'had_accident_in_past_three_years_no', + 'label' => 'No', + 'value' => 0]] +]; +$had_accident_in_past_three_years_how_many = [ + 'type' => 'text', + 'name' => 'had_accident_in_past_three_years_how_many', + 'label' => 'How Many', + 'grid' => 4 +]; +$had_violations_in_past_three_years = [ + 'type' => 'radio', + 'name' => 'had_violations_in_past_three_years', + 'label' => 'Have you had any moving violations during the past three years?', + 'grid' => 8, + 'req' => true, + 'opts' => [[ + 'name' => 'had_violations_in_past_three_years_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'had_violations_in_past_three_years_no', + 'label' => 'No', + 'value' => 0]] +]; +$had_violations_in_past_three_years_how_many = [ + 'type' => 'text', + 'name' => 'had_violations_in_past_three_years_how_many', + 'label' => 'How Many', + 'grid' => 4 +]; +if ($jobId = filter_var($_REQUEST['job'], FILTER_VALIDATE_INT)) { + $jobData = get_post($jobId); + $jobTitle = $jobData->post_title; +} +$position_applied_for = [ + 'type' => 'text', + 'name' => 'position_applied_for', + 'label' => 'Position Applied For', + 'grid' => 6, + 'value' => $jobTitle +]; +$date_available_for_work = [ + 'type' => 'text', + 'name' => 'date_available_for_work', + 'label' => 'Date Available to Work', + 'grid' => 6 +]; +$type_of_employment = [ + 'type' => 'checkbox', + 'name' => 'type_of_employment', + 'label' => 'Type of Employment', + 'grid' => 6, + 'req' => false, + 'opts' => [[ + 'name' => 'type_of_employment_fulltime', + 'label' => 'Full Time', + 'value' => 'Full Time' + ],[ + 'name' => 'type_of_employment_parttime', + 'label' => 'Part Time', + 'value' => 'Part Time' + ]] +]; +$salary_desired = [ + 'type' => 'text', + 'name' => 'salary_desired', + 'label' => 'Salary Desired', + 'grid' => 6 +]; +$location_preference = [ + 'type' => 'checkbox', + 'name' => 'location_preference', + 'label' => 'Location Preference', + 'grid' => 6, + 'req' => false, + 'opts' => [[ + 'name' => 'location_preference_petoskey', + 'label' => 'Petoskey', + 'value' => 'Petoskey' + ],[ + 'name' => 'location_preference_harborsprings', + 'label' => 'Harbor Springs', + 'value' => 'Harbor Springs' + ],[ + 'name' => 'location_preference_gaylord', + 'label' => 'Gaylord', + 'value' => 'Gaylord' + ]] +]; +$do_you_have_building_exp = [ + 'type' => 'radio', + 'name' => 'do_you_have_building_exp', + 'label' => 'Do you have experience in the building industry?', + 'grid' => 6, + 'req' => true, + 'opts' => [[ + 'name' => 'do_you_have_building_exp_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'do_you_have_building_exp_no', + 'label' => 'No', + 'value' => 0]] +]; +$special_training = [ + 'type' => 'textarea', + 'name' => 'special_training', + 'label' => 'Do you have any special training, skills, certifications, qualifications,' + . ' or other experiences that relate to the position(s) applied for?', + 'grid' => 12 +]; +$form = [ + ['type' => 'header', 'label' => 'Personal Information'], + [$fname, $lname, $mname], + [$street, $city, $state, $zip], + [$phone, $altPhone, $email], + [$over_18, $us_citizen, $us_auth], + [$employed_before, $employed_before_dates], + [$supervisor], + [$applied_before, $applied_before_dates], + [$applied_before_under_what_name, $applied_before_when], + [$list_any_friends], + [$have_drivers_license, $means_of_travel], + [$drivers_license, $license_state], + [$license_type, $license_exp_date], + [$had_accident_in_past_three_years, $had_accident_in_past_three_years_how_many], + [$had_violations_in_past_three_years, $had_violations_in_past_three_years_how_many], + ['type' => 'header', 'label' => 'Employment Desired'], + [$position_applied_for, $date_available_for_work], + [$type_of_employment, $salary_desired], + [$location_preference, $do_you_have_building_exp], + [$special_training] +]; diff --git a/config/settings2.php b/config/settings2.php new file mode 100644 index 0000000..b366864 --- /dev/null +++ b/config/settings2.php @@ -0,0 +1,349 @@ + 'text', + 'name' => 'date_of_birth', + 'label' => 'Date of Birth', + 'grid' => 2, + 'req' => true +]; +$date_of_birth_explain = [ + 'type' => 'static', + 'value' => '
The U.S. Department of Transportation requires that driver ' + . 'applicants state their date of birth §391.21(b)(2).
', + 'grid' => 10 +]; +$stateHdr = [ + 'type' => 'static', + 'label' => 'State', + 'grid' => 1, + 'req' => true +]; +$licenseHdr = [ + 'type' => 'static', + 'label' => 'License No.', + 'grid' => 4, + 'req' => true +]; +$classHdr = [ + 'type' => 'static', + 'label' => 'Class', + 'grid' => 1, + 'req' => true +]; +$endorsementHdr = [ + 'type' => 'static', + 'label' => 'Endorsement(s)', + 'grid' => 4, + 'req' => true +]; +$exp_dateHdr = [ + 'type' => 'static', + 'label' => 'Expiration Date', + 'grid' => 2, + 'req' => true +]; +for ($i = 1; $i <= 4; ++$i) { + $licenseReq = ($i == 1) ? true: false; + ${'state'.$i} = [ + 'type' => 'text', + 'name' => 'state' . $i, + 'label' => '', //'State', + 'grid' => 1, + 'req' => $licenseReq + ]; + ${'license'.$i} = [ + 'type' => 'text', + 'name' => 'license' . $i, + 'label' => '', //'License No.', + 'grid' => 4, + 'req' => $licenseReq + ]; + ${'class'.$i} = [ + 'type' => 'text', + 'name' => 'class' . $i, + 'label' => '', //'Class', + 'grid' => 1, + 'req' => $licenseReq + ]; + ${'endorsement'.$i} = [ + 'type' => 'text', + 'name' => 'endorsement' . $i, + 'label' => '', //'Endorsement(s)', + 'grid' => 4, + 'req' => $licenseReq + ]; + ${'exp_date'.$i} = [ + 'type' => 'text', + 'name' => 'exp_date' . $i, + 'label' => '', //'Expiration Date', + 'grid' => 2, + 'req' => $licenseReq + ]; +} +$denied_license = [ + 'type' => 'radio', + 'name' => 'denied_license', + 'label' => 'A. Have you ever been denied a license, permit or privilege to' + . 'operate a motor wehicle?', + 'grid' => 4, + 'req' => true, + 'opts' => [[ + 'name' => 'denied_license_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'denied_license_no', + 'label' => 'No', + 'value' => 0]] +]; +$suspended_license = [ + 'type' => 'radio', + 'name' => 'suspended_license', + 'label' => 'B. Has any license, permit or privilege ever been suspended or revoked?', + 'grid' => 4, + 'req' => true, + 'opts' => [[ + 'name' => 'suspended_license_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'suspended_license_no', + 'label' => 'No', + 'value' => 0]] +]; +$disqualified_license = [ + 'type' => 'radio', + 'name' => 'disqualified_license', + 'label' => 'C. Have you ever been disquelified for violations of the Federal' + . 'Mortor Carrier Safety Regulations?', + 'grid' => 4, + 'req' => true, + 'opts' => [[ + 'name' => 'disqualified_license_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'disqualified_license_no', + 'label' => 'No', + 'value' => 0]] +]; +$details_of_license = [ + 'type' => 'textarea', + 'name' => 'details_of_license', + 'label' => 'If you answered "yes" to A, B, C, give details', + 'grid' => 12 +]; +$titles = [ + 1 => 'Straight Truck', + 'Tractor and Semi Trailer', + 'Twin Trailers - LCV\'s', + 'Other' +]; +$eq_classHdr = [ + 'type' => 'static', + 'label' => 'Class of Equipment', + 'grid' => 3, + 'req' => false +]; +$eq_typeHdr = [ + 'type' => 'static', + 'label' => 'Type of Equipment (Van, Tank, Flat, etc.)', + 'grid' => 4, + 'req' => false +]; +$eq_dates_fromHdr = [ + 'type' => 'static', + 'label' => 'From', + 'grid' => 1, + 'req' => false +]; +$eq_dates_toHdr = [ + 'type' => 'static', + 'label' => 'To', + 'grid' => 1, + 'req' => false +]; +$eq_approx_milesHdr = [ + 'type' => 'static', + 'label' => 'Approximate total Miles', + 'grid' => 3, + 'req' => false +]; +for ($i = 1; $i <= 4; ++$i) { + ${'eq_class'.$i} = [ + 'type' => 'static', + 'label' => '', //'Class of Equipment', + 'value' => '
'.$titles[$i].'
', + 'grid' => 3 + ]; + ${'eq_type'.$i} = [ + 'type' => 'text', + 'name' => 'eq_type' . $i, + 'label' => '', //'Type of Equipment (Van, Tank, Flat, etc.)', + 'grid' => 4, + 'req' => false + ]; + ${'eq_dates_from'.$i} = [ + 'type' => 'text', + 'name' => 'eq_dates_from' . $i, + 'label' => '', //'From', + 'grid' => 1, + 'req' => false + ]; + ${'eq_dates_to'.$i} = [ + 'type' => 'text', + 'name' => 'eq_dates_to' . $i, + 'label' => '', //'To', + 'grid' => 1, + 'req' => false + ]; + ${'eq_approx_miles'.$i} = [ + 'type' => 'text', + 'name' => 'eq_approx_miles' . $i, + 'label' => '', //'Approximate total Miles', + 'grid' => 3, + 'req' => false + ]; +} +$last_5_years_states = [ + 'type' => 'textarea', + 'name' => 'last_5_years_states', + 'label' => 'List states operated in during last five years:', + 'grid' => 12 +]; +$special_drivers_training = [ + 'type' => 'textarea', + 'name' => 'last_5_years_states', + 'label' => 'List special courses or training that will help you as a driver:', + 'grid' => 12 +]; +$driving_awards = [ + 'type' => 'textarea', + 'name' => 'last_5_years_states', + 'label' => 'List driving awards held and who awards were presented by:', + 'grid' => 12 +]; + +$accident_review_dates = [ + 'type' => 'static', + 'label' => 'Dates

', + 'grid' => 3 +]; +$accident_review_nature = [ + 'type' => 'static', + 'label' => 'Nature of Accident (Head-on, Rear-End, Overturn, etc.)', + 'grid' => 3 +]; +$accident_review_fatalities = [ + 'type' => 'static', + 'label' => 'Fatalities

', + 'grid' => 3 +]; +$accident_review_injuries = [ + 'type' => 'static', + 'label' => 'Injuries

', + 'grid' => 3 +]; +for ($i = 1; $i <= 3; ++$i) { + ${'accident_review_dates'.$i} = [ + 'type' => 'text', + 'name' => 'accident_review_dates'.$i, + 'label' => '', + 'grid' => 3 + ]; + ${'accident_review_nature'.$i} = [ + 'type' => 'text', + 'name' => 'accident_review_nature'.$i, + 'label' => '', + 'grid' => 3 + ]; + ${'accident_review_fatalities'.$i} = [ + 'type' => 'text', + 'name' => 'accident_review_fatalities'.$i, + 'label' => '', + 'grid' => 3 + ]; + ${'accident_review_injuries'.$i} = [ + 'type' => 'text', + 'name' => 'accident_review_injuries'.$i, + 'label' => '', + 'grid' => 3 + ]; +} +$traffic_convictions_locations = [ + 'type' => 'static', + 'label' => 'Location', + 'grid' => 3 +]; +$traffic_convictions_date = [ + 'type' => 'static', + 'label' => 'Date', + 'grid' => 3 +]; +$traffic_convictions_charge = [ + 'type' => 'static', + 'label' => 'Charge', + 'grid' => 3 +]; +$traffic_convictions_penalty = [ + 'type' => 'static', + 'label' => 'Penalty', + 'grid' => 3 +]; +for ($i = 1; $i <= 3; ++$i) { + ${'traffic_convictions_locations'.$i} = [ + 'type' => 'text', + 'name' => 'traffic_convictions_locations'.$i, + 'label' => '', + 'grid' => 3 + ]; + ${'traffic_convictions_date'.$i} = [ + 'type' => 'text', + 'name' => 'traffic_convictions_date'.$i, + 'label' => '', + 'grid' => 3 + ]; + ${'traffic_convictions_charge'.$i} = [ + 'type' => 'text', + 'name' => 'traffic_convictions_charge'.$i, + 'label' => '', + 'grid' => 3 + ]; + ${'traffic_convictions_penalty'.$i} = [ + 'type' => 'text', + 'name' => 'traffic_convictions_penalty'.$i, + 'label' => '', + 'grid' => 3 + ]; +} +$form = [ + ['type' => 'header', 'label' => 'Driver Experience and Qualification'], + [$date_of_birth, $date_of_birth_explain], + ['type' => 'header', 'label' => 'Drivers Licenses held in past 3 years must be shown'], + [$stateHdr, $licenseHdr, $classHdr, $endorsementHdr, $exp_dateHdr], + [$state1, $license1, $class1, $endorsement1, $exp_date1], + [$state2, $license2, $class2, $endorsement2, $exp_date2], + [$state3, $license3, $class3, $endorsement3, $exp_date3], + [$state4, $license4, $class4, $endorsement4, $exp_date4], + [$denied_license, $suspended_license, $disqualified_license], + [$details_of_license], + ['type' => 'header', 'label' => 'Driving Experience'], + [$eq_classHdr, $eq_typeHdr, $eq_dates_fromHdr, $eq_dates_toHdr, $eq_approx_milesHdr], + [$eq_class1, $eq_type1, $eq_dates_from1, $eq_dates_to1, $eq_approx_miles1], + [$eq_class2, $eq_type2, $eq_dates_from2, $eq_dates_to2, $eq_approx_miles2], + [$eq_class3, $eq_type3, $eq_dates_from3, $eq_dates_to3, $eq_approx_miles3], + [$eq_class4, $eq_type4, $eq_dates_from4, $eq_dates_to4, $eq_approx_miles4], + [$last_5_years_states], + [$special_drivers_training], + [$driving_awards], + ['type' => 'header', 'label' => 'Accident Review for past 3 years'], + [$accident_review_dates,$accident_review_nature, $accident_review_fatalities, $accident_review_injuries], + [$accident_review_dates1,$accident_review_nature1, $accident_review_fatalities1, $accident_review_injuries1], + [$accident_review_dates2,$accident_review_nature2, $accident_review_fatalities2, $accident_review_injuries2], + [$accident_review_dates3,$accident_review_nature3, $accident_review_fatalities3, $accident_review_injuries3], + ['type' => 'header', 'label' => 'Traffic Convictions and Forfeitures', 'subheader' => 'for the past 3 years other than parking violations'], + [$traffic_convictions_locations, $traffic_convictions_date, $traffic_convictions_charge, $traffic_convictions_penalty], + [$traffic_convictions_locations1, $traffic_convictions_date1, $traffic_convictions_charge1, $traffic_convictions_penalty1], + [$traffic_convictions_locations2, $traffic_convictions_date2, $traffic_convictions_charge2, $traffic_convictions_penalty2], + [$traffic_convictions_locations3, $traffic_convictions_date3, $traffic_convictions_charge3, $traffic_convictions_penalty3], +]; diff --git a/config/settings3.php b/config/settings3.php new file mode 100644 index 0000000..48ebfb9 --- /dev/null +++ b/config/settings3.php @@ -0,0 +1,278 @@ + 'header', + 'label' => 'Current and Former Employers', + 'subheader' => '(List current or most cerent job first)', + 'notes' => 'Note to Driver Candidates: The U.S. Department of ' + . 'Transportation requires that driver applications show all employment for ' + . 'the past three years. They must also show commercial driver employment ' + . 'for the seven years immediately preceding this three year period. ' + . '§391.21(b)(10),(11). All Applicants: start with last, or current' + . ' position, and work back.' +]; +$titles = array_combine(range(1, 4), range(1, 4)); +$employment_titleHdr = [ + 'type' => 'static', + 'label' => ' ', + 'grid' => 1, + 'req' => false, + 'rcoll' => true +]; +$employment_datesHdr = [ + 'type' => 'static', + 'label' => 'Date Month/Year', + 'grid' => 2 +]; +$employment_infoHdr = [ + 'type' => 'static', + 'label' => 'Employer Name, Address, and Telephone', + 'grid' => 4 +]; +$employment_supervisorHdr = [ + 'type' => 'static', + 'label' => 'Supervisor', + 'grid' => 1 +]; +$employment_salaryHdr = [ + 'type' => 'static', + 'label' => 'Salary', + 'grid' => 1 +]; +$employment_positionHdr = [ + 'type' => 'static', + 'label' => 'Last Position Held & Work Performed', + 'grid' => 2 +]; +$employment_reasonHdr = [ + 'type' => 'static', + 'label' => 'Reason for Leaving', + 'grid' => 2 +]; +for ($i = 1; $i <= 4; ++$i) { + ${'employment_title'.$i} = [ + 'type' => 'static', + 'label' => ' ', + 'value' => '
'.$titles[$i].'
', + 'grid' => 1, + 'rcoll' => true + ]; + ${'employment_title_sub'.$i} = [ + 'type' => 'static', + 'label' => ' ', + 'value' => '', + 'grid' => 1, + 'rcoll' => true + ]; + ${'employment_dates_from'.$i} = [ + 'type' => 'text', + 'name' => 'employment_dates_from'.$i, + 'placeholder' => 'From:', + 'grid' => 2 + ]; + ${'employment_dates_to'.$i} = [ + 'type' => 'text', + 'name' => 'employment_dates_to'.$i, + 'placeholder' => 'To:', + 'grid' => 2 + ]; + ${'employment_info'.$i} = [ + 'type' => 'text', + 'name' => 'employment_info'.$i, +// 'placeholder' => ' ', + 'grid' => 4 + ]; + ${'employment_supervisor'.$i} = [ + 'type' => 'text', + 'name' => 'employment_supervisor'.$i, + 'placeholder' => 'Supervisor', + 'grid' => 4 + ]; + ${'employment_salary_start'.$i} = [ + 'type' => 'text', + 'name' => 'employment_salary_start'.$i, + 'placeholder' => 'Starting', + 'grid' => 1 + ]; + ${'employment_salary_end'.$i} = [ + 'type' => 'text', + 'name' => 'employment_salary_end'.$i, + 'placeholder' => 'Ending', + 'grid' => 1 + ]; + ${'employment_position'.$i} = [ + 'type' => 'text', + 'name' => 'employment_position'.$i, +// 'label' => ' ', + 'grid' => 2 + ]; + ${'employment_position_sub'.$i} = [ + 'type' => 'static', + 'name' => 'employment_position_sub'.$i, +// 'label' => ' ', + 'grid' => 2 + ]; + ${'employment_reason'.$i} = [ + 'type' => 'text', + 'name' => 'employment_reason'.$i, +// 'label' => ' ', + 'grid' => 2 + ]; + ${'employment_reason_sub'.$i} = [ + 'type' => 'static', + 'name' => 'employment_reason_sub'.$i, +// 'label' => ' ', + 'grid' => 2 + ]; +} +$may_we_contact = [ + 'type' => 'radio', + 'name' => 'may_we_contact', + 'label' => 'May we contact the employers listed?', + 'grid' => 6, + 'req' => true, + 'opts' => [[ + 'name' => 'may_we_contact_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'may_we_contact_no', + 'label' => 'No', + 'value' => 0]] +]; +$who_to_not_contact = [ + 'type' => 'textarea', + 'name' => 'who_to_not_contact', + 'label' => 'If no, which one(s) should we NOT contact?', + 'grid' => 6, + 'req' => false +]; +// +$titles3 = [ + 1 => 'High School', + 'College / University', + 'Specialized Training', + 'Business or trade school', + 'other', + '' +]; +$edu_titleHdr = [ + 'type' => 'static', + 'label' => ' ', + 'grid' => 2, + 'req' => false, + 'rcoll' => true +]; +$edu_title2Hdr = $edu_titleHdr; +$edu_title2Hdr['label'] = ' '; +$edu_schoolHdr = [ + 'type' => 'static', + 'label' => 'Name and Location of School', + 'grid' => 4, + 'req' => false +]; +$edu_school2Hdr = $edu_schoolHdr; +$edu_school2Hdr['label'] = ' '; +$edu_yearsHdr = [ + 'type' => 'static', + 'label' => 'No. of Years Attended', + 'grid' => 2, + 'req' => false +]; +$edu_years2Hdr = $edu_yearsHdr; +$edu_years2Hdr['label'] = ' '; +$edu_gradHdr = [ + 'type' => 'static', + 'label' => 'Did you Graduate', + 'grid' => 2, + 'req' => false +]; +$edu_grad_degreeHdr = [ + 'type' => 'static', + 'label' => 'Degree', + 'grid' => 1, + 'req' => false +]; +$edu_grad_certificateHdr = [ + 'type' => 'static', + 'label' => 'Certificate', + 'grid' => 1, + 'req' => false +]; +$edu_subjectHdr = [ + 'type' => 'static', + 'label' => 'Subject/Major', + 'grid' => 2, + 'req' => false +]; +$edu_subject2Hdr = $edu_subjectHdr; +$edu_subject2Hdr['label'] = ' '; +for ($i = 1; $i <= 6; ++$i) { + ${'edu_title'.$i} = [ + 'type' => 'static', + 'label' => '', + 'value' => '
'.$titles3[$i].'
', + 'grid' => 2, + 'rcoll' => true + ]; + ${'edu_school'.$i} = [ + 'type' => 'text', + 'name' => 'edu_years' . $i, + 'label' => '', + 'grid' => 4, + 'req' => false + ]; + ${'edu_years'.$i} = [ + 'type' => 'text', + 'name' => 'edu_years' . $i, + 'label' => '', + 'grid' => 2, + 'req' => false + ]; + ${'edu_grad_degree'.$i} = [ + 'type' => 'text', + 'name' => 'edu_grad_degree' . $i, + 'label' => '', + 'grid' => 1, + 'req' => false + ]; + ${'edu_grad_certificate'.$i} = [ + 'type' => 'text', + 'name' => 'edu_grad_certificate' . $i, + 'label' => '', + 'grid' => 1, + 'req' => false + ]; + ${'edu_subject'.$i} = [ + 'type' => 'text', + 'name' => 'edu_subject' . $i, + 'label' => '', + 'grid' => 2, + 'req' => false + ]; +} +$form = [ + $topHeader, + [$employment_titleHdr, $employment_datesHdr, $employment_infoHdr, $employment_salaryHdr, $employment_positionHdr, $employment_reasonHdr], + + [$employment_title1, $employment_dates_from1, $employment_info1, $employment_salary_start1, $employment_position1, $employment_reason1], + [$employment_title_sub1, $employment_dates_to1, $employment_supervisor1, $employment_salary_end1,$employment_position_sub1, $employment_reason_sub1], + + [$employment_title2, $employment_dates_from2, $employment_info2, $employment_salary_start2, $employment_position2, $employment_reason2], + [$employment_title_sub2, $employment_dates_to2, $employment_supervisor2, $employment_salary_end2,$employment_position_sub2, $employment_reason_sub2], + + [$employment_title3, $employment_dates_from3, $employment_info3, $employment_salary_start3, $employment_position3, $employment_reason3], + [$employment_title_sub3, $employment_dates_to3, $employment_supervisor3, $employment_salary_end3,$employment_position_sub3, $employment_reason_sub3], + + [$employment_title4, $employment_dates_from4, $employment_info4, $employment_salary_start4, $employment_position4, $employment_reason4], + [$employment_title_sub4, $employment_dates_to4, $employment_supervisor4, $employment_salary_end4,$employment_position_sub4, $employment_reason_sub4], + + [$may_we_contact, $who_to_not_contact], + [$edu_titleHdr, $edu_schoolHdr, $edu_yearsHdr, $edu_gradHdr, $edu_subjectHdr], + [$edu_title2Hdr, $edu_school2Hdr, $edu_years2Hdr, $edu_grad_degreeHdr, $edu_grad_certificateHdr, $edu_subject2Hdr], + [$edu_title1, $edu_school1, $edu_years1, $edu_grad_degree1, $edu_grad_certificate1, $edu_subject1], + [$edu_title2, $edu_school2, $edu_years2, $edu_grad_degree2, $edu_grad_certificate2, $edu_subject2], + [$edu_title3, $edu_school3, $edu_years3, $edu_grad_degree3, $edu_grad_certificate3, $edu_subject3], + [$edu_title4, $edu_school4, $edu_years4, $edu_grad_degree4, $edu_grad_certificate4, $edu_subject4], + [$edu_title5, $edu_school5, $edu_years5, $edu_grad_degree5, $edu_grad_certificate5, $edu_subject5], + [$edu_title6, $edu_school6, $edu_years6, $edu_grad_degree6, $edu_grad_certificate6, $edu_subject6], +]; diff --git a/config/settings4.php b/config/settings4.php new file mode 100644 index 0000000..3356b37 --- /dev/null +++ b/config/settings4.php @@ -0,0 +1,34 @@ + 'radio', + 'name' => 'military_experience', + 'label' => 'Have you had any experience in the Armed Forces of the United States or in a State National Guard?', + 'grid' => 6, + 'req' => true, + 'opts' => [[ + 'name' => 'military_experience_yes', + 'label' => 'Yes', + 'value' => 1 + ],[ + 'name' => 'military_experience_no', + 'label' => 'No', + 'value' => 0]] +]; +$military_branch = [ + 'type' => 'text', + 'name' => 'military_branch', + 'label' => 'If yes, what branch?', + 'grid' => 6, + 'req' => false +]; +$military_date_entered = [ + 'type' => 'text', + 'name' => 'military_date_entered', + 'label' => 'Date Entered?', + 'grid' => 6, + 'req' => false +]; +$form = [ + ['type' => 'header', 'label' => 'page 4'], + [$military_experience, $military_branch] +]; diff --git a/controllers/front.php b/controllers/front.php index 3a76951..7d715fe 100644 --- a/controllers/front.php +++ b/controllers/front.php @@ -9,6 +9,7 @@ defined('ABSPATH') or die(); */ class glm_employment_front { + // class properties public $pluginDirName; public $formSuccess; public $formFail; @@ -24,7 +25,9 @@ class glm_employment_front public $appId; public $formId; - const FORM_VAR = 'applyOnline'; + // class constants + const FORM_VAR = 'applyOnline'; + const FORM_SETTINGS_DIR = 'config'; /** * Register Hooks and Actions @@ -65,9 +68,16 @@ class glm_employment_front } } + public function load_form_settings($form_part = '') + { + $setting_file = $this->pluginDirName . self::FORM_SETTINGS_DIR + . "/settings{$form_part}.php"; + include $setting_file; + return (is_array($form)) ? $form : array(); + } + public function show_apply_form() { -// echo '
'.print_r($_REQUEST, true).'
'; $formPart = (isset($_REQUEST['form_part'])) ? filter_var($_REQUEST['form_part'], FILTER_VALIDATE_INT) : false; @@ -76,14 +86,14 @@ class glm_employment_front switch ($formPart) { default: unset($_SESSION['glmJobsApplication'], $_SESSION['glmJobsAppForm']); - include $this->pluginDirName . 'models/forms/settings.php'; + $form = $this->load_form_settings(1); $formPart = 1; include $this->pluginDirName . 'views/front/form_1.php'; break; case 1: if ($this->formSubmitted) { - include $this->pluginDirName . 'models/forms/settings.php'; + $form = $this->load_form_settings(1); $this->form_process($form, 1); $this->appId = $appId = filter_var($_REQUEST['appId'], FILTER_VALIDATE_INT); if (!$appId) { @@ -103,7 +113,7 @@ class glm_employment_front // next form part $formPart = 2; $appId = $this->appId; - include $this->pluginDirName . 'models/forms/settings2.php'; + $form = $this->load_form_settings(2); include $this->pluginDirName . 'views/front/form_1.php'; } } else { @@ -112,41 +122,21 @@ class glm_employment_front break; case 2: - if ($this->formSubmitted) { - include $this->pluginDirName . 'models/forms/settings2.php'; - $this->form_process($form, 2); - - $this->appId = $appId = filter_var($_REQUEST['appId'], FILTER_VALIDATE_INT); - - if ($this->errorCount > 0) { - include $this->pluginDirName . 'views/front/form_1.php'; - } else { - $this->store_form_data($form, 2); - // next form part - $formPart = 3; - include $this->pluginDirName . 'models/forms/settings3.php'; -// echo '
'.print_r($form, true).'
'; - include $this->pluginDirName . 'views/front/form_1.php'; - } - } else { - wp_die('An Error!:('); - } - break; case 3: + case 4: if ($this->formSubmitted) { - include $this->pluginDirName . 'models/forms/settings3.php'; - $this->form_process($form, 3); + $form = $this->load_form_settings($formPart); + $this->form_process($form, $formPart); $this->appId = $appId = filter_var($_REQUEST['appId'], FILTER_VALIDATE_INT); if ($this->errorCount > 0) { include $this->pluginDirName . 'views/front/form_1.php'; } else { - $this->store_form_data($form, 3); + $this->store_form_data($form, $formPart); // next form part - $formPart = 3; - include $this->pluginDirName . 'models/forms/settings4.php'; -// echo '
'.print_r($form, true).'
'; + ++$formPart; + $form = $this->load_form_settings($formPart); include $this->pluginDirName . 'views/front/form_1.php'; } } else { @@ -238,17 +228,8 @@ class glm_employment_front public function form_process(&$form, $part) { $this->clean_post(); - switch($part) { - case 1: - include $this->pluginDirName . 'models/forms/settings.php'; - break; - case 2: - include $this->pluginDirName . 'models/forms/settings2.php'; - break; - case 3: - include $this->pluginDirName . 'models/forms/settings3.php'; - break; - } + $form = $this->load_form_settings($form, $part); + foreach ($form as $rowKey => $row) { if ($row['type'] != 'header') { foreach ($row as $fieldKey => $field) { diff --git a/models/forms/settings.php b/models/forms/settings.php deleted file mode 100644 index 88c13ad..0000000 --- a/models/forms/settings.php +++ /dev/null @@ -1,378 +0,0 @@ - 'text', - 'name' => 'fname', - 'label' => 'First Name', - 'grid' => 5, - 'req' => true -]; -$lname = [ - 'type' => 'text', - 'name' => 'lname', - 'label' => 'Last Name', - 'grid' => 5 -]; -$mname = [ - 'type' => 'text', - 'name' => 'mname', - 'label' => 'Middle Name', - 'grid' => 2 -]; -$street = [ - 'type' => 'text', - 'name' => 'street', - 'label' => 'Street', - 'grid' => 3 -]; -$city = [ - 'type' => 'text', - 'name' => 'city', - 'label' => 'City', - 'grid' => 3 -]; -$state = [ - 'type' => 'text', - 'name' => 'state', - 'label' => 'State', - 'grid' => 3 -]; -$zip = [ - 'type' => 'text', - 'name' => 'zip', - 'label' => 'ZIP', - 'grid' => 3 -]; - -$phone = [ - 'type' => 'tel', - 'name' => 'phone', - 'label' => 'Phone', - 'grid' => 4 -]; -$altPhone = [ - 'type' => 'tel', - 'name' => 'alt_phone', - 'label' => 'Alternate Phone', - 'grid' => 4 -]; -$email = [ - 'type' => 'email', - 'name' => 'email', - 'label' => 'Email', - 'grid' => 4, - 'req' => true -]; -$over_18 = [ - 'type' => 'radio', - 'name' => 'over_18', - 'label' => 'Are you 18 years or older?', - 'grid' => 4, - 'req' => true, - 'opts' => [[ - 'name' => 'over_18_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'over_18_no', - 'label' => 'No', - 'value' => 0]] -]; -$us_citizen = [ - 'type' => 'radio', - 'name' => 'us_citizen', - 'label' => 'Are you an U.S. citizen?', - 'grid' => 4, - 'req' => true, - 'opts' => [[ - 'name' => 'us_citizen_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'us_citizen_no', - 'label' => 'No', - 'value' => 0]] -]; -$us_auth = [ - 'type' => 'radio', - 'name' => 'us_auth', - 'label' => 'Are you authorized to work in the United States?', - 'grid' => 4, - 'req' => true, - 'opts' => [[ - 'name' => 'us_auth_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'us_auth_no', - 'label' => 'No', - 'value' => 0]] -]; -$employed_before = [ - 'type' => 'radio', - 'name' => 'employed_before', - 'label' => 'Have you been previously employed here?', - 'grid' => 6, - 'req' => true, - 'opts' => [[ - 'name' => 'employed_before_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'employed_before_no', - 'label' => 'No', - 'value' => 0]] -]; -$employed_before_dates = [ - 'type' => 'text', - 'name' => 'employed_before_dates', - 'label' => 'If yes, date(s)', - 'grid' => 6 -]; -$supervisor = [ - 'type' => 'text', - 'name' => 'supervisor', - 'label' => 'Supervisor Name(s)', - 'grid' => 12 -]; -$applied_before = [ - 'type' => 'radio', - 'name' => 'applied_before', - 'label' => 'Have you ever applied to this Company before?', - 'grid' => 6, - 'req' => true, - 'opts' => [[ - 'name' => 'applied_before_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'applied_before_no', - 'label' => 'No', - 'value' => 0]] -]; -$applied_before_dates = [ - 'type' => 'text', - 'name' => 'applied_before_dates', - 'label' => 'Where?', - 'grid' => 6 -]; -$applied_before_under_what_name = [ - 'type' => 'text', - 'name' => 'applied_before_under_what_name', - 'label' => 'Under what name?', - 'grid' => 6 -]; -$applied_before_when = [ - 'type' => 'text', - 'name' => 'applied_before_when', - 'label' => 'When?', - 'grid' => 6 -]; -$list_any_friends = [ - 'type' => 'text', - 'name' => 'list_any_friends', - 'label' => 'List any friends or relatives working here', - 'grid' => 12 -]; -$have_drivers_license = [ - 'type' => 'radio', - 'name' => 'have_drivers_license', - 'label' => 'DO YOU HAVE A DRIVER\'S LICENSE?', - 'grid' => 6, - 'req' => true, - 'opts' => [[ - 'name' => 'have_drivers_license_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'have_drivers_license_no', - 'label' => 'No', - 'value' => 0]] -]; -$means_of_travel = [ - 'type' => 'text', - 'name' => 'means_of_travel', - 'label' => 'What is your means of transportation to work?', - 'grid' => 6 -]; -$drivers_license = [ - 'type' => 'text', - 'name' => 'drivers_license', - 'label' => 'Driver\'/s License Number', - 'grid' => 6 -]; -$license_state = [ - 'type' => 'text', - 'name' => 'license_state', - 'label' => 'State of issue', - 'grid' => 6 -]; -$license_type = [ - 'type' => 'radio', - 'name' => 'license_type', - 'label' => 'Drivers License', - 'grid' => 6, - 'req' => true, - 'opts' => [[ - 'name' => 'license_type_operator', - 'label' => 'Operator', - 'value' => 'Operator' - ],[ - 'name' => 'license_type_commercial', - 'label' => 'Commercial', - 'value' => 'Commercial' - ],[ - 'name' => 'license_type_chauffeur', - 'label' => 'Chauffeur', - 'value' => 'Chauffeur']] -]; -$license_exp_date = [ - 'type' => 'text', - 'name' => 'license_exp_date', - 'label' => 'Expiration date', - 'grid' => 6 -]; -$had_accident_in_past_three_years = [ - 'type' => 'radio', - 'name' => 'had_accident_in_past_three_years', - 'label' => 'Have you had any accidents during the past three years?', - 'grid' => 8, - 'req' => true, - 'opts' => [[ - 'name' => 'had_accident_in_past_three_years_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'had_accident_in_past_three_years_no', - 'label' => 'No', - 'value' => 0]] -]; -$had_accident_in_past_three_years_how_many = [ - 'type' => 'text', - 'name' => 'had_accident_in_past_three_years_how_many', - 'label' => 'How Many', - 'grid' => 4 -]; -$had_violations_in_past_three_years = [ - 'type' => 'radio', - 'name' => 'had_violations_in_past_three_years', - 'label' => 'Have you had any moving violations during the past three years?', - 'grid' => 8, - 'req' => true, - 'opts' => [[ - 'name' => 'had_violations_in_past_three_years_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'had_violations_in_past_three_years_no', - 'label' => 'No', - 'value' => 0]] -]; -$had_violations_in_past_three_years_how_many = [ - 'type' => 'text', - 'name' => 'had_violations_in_past_three_years_how_many', - 'label' => 'How Many', - 'grid' => 4 -]; -if ($jobId = filter_var($_REQUEST['job'], FILTER_VALIDATE_INT)) { - $jobData = get_post($jobId); - $jobTitle = $jobData->post_title; -} -$position_applied_for = [ - 'type' => 'text', - 'name' => 'position_applied_for', - 'label' => 'Position Applied For', - 'grid' => 6, - 'value' => $jobTitle -]; -$date_available_for_work = [ - 'type' => 'text', - 'name' => 'date_available_for_work', - 'label' => 'Date Available to Work', - 'grid' => 6 -]; -$type_of_employment = [ - 'type' => 'checkbox', - 'name' => 'type_of_employment', - 'label' => 'Type of Employment', - 'grid' => 6, - 'req' => false, - 'opts' => [[ - 'name' => 'type_of_employment_fulltime', - 'label' => 'Full Time', - 'value' => 'Full Time' - ],[ - 'name' => 'type_of_employment_parttime', - 'label' => 'Part Time', - 'value' => 'Part Time' - ]] -]; -$salary_desired = [ - 'type' => 'text', - 'name' => 'salary_desired', - 'label' => 'Salary Desired', - 'grid' => 6 -]; -$location_preference = [ - 'type' => 'checkbox', - 'name' => 'location_preference', - 'label' => 'Location Preference', - 'grid' => 6, - 'req' => false, - 'opts' => [[ - 'name' => 'location_preference_petoskey', - 'label' => 'Petoskey', - 'value' => 'Petoskey' - ],[ - 'name' => 'location_preference_harborsprings', - 'label' => 'Harbor Springs', - 'value' => 'Harbor Springs' - ],[ - 'name' => 'location_preference_gaylord', - 'label' => 'Gaylord', - 'value' => 'Gaylord' - ]] -]; -$do_you_have_building_exp = [ - 'type' => 'radio', - 'name' => 'do_you_have_building_exp', - 'label' => 'Do you have experience in the building industry?', - 'grid' => 6, - 'req' => true, - 'opts' => [[ - 'name' => 'do_you_have_building_exp_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'do_you_have_building_exp_no', - 'label' => 'No', - 'value' => 0]] -]; -$special_training = [ - 'type' => 'textarea', - 'name' => 'special_training', - 'label' => 'Do you have any special training, skills, certifications, qualifications,' - . ' or other experiences that relate to the position(s) applied for?', - 'grid' => 12 -]; -$form = [ - ['type' => 'header', 'label' => 'Personal Information'], - [$fname, $lname, $mname], - [$street, $city, $state, $zip], - [$phone, $altPhone, $email], - [$over_18, $us_citizen, $us_auth], - [$employed_before, $employed_before_dates], - [$supervisor], - [$applied_before, $applied_before_dates], - [$applied_before_under_what_name, $applied_before_when], - [$list_any_friends], - [$have_drivers_license, $means_of_travel], - [$drivers_license, $license_state], - [$license_type, $license_exp_date], - [$had_accident_in_past_three_years, $had_accident_in_past_three_years_how_many], - [$had_violations_in_past_three_years, $had_violations_in_past_three_years_how_many], - ['type' => 'header', 'label' => 'Employment Desired'], - [$position_applied_for, $date_available_for_work], - [$type_of_employment, $salary_desired], - [$location_preference, $do_you_have_building_exp], - [$special_training] -]; diff --git a/models/forms/settings2.php b/models/forms/settings2.php deleted file mode 100644 index b366864..0000000 --- a/models/forms/settings2.php +++ /dev/null @@ -1,349 +0,0 @@ - 'text', - 'name' => 'date_of_birth', - 'label' => 'Date of Birth', - 'grid' => 2, - 'req' => true -]; -$date_of_birth_explain = [ - 'type' => 'static', - 'value' => '
The U.S. Department of Transportation requires that driver ' - . 'applicants state their date of birth §391.21(b)(2).
', - 'grid' => 10 -]; -$stateHdr = [ - 'type' => 'static', - 'label' => 'State', - 'grid' => 1, - 'req' => true -]; -$licenseHdr = [ - 'type' => 'static', - 'label' => 'License No.', - 'grid' => 4, - 'req' => true -]; -$classHdr = [ - 'type' => 'static', - 'label' => 'Class', - 'grid' => 1, - 'req' => true -]; -$endorsementHdr = [ - 'type' => 'static', - 'label' => 'Endorsement(s)', - 'grid' => 4, - 'req' => true -]; -$exp_dateHdr = [ - 'type' => 'static', - 'label' => 'Expiration Date', - 'grid' => 2, - 'req' => true -]; -for ($i = 1; $i <= 4; ++$i) { - $licenseReq = ($i == 1) ? true: false; - ${'state'.$i} = [ - 'type' => 'text', - 'name' => 'state' . $i, - 'label' => '', //'State', - 'grid' => 1, - 'req' => $licenseReq - ]; - ${'license'.$i} = [ - 'type' => 'text', - 'name' => 'license' . $i, - 'label' => '', //'License No.', - 'grid' => 4, - 'req' => $licenseReq - ]; - ${'class'.$i} = [ - 'type' => 'text', - 'name' => 'class' . $i, - 'label' => '', //'Class', - 'grid' => 1, - 'req' => $licenseReq - ]; - ${'endorsement'.$i} = [ - 'type' => 'text', - 'name' => 'endorsement' . $i, - 'label' => '', //'Endorsement(s)', - 'grid' => 4, - 'req' => $licenseReq - ]; - ${'exp_date'.$i} = [ - 'type' => 'text', - 'name' => 'exp_date' . $i, - 'label' => '', //'Expiration Date', - 'grid' => 2, - 'req' => $licenseReq - ]; -} -$denied_license = [ - 'type' => 'radio', - 'name' => 'denied_license', - 'label' => 'A. Have you ever been denied a license, permit or privilege to' - . 'operate a motor wehicle?', - 'grid' => 4, - 'req' => true, - 'opts' => [[ - 'name' => 'denied_license_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'denied_license_no', - 'label' => 'No', - 'value' => 0]] -]; -$suspended_license = [ - 'type' => 'radio', - 'name' => 'suspended_license', - 'label' => 'B. Has any license, permit or privilege ever been suspended or revoked?', - 'grid' => 4, - 'req' => true, - 'opts' => [[ - 'name' => 'suspended_license_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'suspended_license_no', - 'label' => 'No', - 'value' => 0]] -]; -$disqualified_license = [ - 'type' => 'radio', - 'name' => 'disqualified_license', - 'label' => 'C. Have you ever been disquelified for violations of the Federal' - . 'Mortor Carrier Safety Regulations?', - 'grid' => 4, - 'req' => true, - 'opts' => [[ - 'name' => 'disqualified_license_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'disqualified_license_no', - 'label' => 'No', - 'value' => 0]] -]; -$details_of_license = [ - 'type' => 'textarea', - 'name' => 'details_of_license', - 'label' => 'If you answered "yes" to A, B, C, give details', - 'grid' => 12 -]; -$titles = [ - 1 => 'Straight Truck', - 'Tractor and Semi Trailer', - 'Twin Trailers - LCV\'s', - 'Other' -]; -$eq_classHdr = [ - 'type' => 'static', - 'label' => 'Class of Equipment', - 'grid' => 3, - 'req' => false -]; -$eq_typeHdr = [ - 'type' => 'static', - 'label' => 'Type of Equipment (Van, Tank, Flat, etc.)', - 'grid' => 4, - 'req' => false -]; -$eq_dates_fromHdr = [ - 'type' => 'static', - 'label' => 'From', - 'grid' => 1, - 'req' => false -]; -$eq_dates_toHdr = [ - 'type' => 'static', - 'label' => 'To', - 'grid' => 1, - 'req' => false -]; -$eq_approx_milesHdr = [ - 'type' => 'static', - 'label' => 'Approximate total Miles', - 'grid' => 3, - 'req' => false -]; -for ($i = 1; $i <= 4; ++$i) { - ${'eq_class'.$i} = [ - 'type' => 'static', - 'label' => '', //'Class of Equipment', - 'value' => '
'.$titles[$i].'
', - 'grid' => 3 - ]; - ${'eq_type'.$i} = [ - 'type' => 'text', - 'name' => 'eq_type' . $i, - 'label' => '', //'Type of Equipment (Van, Tank, Flat, etc.)', - 'grid' => 4, - 'req' => false - ]; - ${'eq_dates_from'.$i} = [ - 'type' => 'text', - 'name' => 'eq_dates_from' . $i, - 'label' => '', //'From', - 'grid' => 1, - 'req' => false - ]; - ${'eq_dates_to'.$i} = [ - 'type' => 'text', - 'name' => 'eq_dates_to' . $i, - 'label' => '', //'To', - 'grid' => 1, - 'req' => false - ]; - ${'eq_approx_miles'.$i} = [ - 'type' => 'text', - 'name' => 'eq_approx_miles' . $i, - 'label' => '', //'Approximate total Miles', - 'grid' => 3, - 'req' => false - ]; -} -$last_5_years_states = [ - 'type' => 'textarea', - 'name' => 'last_5_years_states', - 'label' => 'List states operated in during last five years:', - 'grid' => 12 -]; -$special_drivers_training = [ - 'type' => 'textarea', - 'name' => 'last_5_years_states', - 'label' => 'List special courses or training that will help you as a driver:', - 'grid' => 12 -]; -$driving_awards = [ - 'type' => 'textarea', - 'name' => 'last_5_years_states', - 'label' => 'List driving awards held and who awards were presented by:', - 'grid' => 12 -]; - -$accident_review_dates = [ - 'type' => 'static', - 'label' => 'Dates

', - 'grid' => 3 -]; -$accident_review_nature = [ - 'type' => 'static', - 'label' => 'Nature of Accident (Head-on, Rear-End, Overturn, etc.)', - 'grid' => 3 -]; -$accident_review_fatalities = [ - 'type' => 'static', - 'label' => 'Fatalities

', - 'grid' => 3 -]; -$accident_review_injuries = [ - 'type' => 'static', - 'label' => 'Injuries

', - 'grid' => 3 -]; -for ($i = 1; $i <= 3; ++$i) { - ${'accident_review_dates'.$i} = [ - 'type' => 'text', - 'name' => 'accident_review_dates'.$i, - 'label' => '', - 'grid' => 3 - ]; - ${'accident_review_nature'.$i} = [ - 'type' => 'text', - 'name' => 'accident_review_nature'.$i, - 'label' => '', - 'grid' => 3 - ]; - ${'accident_review_fatalities'.$i} = [ - 'type' => 'text', - 'name' => 'accident_review_fatalities'.$i, - 'label' => '', - 'grid' => 3 - ]; - ${'accident_review_injuries'.$i} = [ - 'type' => 'text', - 'name' => 'accident_review_injuries'.$i, - 'label' => '', - 'grid' => 3 - ]; -} -$traffic_convictions_locations = [ - 'type' => 'static', - 'label' => 'Location', - 'grid' => 3 -]; -$traffic_convictions_date = [ - 'type' => 'static', - 'label' => 'Date', - 'grid' => 3 -]; -$traffic_convictions_charge = [ - 'type' => 'static', - 'label' => 'Charge', - 'grid' => 3 -]; -$traffic_convictions_penalty = [ - 'type' => 'static', - 'label' => 'Penalty', - 'grid' => 3 -]; -for ($i = 1; $i <= 3; ++$i) { - ${'traffic_convictions_locations'.$i} = [ - 'type' => 'text', - 'name' => 'traffic_convictions_locations'.$i, - 'label' => '', - 'grid' => 3 - ]; - ${'traffic_convictions_date'.$i} = [ - 'type' => 'text', - 'name' => 'traffic_convictions_date'.$i, - 'label' => '', - 'grid' => 3 - ]; - ${'traffic_convictions_charge'.$i} = [ - 'type' => 'text', - 'name' => 'traffic_convictions_charge'.$i, - 'label' => '', - 'grid' => 3 - ]; - ${'traffic_convictions_penalty'.$i} = [ - 'type' => 'text', - 'name' => 'traffic_convictions_penalty'.$i, - 'label' => '', - 'grid' => 3 - ]; -} -$form = [ - ['type' => 'header', 'label' => 'Driver Experience and Qualification'], - [$date_of_birth, $date_of_birth_explain], - ['type' => 'header', 'label' => 'Drivers Licenses held in past 3 years must be shown'], - [$stateHdr, $licenseHdr, $classHdr, $endorsementHdr, $exp_dateHdr], - [$state1, $license1, $class1, $endorsement1, $exp_date1], - [$state2, $license2, $class2, $endorsement2, $exp_date2], - [$state3, $license3, $class3, $endorsement3, $exp_date3], - [$state4, $license4, $class4, $endorsement4, $exp_date4], - [$denied_license, $suspended_license, $disqualified_license], - [$details_of_license], - ['type' => 'header', 'label' => 'Driving Experience'], - [$eq_classHdr, $eq_typeHdr, $eq_dates_fromHdr, $eq_dates_toHdr, $eq_approx_milesHdr], - [$eq_class1, $eq_type1, $eq_dates_from1, $eq_dates_to1, $eq_approx_miles1], - [$eq_class2, $eq_type2, $eq_dates_from2, $eq_dates_to2, $eq_approx_miles2], - [$eq_class3, $eq_type3, $eq_dates_from3, $eq_dates_to3, $eq_approx_miles3], - [$eq_class4, $eq_type4, $eq_dates_from4, $eq_dates_to4, $eq_approx_miles4], - [$last_5_years_states], - [$special_drivers_training], - [$driving_awards], - ['type' => 'header', 'label' => 'Accident Review for past 3 years'], - [$accident_review_dates,$accident_review_nature, $accident_review_fatalities, $accident_review_injuries], - [$accident_review_dates1,$accident_review_nature1, $accident_review_fatalities1, $accident_review_injuries1], - [$accident_review_dates2,$accident_review_nature2, $accident_review_fatalities2, $accident_review_injuries2], - [$accident_review_dates3,$accident_review_nature3, $accident_review_fatalities3, $accident_review_injuries3], - ['type' => 'header', 'label' => 'Traffic Convictions and Forfeitures', 'subheader' => 'for the past 3 years other than parking violations'], - [$traffic_convictions_locations, $traffic_convictions_date, $traffic_convictions_charge, $traffic_convictions_penalty], - [$traffic_convictions_locations1, $traffic_convictions_date1, $traffic_convictions_charge1, $traffic_convictions_penalty1], - [$traffic_convictions_locations2, $traffic_convictions_date2, $traffic_convictions_charge2, $traffic_convictions_penalty2], - [$traffic_convictions_locations3, $traffic_convictions_date3, $traffic_convictions_charge3, $traffic_convictions_penalty3], -]; diff --git a/models/forms/settings3.php b/models/forms/settings3.php deleted file mode 100644 index 48ebfb9..0000000 --- a/models/forms/settings3.php +++ /dev/null @@ -1,278 +0,0 @@ - 'header', - 'label' => 'Current and Former Employers', - 'subheader' => '(List current or most cerent job first)', - 'notes' => 'Note to Driver Candidates: The U.S. Department of ' - . 'Transportation requires that driver applications show all employment for ' - . 'the past three years. They must also show commercial driver employment ' - . 'for the seven years immediately preceding this three year period. ' - . '§391.21(b)(10),(11). All Applicants: start with last, or current' - . ' position, and work back.' -]; -$titles = array_combine(range(1, 4), range(1, 4)); -$employment_titleHdr = [ - 'type' => 'static', - 'label' => ' ', - 'grid' => 1, - 'req' => false, - 'rcoll' => true -]; -$employment_datesHdr = [ - 'type' => 'static', - 'label' => 'Date Month/Year', - 'grid' => 2 -]; -$employment_infoHdr = [ - 'type' => 'static', - 'label' => 'Employer Name, Address, and Telephone', - 'grid' => 4 -]; -$employment_supervisorHdr = [ - 'type' => 'static', - 'label' => 'Supervisor', - 'grid' => 1 -]; -$employment_salaryHdr = [ - 'type' => 'static', - 'label' => 'Salary', - 'grid' => 1 -]; -$employment_positionHdr = [ - 'type' => 'static', - 'label' => 'Last Position Held & Work Performed', - 'grid' => 2 -]; -$employment_reasonHdr = [ - 'type' => 'static', - 'label' => 'Reason for Leaving', - 'grid' => 2 -]; -for ($i = 1; $i <= 4; ++$i) { - ${'employment_title'.$i} = [ - 'type' => 'static', - 'label' => ' ', - 'value' => '
'.$titles[$i].'
', - 'grid' => 1, - 'rcoll' => true - ]; - ${'employment_title_sub'.$i} = [ - 'type' => 'static', - 'label' => ' ', - 'value' => '', - 'grid' => 1, - 'rcoll' => true - ]; - ${'employment_dates_from'.$i} = [ - 'type' => 'text', - 'name' => 'employment_dates_from'.$i, - 'placeholder' => 'From:', - 'grid' => 2 - ]; - ${'employment_dates_to'.$i} = [ - 'type' => 'text', - 'name' => 'employment_dates_to'.$i, - 'placeholder' => 'To:', - 'grid' => 2 - ]; - ${'employment_info'.$i} = [ - 'type' => 'text', - 'name' => 'employment_info'.$i, -// 'placeholder' => ' ', - 'grid' => 4 - ]; - ${'employment_supervisor'.$i} = [ - 'type' => 'text', - 'name' => 'employment_supervisor'.$i, - 'placeholder' => 'Supervisor', - 'grid' => 4 - ]; - ${'employment_salary_start'.$i} = [ - 'type' => 'text', - 'name' => 'employment_salary_start'.$i, - 'placeholder' => 'Starting', - 'grid' => 1 - ]; - ${'employment_salary_end'.$i} = [ - 'type' => 'text', - 'name' => 'employment_salary_end'.$i, - 'placeholder' => 'Ending', - 'grid' => 1 - ]; - ${'employment_position'.$i} = [ - 'type' => 'text', - 'name' => 'employment_position'.$i, -// 'label' => ' ', - 'grid' => 2 - ]; - ${'employment_position_sub'.$i} = [ - 'type' => 'static', - 'name' => 'employment_position_sub'.$i, -// 'label' => ' ', - 'grid' => 2 - ]; - ${'employment_reason'.$i} = [ - 'type' => 'text', - 'name' => 'employment_reason'.$i, -// 'label' => ' ', - 'grid' => 2 - ]; - ${'employment_reason_sub'.$i} = [ - 'type' => 'static', - 'name' => 'employment_reason_sub'.$i, -// 'label' => ' ', - 'grid' => 2 - ]; -} -$may_we_contact = [ - 'type' => 'radio', - 'name' => 'may_we_contact', - 'label' => 'May we contact the employers listed?', - 'grid' => 6, - 'req' => true, - 'opts' => [[ - 'name' => 'may_we_contact_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'may_we_contact_no', - 'label' => 'No', - 'value' => 0]] -]; -$who_to_not_contact = [ - 'type' => 'textarea', - 'name' => 'who_to_not_contact', - 'label' => 'If no, which one(s) should we NOT contact?', - 'grid' => 6, - 'req' => false -]; -// -$titles3 = [ - 1 => 'High School', - 'College / University', - 'Specialized Training', - 'Business or trade school', - 'other', - '' -]; -$edu_titleHdr = [ - 'type' => 'static', - 'label' => ' ', - 'grid' => 2, - 'req' => false, - 'rcoll' => true -]; -$edu_title2Hdr = $edu_titleHdr; -$edu_title2Hdr['label'] = ' '; -$edu_schoolHdr = [ - 'type' => 'static', - 'label' => 'Name and Location of School', - 'grid' => 4, - 'req' => false -]; -$edu_school2Hdr = $edu_schoolHdr; -$edu_school2Hdr['label'] = ' '; -$edu_yearsHdr = [ - 'type' => 'static', - 'label' => 'No. of Years Attended', - 'grid' => 2, - 'req' => false -]; -$edu_years2Hdr = $edu_yearsHdr; -$edu_years2Hdr['label'] = ' '; -$edu_gradHdr = [ - 'type' => 'static', - 'label' => 'Did you Graduate', - 'grid' => 2, - 'req' => false -]; -$edu_grad_degreeHdr = [ - 'type' => 'static', - 'label' => 'Degree', - 'grid' => 1, - 'req' => false -]; -$edu_grad_certificateHdr = [ - 'type' => 'static', - 'label' => 'Certificate', - 'grid' => 1, - 'req' => false -]; -$edu_subjectHdr = [ - 'type' => 'static', - 'label' => 'Subject/Major', - 'grid' => 2, - 'req' => false -]; -$edu_subject2Hdr = $edu_subjectHdr; -$edu_subject2Hdr['label'] = ' '; -for ($i = 1; $i <= 6; ++$i) { - ${'edu_title'.$i} = [ - 'type' => 'static', - 'label' => '', - 'value' => '
'.$titles3[$i].'
', - 'grid' => 2, - 'rcoll' => true - ]; - ${'edu_school'.$i} = [ - 'type' => 'text', - 'name' => 'edu_years' . $i, - 'label' => '', - 'grid' => 4, - 'req' => false - ]; - ${'edu_years'.$i} = [ - 'type' => 'text', - 'name' => 'edu_years' . $i, - 'label' => '', - 'grid' => 2, - 'req' => false - ]; - ${'edu_grad_degree'.$i} = [ - 'type' => 'text', - 'name' => 'edu_grad_degree' . $i, - 'label' => '', - 'grid' => 1, - 'req' => false - ]; - ${'edu_grad_certificate'.$i} = [ - 'type' => 'text', - 'name' => 'edu_grad_certificate' . $i, - 'label' => '', - 'grid' => 1, - 'req' => false - ]; - ${'edu_subject'.$i} = [ - 'type' => 'text', - 'name' => 'edu_subject' . $i, - 'label' => '', - 'grid' => 2, - 'req' => false - ]; -} -$form = [ - $topHeader, - [$employment_titleHdr, $employment_datesHdr, $employment_infoHdr, $employment_salaryHdr, $employment_positionHdr, $employment_reasonHdr], - - [$employment_title1, $employment_dates_from1, $employment_info1, $employment_salary_start1, $employment_position1, $employment_reason1], - [$employment_title_sub1, $employment_dates_to1, $employment_supervisor1, $employment_salary_end1,$employment_position_sub1, $employment_reason_sub1], - - [$employment_title2, $employment_dates_from2, $employment_info2, $employment_salary_start2, $employment_position2, $employment_reason2], - [$employment_title_sub2, $employment_dates_to2, $employment_supervisor2, $employment_salary_end2,$employment_position_sub2, $employment_reason_sub2], - - [$employment_title3, $employment_dates_from3, $employment_info3, $employment_salary_start3, $employment_position3, $employment_reason3], - [$employment_title_sub3, $employment_dates_to3, $employment_supervisor3, $employment_salary_end3,$employment_position_sub3, $employment_reason_sub3], - - [$employment_title4, $employment_dates_from4, $employment_info4, $employment_salary_start4, $employment_position4, $employment_reason4], - [$employment_title_sub4, $employment_dates_to4, $employment_supervisor4, $employment_salary_end4,$employment_position_sub4, $employment_reason_sub4], - - [$may_we_contact, $who_to_not_contact], - [$edu_titleHdr, $edu_schoolHdr, $edu_yearsHdr, $edu_gradHdr, $edu_subjectHdr], - [$edu_title2Hdr, $edu_school2Hdr, $edu_years2Hdr, $edu_grad_degreeHdr, $edu_grad_certificateHdr, $edu_subject2Hdr], - [$edu_title1, $edu_school1, $edu_years1, $edu_grad_degree1, $edu_grad_certificate1, $edu_subject1], - [$edu_title2, $edu_school2, $edu_years2, $edu_grad_degree2, $edu_grad_certificate2, $edu_subject2], - [$edu_title3, $edu_school3, $edu_years3, $edu_grad_degree3, $edu_grad_certificate3, $edu_subject3], - [$edu_title4, $edu_school4, $edu_years4, $edu_grad_degree4, $edu_grad_certificate4, $edu_subject4], - [$edu_title5, $edu_school5, $edu_years5, $edu_grad_degree5, $edu_grad_certificate5, $edu_subject5], - [$edu_title6, $edu_school6, $edu_years6, $edu_grad_degree6, $edu_grad_certificate6, $edu_subject6], -]; diff --git a/models/forms/settings4.php b/models/forms/settings4.php deleted file mode 100644 index 3356b37..0000000 --- a/models/forms/settings4.php +++ /dev/null @@ -1,34 +0,0 @@ - 'radio', - 'name' => 'military_experience', - 'label' => 'Have you had any experience in the Armed Forces of the United States or in a State National Guard?', - 'grid' => 6, - 'req' => true, - 'opts' => [[ - 'name' => 'military_experience_yes', - 'label' => 'Yes', - 'value' => 1 - ],[ - 'name' => 'military_experience_no', - 'label' => 'No', - 'value' => 0]] -]; -$military_branch = [ - 'type' => 'text', - 'name' => 'military_branch', - 'label' => 'If yes, what branch?', - 'grid' => 6, - 'req' => false -]; -$military_date_entered = [ - 'type' => 'text', - 'name' => 'military_date_entered', - 'label' => 'Date Entered?', - 'grid' => 6, - 'req' => false -]; -$form = [ - ['type' => 'header', 'label' => 'page 4'], - [$military_experience, $military_branch] -];