--- /dev/null
+#Gaslight Media Online Employment Application
+ Class setup for MVC
+
+##Models:
+ job.php = job posting
+ database.php = database
+
+ list-applications.php = using copy of list table class extends to create
+ list of applications
+ class-glm-list-table.php = copy from wordpress core file to protect against
+ wordpress updates for this class
+
+
+##Views:
+ Admin
+ applicationList.php
+ form_1.php
+ job_meta.php
+ view-application.php
+
+ Front
+ formTemplate.php
+ jobDetail.php
+ jobList.php
+ jobSearch.php
+ thankYou.php
+
+
+##Controllers:
+ admin.php = for the admin side
+ activate-plugin.php
+ should have an init function for creating the database tables
+ upgrade-plugin.php
+ should have functions for upgrading the database versions
+
+ front.php = for front end
+
+##Config:
+ config files for each form
+ setting{1-7}.php
+
--- /dev/null
+<?php
+$fname = [
+ 'type' => 'text',
+ 'name' => 'fname',
+ 'label' => 'First Name',
+ 'grid' => 5,
+ 'req' => true
+];
+$lname = [
+ 'type' => 'text',
+ 'name' => 'lname',
+ 'label' => 'Last Name',
+ 'grid' => 5,
+ 'req' => true
+];
+$mname = [
+ 'type' => 'text',
+ 'name' => 'mname',
+ 'label' => 'Middle Name',
+ 'grid' => 2,
+ 'req' => true
+];
+$street = [
+ 'type' => 'text',
+ 'name' => 'street',
+ 'label' => 'Street',
+ 'grid' => 3,
+ 'req' => true
+];
+$city = [
+ 'type' => 'text',
+ 'name' => 'city',
+ 'label' => 'City',
+ 'grid' => 3,
+ 'req' => true
+];
+$state = [
+ 'type' => 'text',
+ 'name' => 'state',
+ 'label' => 'State',
+ 'grid' => 3,
+ 'req' => true
+];
+$zip = [
+ 'type' => 'text',
+ 'name' => 'zip',
+ 'label' => 'ZIP',
+ 'grid' => 3,
+ 'req' => true
+];
+
+$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,
+ 'rule' => 'email'
+];
+$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' => 'License Type',
+ '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
+];
+$position_applied_for = [
+ 'type' => 'text',
+ 'name' => 'position_applied_for',
+ 'label' => 'Position Applied For',
+ 'grid' => 6,
+ 'value' => $this->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' => 8,
+ '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'
+ ],[
+ 'name' => 'location_preference_traverse',
+ 'label' => 'Traverse City',
+ 'value' => 'Traverse City'
+ ]]
+];
+$do_you_have_building_exp = [
+ 'type' => 'radio',
+ 'name' => 'do_you_have_building_exp',
+ 'label' => 'Do you have experience in the building industry?',
+ 'grid' => 4,
+ '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]
+];
--- /dev/null
+<?php
+$date_of_birth = [
+ 'type' => 'text',
+ 'name' => 'date_of_birth',
+ 'label' => 'Date of Birth',
+ 'grid' => 2,
+ 'req' => true
+];
+$date_of_birth_explain = [
+ 'type' => 'static',
+ 'value' => '<div class="static">The U.S. Department of Transportation requires that driver '
+ . 'applicants state their date of birth §391.21(b)(2).</div>',
+ 'grid' => 10
+];
+$stateHdr = [
+ 'type' => 'static',
+ 'label' => 'State',
+ 'grid' => 1,
+ 'req' => true,
+ 'rcoll' => 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' => '',
+ 'grid' => 1,
+ 'req' => $licenseReq,
+ 'rcoll' => true
+ ];
+ ${'license'.$i} = [
+ 'type' => 'text',
+ 'name' => 'license' . $i,
+ 'label' => '',
+ 'grid' => 4,
+ 'req' => $licenseReq
+ ];
+ ${'class'.$i} = [
+ 'type' => 'text',
+ 'name' => 'class' . $i,
+ 'label' => '',
+ 'grid' => 1,
+ 'req' => $licenseReq
+ ];
+ ${'endorsement'.$i} = [
+ 'type' => 'text',
+ 'name' => 'endorsement' . $i,
+ 'label' => '',
+ 'grid' => 4,
+ 'req' => $licenseReq
+ ];
+ ${'exp_date'.$i} = [
+ 'type' => 'text',
+ 'name' => 'exp_date' . $i,
+ 'label' => '',
+ '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 vehicle?',
+ '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 disqualified for violations of the Federal'
+ . ' Motor 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,
+ 'rcoll' => true
+];
+$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' => '',
+ 'value' => '<div class="static">'.$titles[$i].'</div>',
+ 'grid' => 3,
+ 'rcoll' => true
+ ];
+ ${'eq_type'.$i} = [
+ 'type' => 'text',
+ 'name' => 'eq_type' . $i,
+ 'label' => '',
+ 'grid' => 4,
+ 'req' => false
+ ];
+ ${'eq_dates_from'.$i} = [
+ 'type' => 'text',
+ 'name' => 'eq_dates_from' . $i,
+ 'label' => '',
+ 'grid' => 1,
+ 'req' => false
+ ];
+ ${'eq_dates_to'.$i} = [
+ 'type' => 'text',
+ 'name' => 'eq_dates_to' . $i,
+ 'label' => '',
+ 'grid' => 1,
+ 'req' => false
+ ];
+ ${'eq_approx_miles'.$i} = [
+ 'type' => 'text',
+ 'name' => 'eq_approx_miles' . $i,
+ 'label' => '',
+ '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' => 'special_drivers_training',
+ 'label' => 'List special courses or training that will help you as a driver:',
+ 'grid' => 12
+];
+$driving_awards = [
+ 'type' => 'textarea',
+ 'name' => 'driving_awards',
+ 'label' => 'List driving awards held and who awards were presented by:',
+ 'grid' => 12
+];
+
+$accident_review_dates = [
+ 'type' => 'static',
+ 'label' => 'Dates<br><br>',
+ '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<br><br>',
+ 'grid' => 3
+];
+$accident_review_injuries = [
+ 'type' => 'static',
+ 'label' => 'Injuries<br><br>',
+ '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
+ ];
+}
+$resume_file = [
+ 'type' => 'file',
+ 'label' => 'Upload your resume and/or cover letter',
+ 'grid' => 12
+];
+$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],
+ [$resume_file]
+];
--- /dev/null
+<?php
+$topHeader = [
+ 'type' => 'header',
+ 'label' => 'Current and Former Employers',
+ 'subheader' => '(List current or most current job first)',
+ 'notes' => '<b>Note to Driver Candidates:</b> 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). <b>All Applicants:</b> start with last, or current'
+ . ' position, and work back.'
+];
+$titles = [
+ 1 => '<label class="error">1</label>',
+ 2 => '2',
+ 3 => '3',
+ 4 => '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' => '<div class="static">'.$titles[$i].'</div>',
+ '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:',
+ 'req' => ($i == 1) ? true: false,
+ 'grid' => 2
+ ];
+ ${'employment_dates_to'.$i} = [
+ 'type' => 'text',
+ 'name' => 'employment_dates_to'.$i,
+ 'placeholder' => 'To:',
+ 'req' => ($i == 1) ? true: false,
+ 'grid' => 2
+ ];
+ ${'employment_info'.$i} = [
+ 'type' => 'text',
+ 'name' => 'employment_info'.$i,
+ 'req' => ($i == 1) ? true: false,
+ 'grid' => 4
+ ];
+ ${'employment_supervisor'.$i} = [
+ 'type' => 'text',
+ 'name' => 'employment_supervisor'.$i,
+ 'placeholder' => 'Supervisor',
+ 'req' => ($i == 1) ? true: false,
+ 'grid' => 4
+ ];
+ ${'employment_salary_start'.$i} = [
+ 'type' => 'text',
+ 'name' => 'employment_salary_start'.$i,
+ 'placeholder' => 'Starting',
+ 'req' => ($i == 1) ? true: false,
+ 'grid' => 1
+ ];
+ ${'employment_salary_end'.$i} = [
+ 'type' => 'text',
+ 'name' => 'employment_salary_end'.$i,
+ 'placeholder' => 'Ending',
+ 'req' => ($i == 1) ? true: false,
+ 'grid' => 1
+ ];
+ ${'employment_position'.$i} = [
+ 'type' => 'text',
+ 'name' => 'employment_position'.$i,
+ 'req' => ($i == 1) ? true: false,
+ 'grid' => 2
+ ];
+ ${'employment_position_sub'.$i} = [
+ 'type' => 'static',
+ 'name' => 'employment_position_sub'.$i,
+ 'req' => false,
+ 'grid' => 2
+ ];
+ ${'employment_reason'.$i} = [
+ 'type' => 'text',
+ 'name' => 'employment_reason'.$i,
+ 'req' => ($i == 1) ? true: false,
+ 'grid' => 2
+ ];
+ ${'employment_reason_sub'.$i} = [
+ 'type' => 'static',
+ 'name' => 'employment_reason_sub'.$i,
+ 'req' => false,
+ '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 => '<label class="error">High School</label>',
+ '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' => '<div class="static">'.$titles3[$i].'</div>',
+ 'grid' => 2,
+ 'rcoll' => true
+ ];
+ ${'edu_school'.$i} = [
+ 'type' => 'text',
+ 'name' => 'edu_school' . $i,
+ 'label' => '',
+ 'grid' => 4,
+ 'req' => ($i == 1) ? true: false
+ ];
+ ${'edu_years'.$i} = [
+ 'type' => 'text',
+ 'name' => 'edu_years' . $i,
+ 'label' => '',
+ 'grid' => 2,
+ 'req' => ($i == 1) ? true: false
+ ];
+ ${'edu_grad_degree'.$i} = [
+ 'type' => 'text',
+ 'name' => 'edu_grad_degree' . $i,
+ 'label' => '',
+ 'grid' => 1,
+ 'req' => ($i == 1) ? true: false
+ ];
+ ${'edu_grad_certificate'.$i} = [
+ 'type' => 'text',
+ 'name' => 'edu_grad_certificate' . $i,
+ 'label' => '',
+ 'grid' => 1,
+ 'req' => ($i == 1) ? true: false
+ ];
+ ${'edu_subject'.$i} = [
+ 'type' => 'text',
+ 'name' => 'edu_subject' . $i,
+ 'label' => '',
+ 'grid' => 2,
+ 'req' => ($i == 1) ? true: 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],
+ ['type' => 'header', 'label' => 'Education & Training'],
+ [$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],
+];
--- /dev/null
+<?php
+$military_experience = [
+ 'type' => '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' => 4,
+ 'req' => false
+];
+$military_rank = [
+ 'type' => 'text',
+ 'name' => 'military_rank',
+ 'label' => 'Rank at Discharge',
+ 'grid' => 4,
+ 'req' => false
+];
+$military_discharge_date = [
+ 'type' => 'text',
+ 'name' => 'military_discharge_date',
+ 'label' => 'Date of Discharge',
+ 'grid' => 4,
+ 'req' => false
+];
+$military_reserves = [
+ 'type' => 'radio',
+ 'name' => 'military_reserves',
+ 'label' => 'Are you in the reserves?',
+ 'grid' => 6,
+ 'req' => true,
+ 'opts' => [[
+ 'name' => 'military_reserves_yes',
+ 'label' => 'Yes',
+ 'value' => 1
+ ],[
+ 'name' => 'military_reserves_no',
+ 'label' => 'No',
+ 'value' => 0]]
+];
+$military_reserves_end = [
+ 'type' => 'text',
+ 'name' => 'military_reserves_end',
+ 'label' => 'If yes, date obligation ends?',
+ 'grid' => 6,
+ 'req' => false
+];
+$military_training = [
+ 'type' => 'textarea',
+ 'name' => 'military_training',
+ 'label' => 'Special/technical training',
+ 'grid' => 12,
+ 'req' => false
+];
+$crimes_in_past_7_years = [
+ 'type' => 'radio',
+ 'name' => 'crimes_in_past_7_years',
+ 'label' => 'Have you ever been convicted of a crime in the past seven years?',
+ 'grid' => 6,
+ 'req' => true,
+ 'opts' => [[
+ 'name' => 'crimes_in_past_7_years_yes',
+ 'label' => 'Yes',
+ 'value' => 1
+ ],[
+ 'name' => 'crimes_in_past_7_years_no',
+ 'label' => 'No',
+ 'value' => 0]]
+];
+$crimes_explain = [
+ 'type' => 'text',
+ 'name' => 'crimes_explain',
+ 'label' => 'If so, where, when and nature of offense?',
+ 'grid' => 6,
+ 'req' => false
+];
+$training_skills = [
+ 'type' => 'textarea',
+ 'name' => 'training_skills',
+ 'label' => 'Please provide any additional information such as special skills, '
+ . 'training, management experiences, equipment operation or qualifications '
+ . 'you feel will be helpful to us in considering your application',
+ 'grid' => 12,
+ 'req' => false
+];
+$additional_info = [
+ 'type' => 'textarea',
+ 'name' => 'additional_info',
+ 'label' => 'State any additional information that you feel may be helpful '
+ . 'to us in considering your application.',
+ 'grid' => 12,
+ 'req' => false
+];
+$referenceReq = false;
+$nameHdr = [
+ 'type' => 'static',
+ 'label' => 'Name',
+ 'grid' => 3,
+ 'req' => $referenceReq
+];
+$addressHdr = [
+ 'type' => 'static',
+ 'label' => 'Address and Telephone',
+ 'grid' => 3,
+ 'req' => $referenceReq
+];
+$relationshipHdr = [
+ 'type' => 'static',
+ 'label' => 'Relationship',
+ 'grid' => 3,
+ 'req' => $referenceReq
+];
+$yearHdr = [
+ 'type' => 'static',
+ 'label' => 'Years Acquainted',
+ 'grid' => 3,
+ 'req' => $referenceReq
+];
+for ($i = 1; $i <= 3; ++$i) {
+ $referenceReq = false;
+ ${'name'.$i} = [
+ 'type' => 'text',
+ 'name' => 'name' . $i,
+ 'label' => '',
+ 'grid' => 3,
+ 'req' => $referenceReq
+ ];
+ ${'address'.$i} = [
+ 'type' => 'text',
+ 'name' => 'address' . $i,
+ 'label' => '',
+ 'grid' => 3,
+ 'req' => $referenceReq
+ ];
+ ${'relationship'.$i} = [
+ 'type' => 'text',
+ 'name' => 'relationship' . $i,
+ 'label' => '',
+ 'grid' => 3,
+ 'req' => $referenceReq
+ ];
+ ${'year'.$i} = [
+ 'type' => 'text',
+ 'name' => 'years' . $i,
+ 'label' => '',
+ 'grid' => 3,
+ 'req' => $referenceReq
+ ];
+}
+$form = [
+ ['type' => 'header', 'label' => 'Military Service Record'],
+ [$military_experience, $military_branch],
+ [$military_date_entered, $military_rank, $military_discharge_date],
+ [$military_reserves, $military_reserves_end],
+ [$military_training],
+ ['type' => 'header', 'label' => 'Additional Information'],
+ [$crimes_in_past_7_years, $crimes_explain],
+ [$training_skills],
+ [$additional_info],
+ ['type' => 'header', 'label' => 'References'],
+ [$nameHdr, $addressHdr, $relationshipHdr, $yearHdr],
+ [$name1, $address1, $relationship1, $year1],
+ [$name2, $address2, $relationship2, $year2],
+ [$name3, $address3, $relationship3, $year3],
+];
--- /dev/null
+<?php
+$topHeader = [
+ 'type' => 'header',
+ 'label' => 'Please Read Carefully',
+ 'subheader' => 'Application Form Waiver: Please read the following statements '
+ . 'carefully before signing to indicate your understanding',
+ 'notes' => 'I authorize investigation of all statements contained in this
+ application. I hereby give the Company permission to contact schools,
+ previous employers (unless otherwise indicated), references, and others.
+ I hereby release the Company, or any prior employer, or reference from any
+ liability as a result of such contact, for providing factual information.
+ I certify that the facts contained in this application are true, accurate,
+ and complete to the best of my knowledge. I understand that, if employed,
+ falsified statements or omitted material facts on this application may
+ result in my disqualification from consideration for employment, or
+ termination from employment if I have been hired.</p><p>I understand that
+ (1) the Company has a drug and alcohol policy that provides for pre-employment
+ testing as well as testing after employment; (2) consent to and compliance
+ with such policy is a condition of my employment; and (3) continued
+ employment is based on the successful passing of testing under such
+ policy.</p><p>I understand and agree that, if hired, my employment is
+ "At-Will" and that either the company or I may terminate the employment
+ relationship at any time with or without cause and with or without notice.
+ I further understand that this employment relationship may not be modified
+ by verbal statements, customs, practices, or written documents unless
+ such modification is in writing and signed by the President of the
+ company.</p><p>I understand that, in connection with the routine processing
+ of your employment application, the Company may request from a consumer
+ reporting agency an investigative consumer report including information
+ as to my credit records, character, general reputation, personal
+ characteristics, and mode of living. Upon written request from me, the
+ Company, will provide me with additional information concerning the
+ nature and scope of any such report requested by it, as required by the
+ Fair Credit Reporting Act.</p><p>Preston Feather Building Centers is an
+ equal opportunity employer. You will be considered for all positions
+ without regard to race, color, religion, weight, height, sex, national
+ origin, marital status, veteran status, the presence of a non-job related
+ medical condition, disability or any other protected status required by
+ law.</p><p>Under Michigan law, disabled employees and applicants must
+ request an accommodation of their disability by notifying the firm in
+ writing of the need for accommodation within 182 days of the date the
+ disabled individual knows or should know that an accommodation is needed.
+ Failure to properly notify the firm may preclude any claim that the employer
+ failed to accommodate the disabled individual.'
+];
+
+$name_of_applicant = [
+ 'type' => 'text',
+ 'name' => 'name_of_applicant',
+ 'label' => 'Name of Applicant',
+ 'grid' => 6,
+ 'req' => true
+];
+$agree_form_waiver = [
+ 'type' => 'checkbox',
+ 'name' => 'agree_form_waiver',
+ 'label' => 'Do you agree to the above terms? By clicking Yes, you consent '
+ . 'that you have read and understand the above terms.',
+ 'grid' => 12,
+ 'req' => true,
+ 'opts' => [[
+ 'name' => 'agree_form_waiver',
+ 'label' => 'I Agree',
+ 'value' => 1
+ ]]
+];
+$form = [
+ $topHeader,
+ [$name_of_applicant],
+ [$agree_form_waiver]
+];
\ No newline at end of file
--- /dev/null
+<?php
+$topHeader = [
+ 'type' => 'header',
+ 'label' => 'Drug Test Consent Form',
+ 'subheader' => 'Consent for Pre-Employment drug test screen and Release '
+ . 'Covenant not to sue and indemnity agreement.',
+ 'notes' => 'I hereby give my consent for Preston Feather Building Centers, '
+ . 'through an authorized testing service of its choice, to collect blood, '
+ . 'hair, urine, or saliva samples from me and to conduct any other necessary '
+ . 'medical tests to determine the presence of alcohol, drugs or controlled '
+ . 'substances, and I hereby release Preston Feather Building Centers from any '
+ . 'liability arising out of such test or its results. Further, I give my '
+ . 'consent for the release of the test results and other relevant medical '
+ . 'information to authorized Preston Feather Building Center’s management '
+ . 'for appropriate review. I hereby release and agree to indemnify and hold '
+ . 'harmless, Preston Feather Building Centers, the laboratory, the testing '
+ . 'service and their officers, agents and employees for any damages, costs '
+ . 'and expenses arising out of the testing or release of its results. If I '
+ . 'am accepted for employment by Preston Feather Building Centers, I hereby '
+ . 'consent to be tested in the above manner during my employment when, in '
+ . 'the Company’s judgment, such testing is appropriate and I acknowledge '
+ . 'that remaining free of illegal drug use and complying with the Company\'s '
+ . 'substance abuse policy is a condition of my employment.'
+];
+
+$name_of_applicant = [
+ 'type' => 'text',
+ 'name' => 'name_of_applicant',
+ 'label' => 'Name of Applicant',
+ 'grid' => 6,
+ 'req' => true
+];
+$agree_form_waiver = [
+ 'type' => 'checkbox',
+ 'name' => 'agree_form_waiver',
+ 'label' => 'Do you agree to the above terms? By clicking Yes, you consent '
+ . 'that you have read and understand the above terms.',
+ 'grid' => 4,
+ 'req' => true,
+ 'opts' => [[
+ 'name' => 'agree_form_waiver',
+ 'label' => 'I Agree',
+ 'value' => 1
+ ]]
+];
+$form = [
+ $topHeader,
+ [$name_of_applicant],
+ [$agree_form_waiver]
+];
\ No newline at end of file
--- /dev/null
+<?php
+$topHeader = [
+ 'type' => 'header',
+ 'label' => 'Summary of Rights under Fair Credit Reporting Act',
+ 'subheader' => '',
+ 'notes' => 'The federal Fair Credit Reporting Act (FCRA) promotes the '
+ . 'accuracy, fairness, and privacy of information in the files of consumer '
+ . 'reporting agencies. There are many types of consumer reporting agencies, '
+ . 'including credit bureaus and specialty agencies (such as agencies that sell '
+ . 'information about check writing histories, medical records, and rental '
+ . 'history records). Here is a summary of your major rights under the FCRA. '
+ . '<b>For more information, including information about additional rights, go '
+ . 'to <a href="http://www.ftc.gov/credit">www.ftc.gov/credit</a> '
+ . 'or write to: Consumer Response Center, Room 130-A, Federal trade '
+ . 'Commission, 600 Pennsylvania Ave. N.W., Washington D.C. 20580.</b></p>'
+ . '<ul class="glm-emp-forms-ul">'
+ . '<li><b>You must be told if information in your file has been used against you.</b> '
+ . 'Anyone who uses a credit report or another type of consumer report to deny '
+ . 'your application for credit, insurance, or employment – or to take another '
+ . 'adverse action against you – must tell you, and must give you the name, '
+ . 'address and phone number of the agency that provided the information.'
+ . '</li><li><b>You have a right to know what is in your file.</b> You may request and '
+ . 'obtain all the information about you in the files of a consumer reporting '
+ . 'agency (your “file disclosure”). You will be required to provide proper '
+ . 'identification, which may include our Social Security number. In many cases, '
+ . 'the disclosure will be free. You are entitled to a free file disclosure if:'
+ . '<ul class="glm-emp-forms-ul">'
+ . '<li>A person has taken adverse action against you because of information in your credit report;</li>'
+ . '<li>You are the victim of identity theft and place a fraud alert in your file;</li>'
+ . '<li>Your file contains inaccurate information as a result of fraud;</li>'
+ . '<li>You are on public assistance;</li>'
+ . '<li>You are unemployed but expect to apply for employment within 60 days. '
+ . 'In addition, by September 2005, all consumers will be entitled to one free '
+ . 'disclosure every 12 months upon request from each nationwide specialty consumer '
+ . 'reporting agencies. See <a href="http://www.ftc.gov/credit">www.ftc.gov/credit</a> '
+ . 'for additional information.</ul></li>'
+ . '<li><b>You have the right to ask for a credit score.</b> Credit scores '
+ . 'are numerical summaries of our credit-worthiness based on information '
+ . 'from credit bureaus. You may request a credit score from consumer reporting '
+ . 'agencies that create scores or distribute scores used in residential real '
+ . 'property loans, but you will have to pay for it. In some mortgage transactions, '
+ . 'you will receive credit score information for free from the mortgage lender.</li>'
+ . '<li><b>You have the right to dispute incomplete or inaccurate information.</b> '
+ . 'If you identify information in your file that is incomplete or inaccurate, '
+ . 'and report it to the consumer reporting agency, the agency must investigate '
+ . 'unless your dispute is frivolous. See <a href="http://www.ftc.gov/credit">www.ftc.gov/credit</a>'
+ . ' for an explanation of dispute procedures.</li>'
+ . '<li><b>Consumer reporting agencies must correct or delete inaccurate, incomplete or unverifiable information.</b> Inaccurate, incomplete or unverifiable information must be removed or corrected, usually within 30 days. However, a consumer reporting agency may continue to report information it has verified as correct.</li>'
+ . '<li><b>Consumer reporting agencies may not report outdated negative information.</b> In most cases, a consumer reporting agency may not report negative information that is more than seven years old, or bankruptcies that are more than 10 years old.</li>'
+ . '<li><b>Access to your file is limited.</b> A consumer reporting agency may provide information about you only to people with a valid need – usually to consider an application with a creditor, insurer, employer, landlord, or other business. The FCRA specifies those with a valid need for access.</li>'
+ . '<li><b>You must give your consent for reports to be provided to employers.</b> A consumer reporting agency may not give out information about you to your employer, or a potential employer, without written consent given to the employer. For more information, go to www.ftc.gov/credit.</li>'
+ . '<li><b>You may limit "prescreened" offers of credit and insurance you get based on information in your credit report.</b> Unsolicited “prescreened” offers for credit and insurance must include a toll-free phone number you can call if you choose to remove your name and address from the lists these offers are based on. You may opt-out with the nationwide credit bureaus at 1-888-5OPTOUT (1-888-567-8688).</li>'
+ . '<li><b>You may seek damages from violators.</b> If a consumer reporting agency, or, in some cases, a user of consumer reports or a furnisher of information to a consumer reporting agency violates the FCRA, you may be able to sue in state or federal court.</li>'
+ . '<li><b>Identity theft victims and active duty military personnel have additional rights.</b> For more information, visit www.ftc.gov/credit.</li>'
+ . ''
+ . '</li>'
+ . '</ul><p>'
+ . 'States may enforce the FCRA, and many states have their own consumer reporting laws. In some cases, you may have more rights under state law. For more information, contact your state or local consumer protection agency or your state Attorney General. Federal enforcers are:'
+ . '<table>'
+ . '<thead><tr>'
+ . '<th><i>For Questions or Concerns Regarding:</i></th>'
+ . '<th><i>Please Contact:</i></th>'
+ . '</tr></thead>'
+ . '<tr>'
+ . '<td>Consumer reporting agencies, creditors and others not listed below</td>'
+ . '<td>Federal Trade Commission, Bureau of Consumer Protection, FCRA, Washington DC, 20580. 1-877-382-4357</td>'
+ . '</tr>'
+ . '<tr>'
+ . '<td>National banks, federal branches/agencies of foreign banks (word “National” or initials “N.A.” appear in or after bank’s name)</td>'
+ . '<td>Office of the Comptroller of the Currency Compliance Management, Mail Stop 6-6, Washington DC, 20219. 800-613-6743</td>'
+ . '</tr>'
+ . '<tr>'
+ . '<td>Federal Reserve System member banks (except national banks, and federal branches/agencies of foreign banks)</td>'
+ . '<td>Federal Reserve Board, Division of Consumer & Community Affairs, Washington DC, 20551. 202-452-3693</td>'
+ . '</tr>'
+ . '<tr>'
+ . '<td>Savings associations and federally chartered savings banks (word “Federal” or initials “F.S.B.” appear in federal institution’s name)</td>'
+ . '<td>Office of Thrift Supervision, Consumer Complaints, Washington DC, 20552. 800-842-6929</td>'
+ . '</tr>'
+ . '<tr>'
+ . '<td>Federal credit unions (words “Federal Credit Union” appear in institution’s name)</td>'
+ . '<td>National Credit Union Administration, 1775 Duke Street, Alexandria VA, 22314. 703-519-4600</td>'
+ . '</tr>'
+ . '<tr>'
+ . '<td>State-chartered banks that are not members of the Federal Reserve System</td>'
+ . '<td>Federal Deposit Insurance Corp., Consumer Response Center, 2345 Grand Avenue, Suite 100, Kansas City, Missouri, 64108-2638 877-275-3342</td>'
+ . '</tr>'
+ . '<tr>'
+ . '<td>Air, surface or rail common carriers regulated by former Civil Aeronautics Board or Interstate Commerce Commission</td>'
+ . '<td>Department of Transportation, Office of Financial Management, Washington DC, 20590. 202-366-1306</td>'
+ . '</tr>'
+ . '<tr>'
+ . '<td>Activities subject to the Packers and Stockyards Act, 1921</td>'
+ . '<td>Department of Agriculture, Office of Deputy Administrator-GIPSA, Washington DC, 20205. 202-720-7051</td>'
+ . '</tr>'
+ . '</table>'
+];
+
+$app_name = [
+ 'type' => 'text',
+ 'name' => 'app_name',
+ 'label' => 'Applicants Name',
+ 'grid' => 6,
+ 'req' => true
+];
+$app_address = [
+ 'type' => 'text',
+ 'name' => 'app_address',
+ 'label' => 'Address',
+ 'grid' => 6,
+ 'req' => true
+];
+$app_city = [
+ 'type' => 'text',
+ 'name' => 'app_city',
+ 'label' => 'City',
+ 'grid' => 4,
+ 'req' => true
+];
+$app_state = [
+ 'type' => 'text',
+ 'name' => 'app_state',
+ 'label' => 'State',
+ 'grid' => 4,
+ 'req' => true
+];
+$app_zip = [
+ 'type' => 'text',
+ 'name' => 'app_zip',
+ 'label' => 'Zip',
+ 'grid' => 4,
+ 'req' => true
+];
+$app_social = [
+ 'type' => 'text',
+ 'name' => 'app_social',
+ 'label' => 'Social Security Number',
+ 'grid' => 6,
+ 'req' => true
+];
+
+$agree_form_waiver2 = [
+ 'type' => 'checkbox',
+ 'name' => 'agree_form_waiver2',
+ 'label' => 'Do you agree to the above terms? By clicking Yes, you consent '
+ . 'that you have read and understand the above terms.',
+ 'grid' => 4,
+ 'req' => true,
+ 'opts' => [[
+ 'name' => 'agree_form_waiver2',
+ 'label' => 'I Agree',
+ 'value' => 1
+ ]]
+];
+$header2 = [
+ 'type' => 'header',
+ 'label' => 'Disclosure to Employment Applicant',
+ 'subheader' => '',
+ 'notes' => '<p>In connection with your application for employment, or during the course of your employment, we may procure a consumer report on you. In the event that information from the report is utilized in whole or in part in making an adverse decision with regard to your employment, before making the adverse decision, we will provide you with a copy of the consumer report and a description in writing of your rights under the law.</p>'
+ . '<p>Please be advised that we may also obtain an investigative report including information as to your character, general reputation, and personal characteristics. This information may be obtained by contacting your previous employers or references applied by you. Please be advised that you have the right to request, in writing, within a reasonable time, that we make a complete and accurate disclosure of the nature and scope of the information requested. Such disclosure will be made to you within 5 days of the date on which we receive the request from you or within 5 days of the time the report was finished.</p>'
+ . '<p>The Fair Credit Reporting Act gives you specific rights in dealing with consumer reporting agencies. You will find these rights summarized on the next page (see Summary of Rights).</p>'
+ . '<p>By your signature below, you hereby authorize us to obtain a consumer report about you in order to consider you for employment.</p>'
+];
+$copies = [
+ 'type' => 'radio',
+ 'name' => 'copies',
+ 'label' => 'Please provide me with a copy of the reports obtained',
+ 'grid' => 4,
+ 'req' => true,
+ 'opts' => [[
+ 'name' => 'copies_yes',
+ 'label' => 'Yes',
+ 'value' => 1
+ ],[
+ 'name' => 'copies_no',
+ 'label' => 'No',
+ 'value' => 0]]
+];
+$form = [
+ $topHeader,
+ $header2,
+ [$app_name],
+ [$app_address],
+ [$app_city, $app_state, $app_zip],
+ [$app_social],
+ [$agree_form_waiver2]
+];
--- /dev/null
+<?php
+
+defined('ABSPATH') or die();
+
+/**
+ * AdminConroller
+ *
+ * Controller for all of the admin functionality
+ */
+class emmet_employment_admin
+{
+ /**
+ * Plugin Directory Name
+ * @var type
+ */
+ public $pluginDirName;
+ /**
+ * Wordpress Database object
+ * @var type
+ */
+ public $wpdb;
+
+ /**
+ * Register Hooks and Actions
+ */
+ public function __construct($path, $wpdb)
+ {
+ $this->pluginDirName = $path;
+ $this->wpdb = $wpdb;
+ $jobs = new emmet_employment_job($path);
+ //add_action('admin_menu', array($this, 'add_job_menus'));
+ }
+
+ /**
+ * Add job menus
+ */
+ public function add_job_menus()
+ {
+ add_submenu_page(
+ 'edit.php?post_type=' . EMMET_EMP_POST_TYPE,
+ 'applications',
+ 'Applications',
+ 'edit_posts',
+ 'applications',
+ array($this, 'get_applications')
+ );
+// add_submenu_page(
+// 'edit.php?post_type=' . EMMET_EMP_POST_TYPE,
+// 'settings',
+// 'Settings',
+// 'manage_options',
+// 'job_settings',
+// array($this, 'show_job_settings')
+// );
+ }
+
+ /**
+ * show job settings
+ */
+ public function show_job_settings()
+ {
+ echo '<p>Job Settings</p>';
+ }
+
+ /**
+ * Show the applications
+ *
+ * Will check the Get action and see if it needs to view the application
+ * or show the application list
+ */
+ public function get_applications()
+ {
+ $action = (isset($_GET['action']))
+ ? filter_var($_GET['action'], FILTER_SANITIZE_STRING)
+ : null;
+ switch ($action) {
+ case 'view':
+ $this->view_application();
+ break;
+ default:
+ $this->show_applications();
+ break;
+ }
+ }
+
+ /**
+ * View the application for one id
+ */
+ public function view_application()
+ {
+ wp_enqueue_script(
+ 'foundation',
+ get_template_directory_uri() . '/js/app.js',
+ 'jquery',
+ '1.0',
+ true
+ );
+ wp_enqueue_style('foundation',
+ get_template_directory_uri() . '/css/app.js');
+ $id = filter_var($_REQUEST['application'], FILTER_VALIDATE_INT);
+ $sql = "
+ SELECT *
+ FROM " . $this->wpdb->prefix . EMMET_EMP_APPLICATION_TABLE . "
+ WHERE id = $id";
+ $data = $this->wpdb->get_row($sql, ARRAY_A);
+ if ($data) {
+ $sql = "
+ SELECT *
+ FROM " . $this->wpdb->prefix . EMMET_EMP_FORM_TABLE . "
+ WHERE application = $id
+ ORDER BY form_part";
+ $formData = $this->wpdb->get_results($sql, ARRAY_A);
+ foreach ($formData as $form) {
+ $forms[] = unserialize($form['form_data']);
+ }
+ }
+ echo '<div class="wrap">';
+ $viewPath = $this->pluginDirName . 'views/admin/';
+// $form1 = unserialize($formData[0]['form_data']);
+ include $viewPath . 'view-application.php';
+ echo '</div>';
+ }
+
+ /**
+ * Show application list
+ */
+ public function show_applications()
+ {
+ $path = plugin_dir_path(EMMET_EMP_PLUGIN_PATH_FILE);
+ include $path . 'models/class-glm-list-table.php';
+ include $path . 'models/list-applications.php';
+ $applicationList = new List_Applications($this->wpdb);
+ include $this->pluginDirName . 'views/admin/applicationList.php';
+ }
+
+ /**
+ * Sets the plugin directory
+ *
+ * @param type $dir Directory name
+ *
+ * @return void
+ */
+ public function setPluginDir($dir)
+ {
+ $this->pluginDirName = $dir;
+ }
+
+}
--- /dev/null
+<?php
+
+defined('ABSPATH') or die();
+
+/**
+ * AdminConroller
+ *
+ * Controller for all of the admin functionality
+ */
+class emmet_employment_front
+{
+ // class properties
+ public $pluginDirName;
+ public $viewDir;
+ public $adminViewDir;
+ public $frontViewDir;
+ public $settingDir;
+ public $formSuccess;
+ public $formFail;
+ public $formSubmitted;
+ public $errorCount = 0;
+ public $wpdb;
+ public $formTable;
+ public $appTable;
+ public $fname;
+ public $lname;
+ public $mname;
+ public $job;
+ public $resume;
+ public $appId;
+ public $formId;
+ public $jobTitle;
+
+ // class constants
+ const FORM_VAR = 'applyOnline';
+ const FORM_SETTINGS_DIR = 'config';
+ const FORM_VIEW_DIR = 'views';
+ const FINAL_FORM = 8;
+ const FORM_TEMPLATE = 'formTemplate.php';
+ const SUCCESS_TEMPLATE = 'thankYou.php';
+
+ /**
+ * Register Hooks and Actions
+ */
+ public function __construct($path, $wpdb)
+ {
+ $this->pluginDirName = $path;
+ $this->wpdb = $wpdb;
+ add_shortcode('emmetjobs', array($this, 'emmet_jobs_shortcode'));
+ $jobs = new emmet_employment_job($path);
+ $this->set_form_state();
+ $this->formTable = $wpdb->prefix . EMMET_EMP_FORM_TABLE;
+ $this->appTable = $wpdb->prefix . EMMET_EMP_APPLICATION_TABLE;
+ add_action('init', array($this, 'startJobSession'));
+ $this->viewDir = $this->pluginDirName . self::FORM_VIEW_DIR;
+ $this->adminViewDir = $this->viewDir . '/admin';
+ $this->frontViewDir = $this->viewDir . '/front';
+ $this->settingDir = $this->pluginDirName . self::FORM_SETTINGS_DIR;
+ }
+
+ /**
+ * Set the form state
+ *
+ * $this->formSubmitted will be true if the form has the
+ * self::FORM_VAR set
+ */
+ public function set_form_state()
+ {
+ $this->formSubmitted = isset($_POST[self::FORM_VAR]);
+ }
+
+ /**
+ * Job display short code
+ *
+ * @param type $atts Attributes
+ */
+ public function emmet_jobs_shortcode($atts)
+ {
+ extract(shortcode_atts(array('limit' => '10'), $atts));
+ $applyOnline = (isset($_REQUEST[self::FORM_VAR]))
+ ? filter_var($_REQUEST[self::FORM_VAR], FILTER_VALIDATE_INT)
+ : false;
+ $job_id = (isset($_REQUEST['job']))
+ ? filter_var($_REQUEST['job'], FILTER_VALIDATE_INT)
+ : false;
+
+ ob_start();
+ if ($applyOnline) {
+ $this->show_apply_form();
+ } else if ($job_id) {
+ $this->show_job($job_id);
+ } else {
+ $this->search_form();
+ $this->list_jobs();
+ }
+ $output = ob_get_contents();
+ ob_end_clean();
+ return $output;
+ }
+
+ /**
+ * Load the form setting from the config file
+ *
+ * @param type $form_part Form part to load
+ *
+ * @return type
+ */
+
+ public function load_form_settings($form_part = '')
+ {
+ include $this->settingDir . "/settings{$form_part}.php";
+ return $form;
+ }
+
+ /**
+ * Show the application form
+ */
+ public function show_apply_form()
+ {
+ $formPart = (isset($_REQUEST['form_part']))
+ ? filter_var($_REQUEST['form_part'], FILTER_VALIDATE_INT)
+ : false;
+
+ // form Action
+ $formAction = '';
+ switch ($formPart) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ if ($this->formSubmitted) {
+ $this->appId = $appId = (isset($_REQUEST['appId'])) ? filter_var($_REQUEST['appId'], FILTER_VALIDATE_INT): null;
+ $form = $this->form_process($formPart);
+
+ if (!$this->appId && $this->fname) {
+ // insert new application and form data
+ $appId = $this->store_application_data($form);
+ }
+ //check for errors
+ if ($this->errorCount > 0) {
+ include $this->frontViewDir . '/' . self::FORM_TEMPLATE;
+ } else {
+ $this->store_form_data($form, $formPart);
+ // next form part
+ ++$formPart;
+ if ($formPart == self::FINAL_FORM) {
+ include $this->frontViewDir . '/' . self::SUCCESS_TEMPLATE;
+ unset($_SESSION['emmetJobsApplication'], $_SESSION['emmetJobsAppForm']);
+ } else {
+ $form = $this->load_form_settings($formPart);
+ include $this->frontViewDir . '/' . self::FORM_TEMPLATE;
+ }
+ }
+ } else {
+ wp_die('An Error!:(');
+ }
+ break;
+ default:
+ unset($_SESSION['emmetJobsApplication'], $_SESSION['emmetJobsAppForm']);
+ if ($jobId = filter_var($_REQUEST['job'], FILTER_VALIDATE_INT)) {
+ $jobData = get_post($jobId);
+ $this->jobTitle = $jobTitle = $jobData->post_title;
+ }
+ $formPart = 1;
+ $form = $this->load_form_settings($formPart);
+ include $this->frontViewDir . '/' . self::FORM_TEMPLATE;
+ break;
+ }
+ }
+
+ /**
+ * Store the application resume file into the directory and the database table
+ *
+ * @return boolean
+ */
+ public function store_resume_file()
+ {
+// echo '<pre>'.print_r($form, true).'</pre>';
+ if (!$appId = filter_var($_REQUEST['appId'], FILTER_VALIDATE_INT)) {
+ return false;
+ }
+// echo '<pre>'.print_r($_FILES, true).'</pre>';
+ preg_match("%\.[A-Za-z]*$%", $_FILES['resume_file']['name'], $ext);
+ $size = getImageSize($_FILES['resume_file']['tmp_name']);
+ $resumeFile = tempnam(EMMET_EMP_UPLOAD_DIR, "RESUME");
+ unlink($resumeFile);
+ $resumeFile = $resumeFile.$ext[0];
+ if (move_uploaded_file($_FILES['resume_file']['tmp_name'], $resumeFile)) {
+ $resumeFile = basename($resumeFile);
+ $this->wpdb->update(
+ $this->appTable,
+ array('resume' => $resumeFile),
+ array('id' => $appId),
+ array('%s'),
+ array('%d')
+ );
+ }
+ }
+
+ /**
+ * Store the main application form data
+ *
+ * @param type $form Form array
+ *
+ * @return type
+ */
+ public function store_application_data($form)
+ {
+ $appId = (isset($_REQUEST['appId']))
+ ? filter_var($_REQUEST['appId'], FILTER_VALIDATE_INT)
+ : null;
+ $this->appId = (isset($_SESSION['emmetJobsApplication']))
+ ? filter_var($_SESSION['emmetJobsApplication'], FILTER_VALIDATE_INT)
+ : null;
+ if ($appId) {
+ return $appId;
+ } else if ($this->appId) {
+ return $this->appId;
+ }
+ $this->wpdb->insert(
+ $this->appTable,
+ array(
+ 'create_time' => date('Y-m-d, h:i:s a'),
+ 'fname' => $this->fname,
+ 'lname' => $this->lname,
+ 'mname' => $this->mname,
+ 'position' => $this->job
+ ),
+ array(
+ '%s',
+ '%s',
+ '%s',
+ '%s',
+ '%d'
+ )
+ );
+ $this->appId = $this->wpdb->insert_id;
+ $_SESSION['emmetJobsApplication'] = $this->appId;
+ return $this->appId;
+ }
+
+ /**
+ * Store the data for the form to the database per form part
+ *
+ * @param type $form Form array
+ * @param type $form_part Part number
+ *
+ * @return boolean
+ */
+ public function store_form_data($form, $form_part)
+ {
+ // check if there's one stored first
+ if (!$this->appId) {
+ return false;
+ }
+ $sql = "
+ SELECT id
+ FROM {$this->formTable}
+ WHERE application = {$this->appId}
+ AND form_part = {$form_part}";
+ $formData = $this->wpdb->get_row($sql, ARRAY_A);
+ if ($formData) {
+ $this->wpdb->replace(
+ $this->formTable,
+ array(
+ 'id' => $formData['id'],
+ 'create_time' => date('Y-m-d, h:i:s a'),
+ 'application' => $this->appId,
+ 'form_data' => serialize($form),
+ 'form_part' => $form_part
+ ),
+ array(
+ '%d',
+ '%s',
+ '%d',
+ '%s',
+ '%d'
+ )
+ );
+ } else {
+ $this->wpdb->insert(
+ $this->formTable,
+ array(
+ 'create_time' => date('Y-m-d, h:i:s a'),
+ 'application' => $this->appId,
+ 'form_data' => serialize($form),
+ 'form_part' => $form_part
+ ),
+ array(
+ '%s',
+ '%d',
+ '%s',
+ '%d'
+ )
+ );
+ }
+
+ if (isset($_FILES['resume_file']) && !$_FILES['resume_file']['error']) {
+ $this->store_resume_file($form);
+ }
+
+ $this->formId = $this->wpdb->insert_id;
+ $_SESSION['emmetJobsAppForm'] = array(
+ 'id' => $this->formId,
+ 'part' => $form_part
+ );
+ }
+
+ /**
+ * Process the form by form part number
+ *
+ * @param type $part Form number
+ *
+ * @return string
+ */
+ public function form_process($part)
+ {
+ $this->clean_post();
+
+ $form = $this->load_form_settings($part);
+ if ($jobId = filter_var($_REQUEST['job'], FILTER_VALIDATE_INT)) {
+ $this->job = $jobId;
+ }
+ foreach ($form as $rowKey => $row) {
+ if (isset($row['type']) && $row['type'] == 'header') {
+ continue;
+ }
+ foreach ($row as $fieldKey => $field) {
+ if (!isset($field['name'])) {
+ continue;
+ }
+ $form[$rowKey][$fieldKey]['value']
+ = filter_input(INPUT_POST, $field['name'], FILTER_SANITIZE_STRING);
+ if (in_array($field['name'], array('fname', 'lname', 'mname'))) {
+ $this->$field['name'] = $form[$rowKey][$fieldKey]['value'];
+ }
+ if ( ($field['type'] == 'checkbox' || $field['type'] == 'radio')
+ && isset($field['opts']) && !empty($field['opts'])
+ ) {
+
+ foreach ($field['opts'] as $opKey => $option) {
+ if (isset($_POST[$field['name']])) {
+ $form[$rowKey][$fieldKey]['opts'][$opKey]['checked'] = true;
+ if ($field['type'] == 'checkbox') {
+ $_POST[$option['name']] = $option['value'];
+ }
+
+ }
+ }
+ }
+ if ( isset($field['req'])
+ && $field['req'] == true
+ && $_POST[$field['name']] == ''
+ && (isset($field['type']))
+ ) {
+ $form[$rowKey][$fieldKey]['error'] = $field['label'] . ' is required!';
+ ++$this->errorCount;
+ }
+
+ if ( isset($field['rule'])
+ && $_POST[$field['name']] != ''
+ ) {
+ switch ($field['rule']) {
+ case 'email':
+ $email = filter_var($_REQUEST[$field['name']], FILTER_VALIDATE_EMAIL);
+ if (!$email) {
+ $form[$rowKey][$fieldKey]['error'] = $field['label'] . ' is not an email!';
+ ++$this->errorCount;
+ }
+ break;
+ default:
+ break;
+ }
+
+ }
+ }
+ }
+ return $form;
+ }
+
+ /**
+ * Clean the post array (trim each field)
+ */
+ public function clean_post()
+ {
+ foreach ($_POST as $key => $val) {
+ $_POST[$key] = trim($val);
+ }
+ }
+
+ /**
+ * Display the job for given id
+ *
+ * @global type $wpdb Word Press Database Object
+ * @global type $wp Wordpress global $wp variable
+ *
+ * @param type $job_id Job id to display
+ *
+ * @return type
+ */
+ public function show_job($job_id)
+ {
+ global $wpdb, $wp;
+ $job = get_post($job_id);
+ $custom = get_post_custom($job->ID);
+ $job->emmet_jobs_startdate = $custom['emmet_jobs_startdate'][0];
+ $job->emmet_jobs_enddate = $custom['emmet_jobs_enddate'][0];
+ $job->emmet_jobs_contact = $custom['emmet_jobs_contact'][0];
+ $job->emmet_jobs_status = $custom['emmet_jobs_status'][0];
+ $job->emmet_jobs_pay_grade = $custom['emmet_jobs_pay_grade'][0];
+ $job->emmet_jobs_shift = $custom['emmet_jobs_shift'][0];
+ $job->emmet_jobs_email = $custom['emmet_jobs_email'][0];
+ $job->emmet_jobs_comments = $custom['emmet_jobs_comments'][0];
+ $job->emmet_jobs_code = $custom['emmet_jobs_code'][0];
+ //$current_url = esc_url(add_query_arg($wp->query_string, '', home_url($wp->request)));
+ //$applyOnlineHref = $current_url
+ //. ((strpos($current_url, '?')) ? '&' : '?')
+ //. self::FORM_VAR . "=1&job=" . $job->ID;
+ include $this->frontViewDir . '/jobDetail.php';
+ return;
+ }
+
+ /**
+ * List the jobs that are currently set to display
+ * based on start and end dates
+ *
+ * @global type $wpdb Word Press Database Object
+ * @global type $wp Global WP object
+ *
+ * @return type
+ */
+ public function list_jobs()
+ {
+ global $wpdb, $wp;
+ $midnight = strtotime(date('Y-m-d',time()).' 00:00:00');
+ $emmet_jobscategory = (isset($_REQUEST['emmet_jobscategory']))
+ ? filter_var($_REQUEST['emmet_jobscategory'])
+ : false;
+ $emmet_jobsdepartment = (isset($_REQUEST['emmet_jobsdepartment']))
+ ? filter_var($_REQUEST['emmet_jobsdepartment'])
+ : false;
+ $args = array(
+ 'post_type' => EMMET_EMP_POST_TYPE,
+ 'meta_query' => array(
+ array(
+ 'key' => 'emmet_jobs_enddate',
+ 'value' => $midnight,
+ 'compare' => '>='
+ ),
+ array(
+ 'key' => 'emmet_jobs_startdate',
+ 'value' => $midnight,
+ 'compare' => '<='
+ )
+ )
+ );
+ if ($emmet_jobscategory || $emmet_jobsdepartment) {
+ $args['tax_query'] = array(
+ 'relation' => 'AND'
+ );
+ if ($emmet_jobscategory) {
+ $args['tax_query'][] = array(
+ 'taxonomy' => 'emmet_jobscategory',
+ 'field' => 'id',
+ 'terms' => $emmet_jobscategory
+ );
+ }
+ if ($emmet_jobsdepartment) {
+ $args['tax_query'][] = array(
+ 'taxonomy' => 'emmet_jobsdepartment',
+ 'field' => 'id',
+ 'terms' => $emmet_jobsdepartment
+ );
+ }
+ }
+ $jobs = get_posts($args);
+ $totalJobs = count($jobs);
+ $current_url = esc_url(add_query_arg($wp->query_string, '', home_url($wp->request)));
+ $iterator = 1;
+ foreach ($jobs as $job) {
+ $custom = get_post_custom($job->ID);
+ $job->end = false;
+ $job->emmet_jobs_startdate = $custom['emmet_jobs_startdate'][0];
+ $job->emmet_jobs_enddate = $custom['emmet_jobs_enddate'][0];
+ $job->emmet_jobs_contact = $custom['emmet_jobs_contact'][0];
+ $job->emmet_jobs_status = $custom['emmet_jobs_status'][0];
+ $job->emmet_jobs_pay_grade = $custom['emmet_jobs_pay_grade'][0];
+ $job->emmet_jobs_shift = $custom['emmet_jobs_shift'][0];
+ $job->emmet_jobs_email = $custom['emmet_jobs_email'][0];
+ $job->emmet_jobs_comments = $custom['emmet_jobs_comments'][0];
+ $job->emmet_jobs_code = $custom['emmet_jobs_code'][0];
+ $job->href = $current_url
+ . ((strpos($current_url, '?')) ? '&' : '?')
+ . "job=" . $job->ID;
+ if ($iterator == $totalJobs) {
+ $job->end = true;
+ }
+ ++$iterator;
+ }
+ include $this->frontViewDir . '/jobList.php';
+ return;
+ }
+
+ /**
+ * Front end job search form
+ */
+ public function search_form()
+ {
+ $emmet_jobscategory = (isset($_REQUEST['emmet_jobscategory']))
+ ? filter_var($_REQUEST['emmet_jobscategory'], FILTER_VALIDATE_INT)
+ : false;
+ $cat_args = array(
+ 'show_option_all' => 'Show All',
+ 'show_option_none' => '',
+ 'orderby' => 'name',
+ 'order' => 'ASC',
+ 'show_count' => 0,
+ 'hide_empty' => 1,
+ 'child_of' => 0,
+ 'exclude' => '',
+ 'echo' => 0,
+ 'selected' => $emmet_jobscategory,
+ 'hierarchical' => 0,
+ 'name' => 'emmet_jobscategory',
+ 'id' => '',
+ 'class' => 'postform',
+ 'depth' => 0,
+ 'tab_index' => 0,
+ 'taxonomy' => 'emmet_jobscategory',
+ 'hide_if_empty' => true,
+ );
+ $emmet_jobsdepartment = (isset($_REQUEST['emmet_jobsdepartment']))
+ ? filter_var($_REQUEST['emmet_jobsdepartment'], FILTER_VALIDATE_INT)
+ : false;
+ $dep_args = array(
+ 'show_option_all' => 'Show All',
+ 'show_option_none' => '',
+ 'orderby' => 'name',
+ 'order' => 'ASC',
+ 'show_count' => 0,
+ 'hide_empty' => 1,
+ 'child_of' => 0,
+ 'exclude' => '',
+ 'echo' => 0,
+ 'selected' => $emmet_jobsdepartment,
+ 'hierarchical' => 0,
+ 'name' => 'emmet_jobsdepartment',
+ 'id' => '',
+ 'class' => 'postform',
+ 'depth' => 0,
+ 'tab_index' => 0,
+ 'taxonomy' => 'emmet_jobsdepartment',
+ 'hide_if_empty' => true,
+ );
+ $form_url = get_permalink();
+ $categories = get_terms('emmet_jobscategory');
+ include $this->frontViewDir . '/jobSearch.php';
+ }
+
+ /**
+ * Sets the plugin directory
+ *
+ * @param type $dir Plugin directory
+ */
+ public function setPluginDir($dir)
+ {
+ $this->pluginDirName = $dir;
+ }
+
+ /**
+ * Create session for the online form
+ */
+ public function startJobSession()
+ {
+ if (!session_id()) {
+ session_start();
+ }
+ }
+
+}
--- /dev/null
+.large-1 {
+ width: 8.33333%; }
+.large-2 {
+ width: 16.66667%; }
+.large-3 {
+ width: 25%; }
+.large-4 {
+ width: 33.33333%; }
+.large-5 {
+ width: 41.66667%; }
+.large-6 {
+ width: 50%; }
+.large-7 {
+ width: 58.33333%; }
+.large-8 {
+ width: 66.66667%; }
+.large-9 {
+ width: 75%; }
+.large-10 {
+ width: 83.33333%; }
+.large-11 {
+ width: 91.66667%; }
+.large-12 {
+ width: 100%; }
+#adminmenuback, #adminmenuwrap, #wpadminbar, #wpfooter {
+ display: none;
+}
+#appForm {
+ width: 100%;
+ background-color: #fff;
+ border-color: 1px solid red;
+}
+#appForm span {
+ font-size: 13px;
+}
+#wpcontent {
+ margin-left: 20px;
+ padding-left: 0;
+ margin-top: 0;
+}
+body {background: white;font-size: 12pt;}
+html.wp-toolbar {padding-top: 0;}
+div.wrap {padding-top: 0;margin-top:0;}
+h3 {page-break-before: auto;}
+div.row {page-break-inside: avoid;}
\ No newline at end of file
--- /dev/null
+#appForm {
+ width: 750px;
+ max-width: 750px;
+ background-color: #fff;
+}
+#appForm span {
+ font-size: 13px;
+}
+#appForm > div.row {
+ max-width: 700px;
+}
+#appForm div.row * div.row {
+ border-collapse: collapse;
+ border:1px solid black;
+ /*display:block;*/
+ width: 100%;
+}
+div.row > div.row {
+ /*border-collapse: collapse;*/
+ display:table-row;
+ width: 100%;
+ max-width: 500px;
+}
+div.row > div {
+ display:table-cell;
+ padding:2px;
+}
\ No newline at end of file
--- /dev/null
+meta.foundation-version {
+ font-family: "/5.4.7/"; }
+
+meta.foundation-mq-small {
+ font-family: "/only screen/";
+ width: 0em; }
+
+meta.foundation-mq-medium {
+ font-family: "/only screen and (min-width:40.063em)/";
+ width: 40.063em; }
+
+meta.foundation-mq-large {
+ font-family: "/only screen and (min-width:64.063em)/";
+ width: 64.063em; }
+
+meta.foundation-mq-xlarge {
+ font-family: "/only screen and (min-width:90.063em)/";
+ width: 90.063em; }
+
+meta.foundation-mq-xxlarge {
+ font-family: "/only screen and (min-width:120.063em)/";
+ width: 120.063em; }
+
+meta.foundation-data-attribute-namespace {
+ font-family: false; }
+
+html, body {
+ height: 100%; }
+
+*,
+*:before,
+*:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box; }
+
+html,
+body {
+ font-size: 100%; }
+
+body {
+ /*background: white;*/
+ /*color: #222222;*/
+ padding: 0;
+ margin: 0;
+ font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
+ font-weight: normal;
+ font-style: normal;
+ line-height: 1.5;
+ position: relative;
+ cursor: auto; }
+
+a:hover {
+ cursor: pointer; }
+
+img {
+ max-width: 100%;
+ height: auto; }
+
+img {
+ -ms-interpolation-mode: bicubic; }
+
+#map_canvas img,
+#map_canvas embed,
+#map_canvas object,
+.map_canvas img,
+.map_canvas embed,
+.map_canvas object {
+ max-width: none !important; }
+
+.left {
+ float: left !important; }
+
+.right {
+ float: right !important; }
+
+.clearfix:before, .clearfix:after {
+ content: " ";
+ display: table; }
+.clearfix:after {
+ clear: both; }
+
+.hide {
+ display: none !important;
+ visibility: hidden; }
+
+.invisible {
+ visibility: hidden; }
+
+.antialiased {
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale; }
+
+img {
+ display: inline-block;
+ vertical-align: middle; }
+
+textarea {
+ height: auto;
+ min-height: 50px; }
+
+select {
+ width: 100%; }
+
+.row {
+ width: 100%;
+ margin-left: auto;
+ margin-right: auto;
+ margin-top: 0;
+ margin-bottom: 0;
+ max-width: 62.5em; }
+ .row:before, .row:after {
+ content: " ";
+ display: table; }
+ .row:after {
+ clear: both; }
+ .row.collapse > .column,
+ .row.collapse > .columns {
+ padding-left: 0;
+ padding-right: 0; }
+ .row.collapse .row {
+ margin-left: 0;
+ margin-right: 0; }
+ .row .row {
+ width: auto;
+ margin-left: -0.9375em;
+ margin-right: -0.9375em;
+ margin-top: 0;
+ margin-bottom: 0;
+ max-width: none; }
+ .row .row:before, .row .row:after {
+ content: " ";
+ display: table; }
+ .row .row:after {
+ clear: both; }
+ .row .row.collapse {
+ width: auto;
+ margin: 0;
+ max-width: none; }
+ .row .row.collapse:before, .row .row.collapse:after {
+ content: " ";
+ display: table; }
+ .row .row.collapse:after {
+ clear: both; }
+
+.column,
+.columns {
+ padding-left: 0.9375em;
+ padding-right: 0.9375em;
+ width: 100%;
+ float: left; }
+
+[class*="column"] + [class*="column"]:last-child {
+ float: right; }
+
+[class*="column"] + [class*="column"].end {
+ float: left; }
+
+@media only screen {
+ .small-push-0 {
+ position: relative;
+ left: 0%;
+ right: auto; }
+
+ .small-pull-0 {
+ position: relative;
+ right: 0%;
+ left: auto; }
+
+ .small-push-1 {
+ position: relative;
+ left: 8.33333%;
+ right: auto; }
+
+ .small-pull-1 {
+ position: relative;
+ right: 8.33333%;
+ left: auto; }
+
+ .small-push-2 {
+ position: relative;
+ left: 16.66667%;
+ right: auto; }
+
+ .small-pull-2 {
+ position: relative;
+ right: 16.66667%;
+ left: auto; }
+
+ .small-push-3 {
+ position: relative;
+ left: 25%;
+ right: auto; }
+
+ .small-pull-3 {
+ position: relative;
+ right: 25%;
+ left: auto; }
+
+ .small-push-4 {
+ position: relative;
+ left: 33.33333%;
+ right: auto; }
+
+ .small-pull-4 {
+ position: relative;
+ right: 33.33333%;
+ left: auto; }
+
+ .small-push-5 {
+ position: relative;
+ left: 41.66667%;
+ right: auto; }
+
+ .small-pull-5 {
+ position: relative;
+ right: 41.66667%;
+ left: auto; }
+
+ .small-push-6 {
+ position: relative;
+ left: 50%;
+ right: auto; }
+
+ .small-pull-6 {
+ position: relative;
+ right: 50%;
+ left: auto; }
+
+ .small-push-7 {
+ position: relative;
+ left: 58.33333%;
+ right: auto; }
+
+ .small-pull-7 {
+ position: relative;
+ right: 58.33333%;
+ left: auto; }
+
+ .small-push-8 {
+ position: relative;
+ left: 66.66667%;
+ right: auto; }
+
+ .small-pull-8 {
+ position: relative;
+ right: 66.66667%;
+ left: auto; }
+
+ .small-push-9 {
+ position: relative;
+ left: 75%;
+ right: auto; }
+
+ .small-pull-9 {
+ position: relative;
+ right: 75%;
+ left: auto; }
+
+ .small-push-10 {
+ position: relative;
+ left: 83.33333%;
+ right: auto; }
+
+ .small-pull-10 {
+ position: relative;
+ right: 83.33333%;
+ left: auto; }
+
+ .small-push-11 {
+ position: relative;
+ left: 91.66667%;
+ right: auto; }
+
+ .small-pull-11 {
+ position: relative;
+ right: 91.66667%;
+ left: auto; }
+
+ .column,
+ .columns {
+ position: relative;
+ padding-left: 0.9375em;
+ padding-right: 0.9375em;
+ float: left; }
+
+ .small-1 {
+ width: 8.33333%; }
+
+ .small-2 {
+ width: 16.66667%; }
+
+ .small-3 {
+ width: 25%; }
+
+ .small-4 {
+ width: 33.33333%; }
+
+ .small-5 {
+ width: 41.66667%; }
+
+ .small-6 {
+ width: 50%; }
+
+ .small-7 {
+ width: 58.33333%; }
+
+ .small-8 {
+ width: 66.66667%; }
+
+ .small-9 {
+ width: 75%; }
+
+ .small-10 {
+ width: 83.33333%; }
+
+ .small-11 {
+ width: 91.66667%; }
+
+ .small-12 {
+ width: 100%; }
+
+ .small-offset-0 {
+ margin-left: 0% !important; }
+
+ .small-offset-1 {
+ margin-left: 8.33333% !important; }
+
+ .small-offset-2 {
+ margin-left: 16.66667% !important; }
+
+ .small-offset-3 {
+ margin-left: 25% !important; }
+
+ .small-offset-4 {
+ margin-left: 33.33333% !important; }
+
+ .small-offset-5 {
+ margin-left: 41.66667% !important; }
+
+ .small-offset-6 {
+ margin-left: 50% !important; }
+
+ .small-offset-7 {
+ margin-left: 58.33333% !important; }
+
+ .small-offset-8 {
+ margin-left: 66.66667% !important; }
+
+ .small-offset-9 {
+ margin-left: 75% !important; }
+
+ .small-offset-10 {
+ margin-left: 83.33333% !important; }
+
+ .small-offset-11 {
+ margin-left: 91.66667% !important; }
+
+ .small-reset-order {
+ margin-left: 0;
+ margin-right: 0;
+ left: auto;
+ right: auto;
+ float: left; }
+
+ .column.small-centered,
+ .columns.small-centered {
+ margin-left: auto;
+ margin-right: auto;
+ float: none; }
+
+ .column.small-uncentered,
+ .columns.small-uncentered {
+ margin-left: 0;
+ margin-right: 0;
+ float: left; }
+
+ .column.small-centered:last-child,
+ .columns.small-centered:last-child {
+ float: none; }
+
+ .column.small-uncentered:last-child,
+ .columns.small-uncentered:last-child {
+ float: left; }
+
+ .column.small-uncentered.opposite,
+ .columns.small-uncentered.opposite {
+ float: right; } }
+@media only screen and (min-width: 40.063em) {
+ .medium-push-0 {
+ position: relative;
+ left: 0%;
+ right: auto; }
+
+ .medium-pull-0 {
+ position: relative;
+ right: 0%;
+ left: auto; }
+
+ .medium-push-1 {
+ position: relative;
+ left: 8.33333%;
+ right: auto; }
+
+ .medium-pull-1 {
+ position: relative;
+ right: 8.33333%;
+ left: auto; }
+
+ .medium-push-2 {
+ position: relative;
+ left: 16.66667%;
+ right: auto; }
+
+ .medium-pull-2 {
+ position: relative;
+ right: 16.66667%;
+ left: auto; }
+
+ .medium-push-3 {
+ position: relative;
+ left: 25%;
+ right: auto; }
+
+ .medium-pull-3 {
+ position: relative;
+ right: 25%;
+ left: auto; }
+
+ .medium-push-4 {
+ position: relative;
+ left: 33.33333%;
+ right: auto; }
+
+ .medium-pull-4 {
+ position: relative;
+ right: 33.33333%;
+ left: auto; }
+
+ .medium-push-5 {
+ position: relative;
+ left: 41.66667%;
+ right: auto; }
+
+ .medium-pull-5 {
+ position: relative;
+ right: 41.66667%;
+ left: auto; }
+
+ .medium-push-6 {
+ position: relative;
+ left: 50%;
+ right: auto; }
+
+ .medium-pull-6 {
+ position: relative;
+ right: 50%;
+ left: auto; }
+
+ .medium-push-7 {
+ position: relative;
+ left: 58.33333%;
+ right: auto; }
+
+ .medium-pull-7 {
+ position: relative;
+ right: 58.33333%;
+ left: auto; }
+
+ .medium-push-8 {
+ position: relative;
+ left: 66.66667%;
+ right: auto; }
+
+ .medium-pull-8 {
+ position: relative;
+ right: 66.66667%;
+ left: auto; }
+
+ .medium-push-9 {
+ position: relative;
+ left: 75%;
+ right: auto; }
+
+ .medium-pull-9 {
+ position: relative;
+ right: 75%;
+ left: auto; }
+
+ .medium-push-10 {
+ position: relative;
+ left: 83.33333%;
+ right: auto; }
+
+ .medium-pull-10 {
+ position: relative;
+ right: 83.33333%;
+ left: auto; }
+
+ .medium-push-11 {
+ position: relative;
+ left: 91.66667%;
+ right: auto; }
+
+ .medium-pull-11 {
+ position: relative;
+ right: 91.66667%;
+ left: auto; }
+
+ .column,
+ .columns {
+ position: relative;
+ padding-left: 0.9375em;
+ padding-right: 0.9375em;
+ float: left; }
+
+ .medium-1 {
+ width: 8.33333%; }
+
+ .medium-2 {
+ width: 16.66667%; }
+
+ .medium-3 {
+ width: 25%; }
+
+ .medium-4 {
+ width: 33.33333%; }
+
+ .medium-5 {
+ width: 41.66667%; }
+
+ .medium-6 {
+ width: 50%; }
+
+ .medium-7 {
+ width: 58.33333%; }
+
+ .medium-8 {
+ width: 66.66667%; }
+
+ .medium-9 {
+ width: 75%; }
+
+ .medium-10 {
+ width: 83.33333%; }
+
+ .medium-11 {
+ width: 91.66667%; }
+
+ .medium-12 {
+ width: 100%; }
+
+ .medium-offset-0 {
+ margin-left: 0% !important; }
+
+ .medium-offset-1 {
+ margin-left: 8.33333% !important; }
+
+ .medium-offset-2 {
+ margin-left: 16.66667% !important; }
+
+ .medium-offset-3 {
+ margin-left: 25% !important; }
+
+ .medium-offset-4 {
+ margin-left: 33.33333% !important; }
+
+ .medium-offset-5 {
+ margin-left: 41.66667% !important; }
+
+ .medium-offset-6 {
+ margin-left: 50% !important; }
+
+ .medium-offset-7 {
+ margin-left: 58.33333% !important; }
+
+ .medium-offset-8 {
+ margin-left: 66.66667% !important; }
+
+ .medium-offset-9 {
+ margin-left: 75% !important; }
+
+ .medium-offset-10 {
+ margin-left: 83.33333% !important; }
+
+ .medium-offset-11 {
+ margin-left: 91.66667% !important; }
+
+ .medium-reset-order {
+ margin-left: 0;
+ margin-right: 0;
+ left: auto;
+ right: auto;
+ float: left; }
+
+ .column.medium-centered,
+ .columns.medium-centered {
+ margin-left: auto;
+ margin-right: auto;
+ float: none; }
+
+ .column.medium-uncentered,
+ .columns.medium-uncentered {
+ margin-left: 0;
+ margin-right: 0;
+ float: left; }
+
+ .column.medium-centered:last-child,
+ .columns.medium-centered:last-child {
+ float: none; }
+
+ .column.medium-uncentered:last-child,
+ .columns.medium-uncentered:last-child {
+ float: left; }
+
+ .column.medium-uncentered.opposite,
+ .columns.medium-uncentered.opposite {
+ float: right; }
+
+ .push-0 {
+ position: relative;
+ left: 0%;
+ right: auto; }
+
+ .pull-0 {
+ position: relative;
+ right: 0%;
+ left: auto; }
+
+ .push-1 {
+ position: relative;
+ left: 8.33333%;
+ right: auto; }
+
+ .pull-1 {
+ position: relative;
+ right: 8.33333%;
+ left: auto; }
+
+ .push-2 {
+ position: relative;
+ left: 16.66667%;
+ right: auto; }
+
+ .pull-2 {
+ position: relative;
+ right: 16.66667%;
+ left: auto; }
+
+ .push-3 {
+ position: relative;
+ left: 25%;
+ right: auto; }
+
+ .pull-3 {
+ position: relative;
+ right: 25%;
+ left: auto; }
+
+ .push-4 {
+ position: relative;
+ left: 33.33333%;
+ right: auto; }
+
+ .pull-4 {
+ position: relative;
+ right: 33.33333%;
+ left: auto; }
+
+ .push-5 {
+ position: relative;
+ left: 41.66667%;
+ right: auto; }
+
+ .pull-5 {
+ position: relative;
+ right: 41.66667%;
+ left: auto; }
+
+ .push-6 {
+ position: relative;
+ left: 50%;
+ right: auto; }
+
+ .pull-6 {
+ position: relative;
+ right: 50%;
+ left: auto; }
+
+ .push-7 {
+ position: relative;
+ left: 58.33333%;
+ right: auto; }
+
+ .pull-7 {
+ position: relative;
+ right: 58.33333%;
+ left: auto; }
+
+ .push-8 {
+ position: relative;
+ left: 66.66667%;
+ right: auto; }
+
+ .pull-8 {
+ position: relative;
+ right: 66.66667%;
+ left: auto; }
+
+ .push-9 {
+ position: relative;
+ left: 75%;
+ right: auto; }
+
+ .pull-9 {
+ position: relative;
+ right: 75%;
+ left: auto; }
+
+ .push-10 {
+ position: relative;
+ left: 83.33333%;
+ right: auto; }
+
+ .pull-10 {
+ position: relative;
+ right: 83.33333%;
+ left: auto; }
+
+ .push-11 {
+ position: relative;
+ left: 91.66667%;
+ right: auto; }
+
+ .pull-11 {
+ position: relative;
+ right: 91.66667%;
+ left: auto; } }
+@media only screen and (min-width: 64.063em) {
+ .large-push-0 {
+ position: relative;
+ left: 0%;
+ right: auto; }
+
+ .large-pull-0 {
+ position: relative;
+ right: 0%;
+ left: auto; }
+
+ .large-push-1 {
+ position: relative;
+ left: 8.33333%;
+ right: auto; }
+
+ .large-pull-1 {
+ position: relative;
+ right: 8.33333%;
+ left: auto; }
+
+ .large-push-2 {
+ position: relative;
+ left: 16.66667%;
+ right: auto; }
+
+ .large-pull-2 {
+ position: relative;
+ right: 16.66667%;
+ left: auto; }
+
+ .large-push-3 {
+ position: relative;
+ left: 25%;
+ right: auto; }
+
+ .large-pull-3 {
+ position: relative;
+ right: 25%;
+ left: auto; }
+
+ .large-push-4 {
+ position: relative;
+ left: 33.33333%;
+ right: auto; }
+
+ .large-pull-4 {
+ position: relative;
+ right: 33.33333%;
+ left: auto; }
+
+ .large-push-5 {
+ position: relative;
+ left: 41.66667%;
+ right: auto; }
+
+ .large-pull-5 {
+ position: relative;
+ right: 41.66667%;
+ left: auto; }
+
+ .large-push-6 {
+ position: relative;
+ left: 50%;
+ right: auto; }
+
+ .large-pull-6 {
+ position: relative;
+ right: 50%;
+ left: auto; }
+
+ .large-push-7 {
+ position: relative;
+ left: 58.33333%;
+ right: auto; }
+
+ .large-pull-7 {
+ position: relative;
+ right: 58.33333%;
+ left: auto; }
+
+ .large-push-8 {
+ position: relative;
+ left: 66.66667%;
+ right: auto; }
+
+ .large-pull-8 {
+ position: relative;
+ right: 66.66667%;
+ left: auto; }
+
+ .large-push-9 {
+ position: relative;
+ left: 75%;
+ right: auto; }
+
+ .large-pull-9 {
+ position: relative;
+ right: 75%;
+ left: auto; }
+
+ .large-push-10 {
+ position: relative;
+ left: 83.33333%;
+ right: auto; }
+
+ .large-pull-10 {
+ position: relative;
+ right: 83.33333%;
+ left: auto; }
+
+ .large-push-11 {
+ position: relative;
+ left: 91.66667%;
+ right: auto; }
+
+ .large-pull-11 {
+ position: relative;
+ right: 91.66667%;
+ left: auto; }
+
+ .column,
+ .columns {
+ position: relative;
+ padding-left: 0.9375em;
+ padding-right: 0.9375em;
+ float: left; }
+
+ .large-1 {
+ width: 8.33333%; }
+
+ .large-2 {
+ width: 16.66667%; }
+
+ .large-3 {
+ width: 25%; }
+
+ .large-4 {
+ width: 33.33333%; }
+
+ .large-5 {
+ width: 41.66667%; }
+
+ .large-6 {
+ width: 50%; }
+
+ .large-7 {
+ width: 58.33333%; }
+
+ .large-8 {
+ width: 66.66667%; }
+
+ .large-9 {
+ width: 75%; }
+
+ .large-10 {
+ width: 83.33333%; }
+
+ .large-11 {
+ width: 91.66667%; }
+
+ .large-12 {
+ width: 100%; }
+
+ .large-offset-0 {
+ margin-left: 0% !important; }
+
+ .large-offset-1 {
+ margin-left: 8.33333% !important; }
+
+ .large-offset-2 {
+ margin-left: 16.66667% !important; }
+
+ .large-offset-3 {
+ margin-left: 25% !important; }
+
+ .large-offset-4 {
+ margin-left: 33.33333% !important; }
+
+ .large-offset-5 {
+ margin-left: 41.66667% !important; }
+
+ .large-offset-6 {
+ margin-left: 50% !important; }
+
+ .large-offset-7 {
+ margin-left: 58.33333% !important; }
+
+ .large-offset-8 {
+ margin-left: 66.66667% !important; }
+
+ .large-offset-9 {
+ margin-left: 75% !important; }
+
+ .large-offset-10 {
+ margin-left: 83.33333% !important; }
+
+ .large-offset-11 {
+ margin-left: 91.66667% !important; }
+
+ .large-reset-order {
+ margin-left: 0;
+ margin-right: 0;
+ left: auto;
+ right: auto;
+ float: left; }
+
+ .column.large-centered,
+ .columns.large-centered {
+ margin-left: auto;
+ margin-right: auto;
+ float: none; }
+
+ .column.large-uncentered,
+ .columns.large-uncentered {
+ margin-left: 0;
+ margin-right: 0;
+ float: left; }
+
+ .column.large-centered:last-child,
+ .columns.large-centered:last-child {
+ float: none; }
+
+ .column.large-uncentered:last-child,
+ .columns.large-uncentered:last-child {
+ float: left; }
+
+ .column.large-uncentered.opposite,
+ .columns.large-uncentered.opposite {
+ float: right; }
+
+ .push-0 {
+ position: relative;
+ left: 0%;
+ right: auto; }
+
+ .pull-0 {
+ position: relative;
+ right: 0%;
+ left: auto; }
+
+ .push-1 {
+ position: relative;
+ left: 8.33333%;
+ right: auto; }
+
+ .pull-1 {
+ position: relative;
+ right: 8.33333%;
+ left: auto; }
+
+ .push-2 {
+ position: relative;
+ left: 16.66667%;
+ right: auto; }
+
+ .pull-2 {
+ position: relative;
+ right: 16.66667%;
+ left: auto; }
+
+ .push-3 {
+ position: relative;
+ left: 25%;
+ right: auto; }
+
+ .pull-3 {
+ position: relative;
+ right: 25%;
+ left: auto; }
+
+ .push-4 {
+ position: relative;
+ left: 33.33333%;
+ right: auto; }
+
+ .pull-4 {
+ position: relative;
+ right: 33.33333%;
+ left: auto; }
+
+ .push-5 {
+ position: relative;
+ left: 41.66667%;
+ right: auto; }
+
+ .pull-5 {
+ position: relative;
+ right: 41.66667%;
+ left: auto; }
+
+ .push-6 {
+ position: relative;
+ left: 50%;
+ right: auto; }
+
+ .pull-6 {
+ position: relative;
+ right: 50%;
+ left: auto; }
+
+ .push-7 {
+ position: relative;
+ left: 58.33333%;
+ right: auto; }
+
+ .pull-7 {
+ position: relative;
+ right: 58.33333%;
+ left: auto; }
+
+ .push-8 {
+ position: relative;
+ left: 66.66667%;
+ right: auto; }
+
+ .pull-8 {
+ position: relative;
+ right: 66.66667%;
+ left: auto; }
+
+ .push-9 {
+ position: relative;
+ left: 75%;
+ right: auto; }
+
+ .pull-9 {
+ position: relative;
+ right: 75%;
+ left: auto; }
+
+ .push-10 {
+ position: relative;
+ left: 83.33333%;
+ right: auto; }
+
+ .pull-10 {
+ position: relative;
+ right: 83.33333%;
+ left: auto; }
+
+ .push-11 {
+ position: relative;
+ left: 91.66667%;
+ right: auto; }
+
+ .pull-11 {
+ position: relative;
+ right: 91.66667%;
+ left: auto; } }
+button, .button {
+ border-style: solid;
+ border-width: 0px;
+ cursor: pointer;
+ font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
+ font-weight: normal;
+ line-height: normal;
+ margin: 0 0 1.25rem;
+ position: relative;
+ text-decoration: none;
+ text-align: center;
+ -webkit-appearance: none;
+ -webkit-border-radius: 0;
+ display: inline-block;
+ padding-top: 1rem;
+ padding-right: 2rem;
+ padding-bottom: 1.0625rem;
+ padding-left: 2rem;
+ font-size: 1rem;
+ background-color: #2ba6cb;
+ border-color: #2285a2;
+ color: white;
+ transition: background-color 300ms ease-out; }
+ button:hover, button:focus, .button:hover, .button:focus {
+ background-color: #2285a2; }
+ button:hover, button:focus, .button:hover, .button:focus {
+ color: white; }
+ button.secondary, .button.secondary {
+ background-color: #e9e9e9;
+ border-color: #bababa;
+ color: #333333; }
+ button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus {
+ background-color: #bababa; }
+ button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus {
+ color: #333333; }
+ button.success, .button.success {
+ background-color: #5da423;
+ border-color: #4a831c;
+ color: white; }
+ button.success:hover, button.success:focus, .button.success:hover, .button.success:focus {
+ background-color: #4a831c; }
+ button.success:hover, button.success:focus, .button.success:hover, .button.success:focus {
+ color: white; }
+ button.alert, .button.alert {
+ background-color: #c60f13;
+ border-color: #9e0c0f;
+ color: white; }
+ button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus {
+ background-color: #9e0c0f; }
+ button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus {
+ color: white; }
+ button.warning, .button.warning {
+ background-color: #f08a24;
+ border-color: #cf6e0e;
+ color: white; }
+ button.warning:hover, button.warning:focus, .button.warning:hover, .button.warning:focus {
+ background-color: #cf6e0e; }
+ button.warning:hover, button.warning:focus, .button.warning:hover, .button.warning:focus {
+ color: white; }
+ button.info, .button.info {
+ background-color: #a0d3e8;
+ border-color: #61b6d9;
+ color: #333333; }
+ button.info:hover, button.info:focus, .button.info:hover, .button.info:focus {
+ background-color: #61b6d9; }
+ button.info:hover, button.info:focus, .button.info:hover, .button.info:focus {
+ color: white; }
+ button.large, .button.large {
+ padding-top: 1.125rem;
+ padding-right: 2.25rem;
+ padding-bottom: 1.1875rem;
+ padding-left: 2.25rem;
+ font-size: 1.25rem; }
+ button.small, .button.small {
+ padding-top: 0.875rem;
+ padding-right: 1.75rem;
+ padding-bottom: 0.9375rem;
+ padding-left: 1.75rem;
+ font-size: 0.8125rem; }
+ button.tiny, .button.tiny {
+ padding-top: 0.625rem;
+ padding-right: 1.25rem;
+ padding-bottom: 0.6875rem;
+ padding-left: 1.25rem;
+ font-size: 0.6875rem; }
+ button.expand, .button.expand {
+ padding-right: 0;
+ padding-left: 0;
+ width: 100%; }
+ button.left-align, .button.left-align {
+ text-align: left;
+ text-indent: 0.75rem; }
+ button.right-align, .button.right-align {
+ text-align: right;
+ padding-right: 0.75rem; }
+ button.radius, .button.radius {
+ border-radius: 3px; }
+ button.round, .button.round {
+ border-radius: 1000px; }
+ button.disabled, button[disabled], .button.disabled, .button[disabled] {
+ background-color: #2ba6cb;
+ border-color: #2285a2;
+ color: white;
+ cursor: default;
+ opacity: 0.7;
+ box-shadow: none; }
+ button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus {
+ background-color: #2285a2; }
+ button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus {
+ color: white; }
+ button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus {
+ background-color: #2ba6cb; }
+ button.disabled.secondary, button[disabled].secondary, .button.disabled.secondary, .button[disabled].secondary {
+ background-color: #e9e9e9;
+ border-color: #bababa;
+ color: #333333;
+ cursor: default;
+ opacity: 0.7;
+ box-shadow: none; }
+ button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus {
+ background-color: #bababa; }
+ button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus {
+ color: #333333; }
+ button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus {
+ background-color: #e9e9e9; }
+ button.disabled.success, button[disabled].success, .button.disabled.success, .button[disabled].success {
+ background-color: #5da423;
+ border-color: #4a831c;
+ color: white;
+ cursor: default;
+ opacity: 0.7;
+ box-shadow: none; }
+ button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus {
+ background-color: #4a831c; }
+ button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus {
+ color: white; }
+ button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus {
+ background-color: #5da423; }
+ button.disabled.alert, button[disabled].alert, .button.disabled.alert, .button[disabled].alert {
+ background-color: #c60f13;
+ border-color: #9e0c0f;
+ color: white;
+ cursor: default;
+ opacity: 0.7;
+ box-shadow: none; }
+ button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus {
+ background-color: #9e0c0f; }
+ button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus {
+ color: white; }
+ button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus {
+ background-color: #c60f13; }
+ button.disabled.warning, button[disabled].warning, .button.disabled.warning, .button[disabled].warning {
+ background-color: #f08a24;
+ border-color: #cf6e0e;
+ color: white;
+ cursor: default;
+ opacity: 0.7;
+ box-shadow: none; }
+ button.disabled.warning:hover, button.disabled.warning:focus, button[disabled].warning:hover, button[disabled].warning:focus, .button.disabled.warning:hover, .button.disabled.warning:focus, .button[disabled].warning:hover, .button[disabled].warning:focus {
+ background-color: #cf6e0e; }
+ button.disabled.warning:hover, button.disabled.warning:focus, button[disabled].warning:hover, button[disabled].warning:focus, .button.disabled.warning:hover, .button.disabled.warning:focus, .button[disabled].warning:hover, .button[disabled].warning:focus {
+ color: white; }
+ button.disabled.warning:hover, button.disabled.warning:focus, button[disabled].warning:hover, button[disabled].warning:focus, .button.disabled.warning:hover, .button.disabled.warning:focus, .button[disabled].warning:hover, .button[disabled].warning:focus {
+ background-color: #f08a24; }
+ button.disabled.info, button[disabled].info, .button.disabled.info, .button[disabled].info {
+ background-color: #a0d3e8;
+ border-color: #61b6d9;
+ color: #333333;
+ cursor: default;
+ opacity: 0.7;
+ box-shadow: none; }
+ button.disabled.info:hover, button.disabled.info:focus, button[disabled].info:hover, button[disabled].info:focus, .button.disabled.info:hover, .button.disabled.info:focus, .button[disabled].info:hover, .button[disabled].info:focus {
+ background-color: #61b6d9; }
+ button.disabled.info:hover, button.disabled.info:focus, button[disabled].info:hover, button[disabled].info:focus, .button.disabled.info:hover, .button.disabled.info:focus, .button[disabled].info:hover, .button[disabled].info:focus {
+ color: white; }
+ button.disabled.info:hover, button.disabled.info:focus, button[disabled].info:hover, button[disabled].info:focus, .button.disabled.info:hover, .button.disabled.info:focus, .button[disabled].info:hover, .button[disabled].info:focus {
+ background-color: #a0d3e8; }
+
+button::-moz-focus-inner {
+ border: 0;
+ padding: 0; }
+
+@media only screen and (min-width: 40.063em) {
+ button, .button {
+ display: inline-block; } }
+/* Standard Forms */
+form {
+ margin: 0 0 1rem; }
+
+/* Using forms within rows, we need to set some defaults */
+form .row .row {
+ margin: 0 -0.5rem; }
+ form .row .row .column,
+ form .row .row .columns {
+ padding: 0 0.5rem; }
+ form .row .row.collapse {
+ margin: 0; }
+ form .row .row.collapse .column,
+ form .row .row.collapse .columns {
+ padding: 0; }
+ form .row .row.collapse input {
+ -webkit-border-bottom-right-radius: 0;
+ -webkit-border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0; }
+form .row input.column,
+form .row input.columns,
+form .row textarea.column,
+form .row textarea.columns {
+ padding-left: 0.5rem; }
+
+/* Label Styles */
+label {
+ font-size: 0.875rem;
+ color: #4d4d4d;
+ cursor: pointer;
+ display: block;
+ font-weight: normal;
+ line-height: 1.5;
+ margin-bottom: 0;
+ /* Styles for required inputs */ }
+ label.right {
+ float: none !important;
+ text-align: right; }
+ label.inline {
+ margin: 0 0 1rem 0;
+ padding: 0.5625rem 0; }
+ label small {
+ text-transform: capitalize;
+ color: #676767; }
+
+/* Attach elements to the beginning or end of an input */
+.prefix,
+.postfix {
+ display: block;
+ position: relative;
+ z-index: 2;
+ text-align: center;
+ width: 100%;
+ padding-top: 0;
+ padding-bottom: 0;
+ border-style: solid;
+ border-width: 1px;
+ overflow: hidden;
+ font-size: 0.875rem;
+ height: 2.3125rem;
+ line-height: 2.3125rem; }
+
+/* Adjust padding, alignment and radius if pre/post element is a button */
+.postfix.button {
+ padding-left: 0;
+ padding-right: 0;
+ padding-top: 0;
+ padding-bottom: 0;
+ text-align: center;
+ line-height: 2.125rem;
+ border: none; }
+
+.prefix.button {
+ padding-left: 0;
+ padding-right: 0;
+ padding-top: 0;
+ padding-bottom: 0;
+ text-align: center;
+ line-height: 2.125rem;
+ border: none; }
+
+.prefix.button.radius {
+ border-radius: 0;
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px; }
+
+.postfix.button.radius {
+ border-radius: 0;
+ -webkit-border-bottom-right-radius: 3px;
+ -webkit-border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px; }
+
+.prefix.button.round {
+ border-radius: 0;
+ -webkit-border-bottom-left-radius: 1000px;
+ -webkit-border-top-left-radius: 1000px;
+ border-bottom-left-radius: 1000px;
+ border-top-left-radius: 1000px; }
+
+.postfix.button.round {
+ border-radius: 0;
+ -webkit-border-bottom-right-radius: 1000px;
+ -webkit-border-top-right-radius: 1000px;
+ border-bottom-right-radius: 1000px;
+ border-top-right-radius: 1000px; }
+
+/* Separate prefix and postfix styles when on span or label so buttons keep their own */
+span.prefix, label.prefix {
+ background: #f2f2f2;
+ border-right: none;
+ color: #333333;
+ border-color: #cccccc; }
+
+span.postfix, label.postfix {
+ background: #f2f2f2;
+ border-left: none;
+ color: #333333;
+ border-color: #cccccc; }
+
+/* We use this to get basic styling on all basic form elements */
+input[type="text"],
+input[type="password"],
+input[type="date"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="month"],
+input[type="week"],
+input[type="email"],
+input[type="number"],
+input[type="search"],
+input[type="tel"],
+input[type="time"],
+input[type="url"],
+input[type="color"],
+textarea {
+ -webkit-appearance: none;
+ -webkit-border-radius: 0px;
+ background-color: white;
+ font-family: inherit;
+ border-style: solid;
+ border-width: 1px;
+ border-color: #cccccc;
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+ color: rgba(0, 0, 0, 0.75);
+ display: block;
+ font-size: 0.875rem;
+ margin: 0 0 1rem 0;
+ padding: 0.5rem;
+ height: 2.3125rem;
+ width: 100%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ transition: box-shadow 0.45s, border-color 0.45s ease-in-out; }
+ input[type="text"]:focus,
+ input[type="password"]:focus,
+ input[type="date"]:focus,
+ input[type="datetime"]:focus,
+ input[type="datetime-local"]:focus,
+ input[type="month"]:focus,
+ input[type="week"]:focus,
+ input[type="email"]:focus,
+ input[type="number"]:focus,
+ input[type="search"]:focus,
+ input[type="tel"]:focus,
+ input[type="time"]:focus,
+ input[type="url"]:focus,
+ input[type="color"]:focus,
+ textarea:focus {
+ box-shadow: 0 0 5px #999999;
+ border-color: #999999; }
+ input[type="text"]:focus,
+ input[type="password"]:focus,
+ input[type="date"]:focus,
+ input[type="datetime"]:focus,
+ input[type="datetime-local"]:focus,
+ input[type="month"]:focus,
+ input[type="week"]:focus,
+ input[type="email"]:focus,
+ input[type="number"]:focus,
+ input[type="search"]:focus,
+ input[type="tel"]:focus,
+ input[type="time"]:focus,
+ input[type="url"]:focus,
+ input[type="color"]:focus,
+ textarea:focus {
+ background: #fafafa;
+ border-color: #999999;
+ outline: none; }
+ input[type="text"]:disabled,
+ input[type="password"]:disabled,
+ input[type="date"]:disabled,
+ input[type="datetime"]:disabled,
+ input[type="datetime-local"]:disabled,
+ input[type="month"]:disabled,
+ input[type="week"]:disabled,
+ input[type="email"]:disabled,
+ input[type="number"]:disabled,
+ input[type="search"]:disabled,
+ input[type="tel"]:disabled,
+ input[type="time"]:disabled,
+ input[type="url"]:disabled,
+ input[type="color"]:disabled,
+ textarea:disabled {
+ background-color: #dddddd;
+ cursor: default; }
+ input[type="text"][disabled], input[type="text"][readonly], fieldset[disabled] input[type="text"],
+ input[type="password"][disabled],
+ input[type="password"][readonly], fieldset[disabled]
+ input[type="password"],
+ input[type="date"][disabled],
+ input[type="date"][readonly], fieldset[disabled]
+ input[type="date"],
+ input[type="datetime"][disabled],
+ input[type="datetime"][readonly], fieldset[disabled]
+ input[type="datetime"],
+ input[type="datetime-local"][disabled],
+ input[type="datetime-local"][readonly], fieldset[disabled]
+ input[type="datetime-local"],
+ input[type="month"][disabled],
+ input[type="month"][readonly], fieldset[disabled]
+ input[type="month"],
+ input[type="week"][disabled],
+ input[type="week"][readonly], fieldset[disabled]
+ input[type="week"],
+ input[type="email"][disabled],
+ input[type="email"][readonly], fieldset[disabled]
+ input[type="email"],
+ input[type="number"][disabled],
+ input[type="number"][readonly], fieldset[disabled]
+ input[type="number"],
+ input[type="search"][disabled],
+ input[type="search"][readonly], fieldset[disabled]
+ input[type="search"],
+ input[type="tel"][disabled],
+ input[type="tel"][readonly], fieldset[disabled]
+ input[type="tel"],
+ input[type="time"][disabled],
+ input[type="time"][readonly], fieldset[disabled]
+ input[type="time"],
+ input[type="url"][disabled],
+ input[type="url"][readonly], fieldset[disabled]
+ input[type="url"],
+ input[type="color"][disabled],
+ input[type="color"][readonly], fieldset[disabled]
+ input[type="color"],
+ textarea[disabled],
+ textarea[readonly], fieldset[disabled]
+ textarea {
+ background-color: #dddddd;
+ cursor: default; }
+ input[type="text"].radius,
+ input[type="password"].radius,
+ input[type="date"].radius,
+ input[type="datetime"].radius,
+ input[type="datetime-local"].radius,
+ input[type="month"].radius,
+ input[type="week"].radius,
+ input[type="email"].radius,
+ input[type="number"].radius,
+ input[type="search"].radius,
+ input[type="tel"].radius,
+ input[type="time"].radius,
+ input[type="url"].radius,
+ input[type="color"].radius,
+ textarea.radius {
+ border-radius: 3px; }
+
+form .row .prefix-radius.row.collapse input,
+form .row .prefix-radius.row.collapse textarea,
+form .row .prefix-radius.row.collapse select {
+ border-radius: 0;
+ -webkit-border-bottom-right-radius: 3px;
+ -webkit-border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px; }
+form .row .prefix-radius.row.collapse .prefix {
+ border-radius: 0;
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px; }
+form .row .postfix-radius.row.collapse input,
+form .row .postfix-radius.row.collapse textarea,
+form .row .postfix-radius.row.collapse select {
+ border-radius: 0;
+ -webkit-border-bottom-left-radius: 3px;
+ -webkit-border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px; }
+form .row .postfix-radius.row.collapse .postfix {
+ border-radius: 0;
+ -webkit-border-bottom-right-radius: 3px;
+ -webkit-border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px; }
+form .row .prefix-round.row.collapse input,
+form .row .prefix-round.row.collapse textarea,
+form .row .prefix-round.row.collapse select {
+ border-radius: 0;
+ -webkit-border-bottom-right-radius: 1000px;
+ -webkit-border-top-right-radius: 1000px;
+ border-bottom-right-radius: 1000px;
+ border-top-right-radius: 1000px; }
+form .row .prefix-round.row.collapse .prefix {
+ border-radius: 0;
+ -webkit-border-bottom-left-radius: 1000px;
+ -webkit-border-top-left-radius: 1000px;
+ border-bottom-left-radius: 1000px;
+ border-top-left-radius: 1000px; }
+form .row .postfix-round.row.collapse input,
+form .row .postfix-round.row.collapse textarea,
+form .row .postfix-round.row.collapse select {
+ border-radius: 0;
+ -webkit-border-bottom-left-radius: 1000px;
+ -webkit-border-top-left-radius: 1000px;
+ border-bottom-left-radius: 1000px;
+ border-top-left-radius: 1000px; }
+form .row .postfix-round.row.collapse .postfix {
+ border-radius: 0;
+ -webkit-border-bottom-right-radius: 1000px;
+ -webkit-border-top-right-radius: 1000px;
+ border-bottom-right-radius: 1000px;
+ border-top-right-radius: 1000px; }
+
+input[type="submit"] {
+ -webkit-appearance: none;
+ -webkit-border-radius: 0px; }
+
+/* Respect enforced amount of rows for textarea */
+textarea[rows] {
+ height: auto; }
+
+/* Not allow resize out of parent */
+textarea {
+ max-width: 100%; }
+
+/* Add height value for select elements to match text input height */
+select {
+ -webkit-appearance: none !important;
+ -webkit-border-radius: 0px;
+ background-color: #fafafa;
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMTJweCIgeT0iMHB4IiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzcHgiIHZpZXdCb3g9IjAgMCA2IDMiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDYgMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBvbHlnb24gcG9pbnRzPSI1Ljk5MiwwIDIuOTkyLDMgLTAuMDA4LDAgIi8+PC9zdmc+);
+ background-position: 100% center;
+ background-repeat: no-repeat;
+ border-style: solid;
+ border-width: 1px;
+ border-color: #cccccc;
+ padding: 0.5rem;
+ font-size: 0.875rem;
+ font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
+ color: rgba(0, 0, 0, 0.75);
+ line-height: normal;
+ border-radius: 0;
+ height: 2.3125rem; }
+ select::-ms-expand {
+ display: none; }
+ select.radius {
+ border-radius: 3px; }
+ select:hover {
+ background-color: #f3f3f3;
+ border-color: #999999; }
+ select:disabled {
+ background-color: #dddddd;
+ cursor: default; }
+
+/* Adjust margin for form elements below */
+input[type="file"],
+input[type="checkbox"],
+input[type="radio"],
+select {
+ margin: 0 0 1rem 0; }
+
+input[type="checkbox"] + label,
+input[type="radio"] + label {
+ display: inline-block;
+ margin-left: 0.5rem;
+ margin-right: 1rem;
+ margin-bottom: 0;
+ vertical-align: baseline; }
+
+/* Normalize file input width */
+input[type="file"] {
+ width: 100%; }
+
+/* HTML5 Number spinners settings */
+/* We add basic fieldset styling */
+fieldset {
+ border: 1px solid #dddddd;
+ padding: 1.25rem;
+ margin: 1.125rem 0; }
+ fieldset legend {
+ font-weight: bold;
+ background: white;
+ padding: 0 0.1875rem;
+ margin: 0;
+ margin-left: -0.1875rem; }
+
+/* Error Handling */
+[data-abide] .error small.error, [data-abide] .error span.error, [data-abide] span.error, [data-abide] small.error {
+ display: block;
+ padding: 0.375rem 0.5625rem 0.5625rem;
+ margin-top: -1px;
+ margin-bottom: 1rem;
+ font-size: 0.75rem;
+ font-weight: normal;
+ font-style: italic;
+ background: #c60f13;
+ color: white; }
+[data-abide] span.error, [data-abide] small.error {
+ display: none; }
+
+span.error, small.error {
+ display: block;
+ padding: 0.375rem 0.5625rem 0.5625rem;
+ margin-top: -1px;
+ margin-bottom: 1rem;
+ font-size: 0.75rem;
+ font-weight: normal;
+ font-style: italic;
+ background: #c60f13;
+ color: white; }
+
+.error input,
+.error textarea,
+.error select {
+ margin-bottom: 0; }
+.error input[type="checkbox"],
+.error input[type="radio"] {
+ margin-bottom: 1rem; }
+.error label,
+.error label.error {
+ color: #c60f13; }
+.error small.error {
+ display: block;
+ padding: 0.375rem 0.5625rem 0.5625rem;
+ margin-top: -1px;
+ margin-bottom: 1rem;
+ font-size: 0.75rem;
+ font-weight: normal;
+ font-style: italic;
+ background: #c60f13;
+ color: white; }
+.error > label > small {
+ color: #676767;
+ background: transparent;
+ padding: 0;
+ text-transform: capitalize;
+ font-style: normal;
+ font-size: 60%;
+ margin: 0;
+ display: inline; }
+.error span.error-message {
+ display: block; }
+
+input.error,
+textarea.error,
+select.error {
+ margin-bottom: 0; }
+
+label.error {
+ color: #c60f13; }
--- /dev/null
+
+.wp-list-table span.view {
+ display:none;
+}
--- /dev/null
+<?php
+/**
+ * Plugin Name: Emmet County Employment
+ * Description: Online Employment Application for Gaslight Media Clients.
+ * Version: 1.0.0
+ * Author: Steve Sutton
+ * Author URI: http://www.gaslightmedia.com
+ * License: All right reserved
+ */
+
+defined('ABSPATH') or die();
+/**
+ * Defines for the plugin
+ */
+define('EMMET_EMP_PLUGIN_PATH_FILE', __FILE__);
+define('EMMET_EMP_VERSION', '0.0.1');
+define('EMMET_EMP_VRS_OPTION_NAME', 'emmet_jobs_db_version');
+define('EMMET_EMP_POST_TYPE', 'emmet_jobs');
+define('EMMET_EMP_TAX_CATEGORIES', 'emmet_jobscategory');
+define('EMMET_EMP_TAX_DEPARTMENTS', 'emmet_jobsdepartment');
+define('EMMET_EMP_APPLICATION_TABLE', 'emmet_jobs_application');
+define('EMMET_EMP_FORM_TABLE', 'emmet_jobs_app_form');
+$wp_upload_dir = wp_upload_dir();
+define('EMMET_EMP_UPLOAD_DIR', $wp_upload_dir['basedir'] . '/emmet-emp/');
+define('EMMET_EMP_UPLOAD_URL', $wp_upload_dir['baseurl'] . '/emmet-emp/');
+/**
+ * Create the upload directory for the resume files if not already there
+ */
+if (!is_dir(EMMET_EMP_UPLOAD_DIR)) {
+ // create the upload directory
+ $oldUmask = umask(0);
+ mkdir(EMMET_EMP_UPLOAD_DIR, 0770);
+ umask($oldUmask);
+}
+/**
+ * Require the class files
+ */
+require_once 'controllers/admin.php';
+require_once 'controllers/front.php';
+require_once 'models/job.php';
+require_once 'models/database.php';
+/**
+ * The Database class
+ */
+$emmet_member_db = new emmet_employment_models_database($GLOBALS['wpdb']);
+
+/**
+ * Setup class to call in the Controllers
+ */
+class emmet_employment_setup
+{
+ public function __construct()
+ {
+ if (is_admin()) {
+ $adminController = new emmet_employment_admin(
+ plugin_dir_path(__FILE__),
+ $GLOBALS['wpdb']
+ );
+ } else {
+ $frontController = new emmet_employment_front(
+ plugin_dir_path(__FILE__),
+ $GLOBALS['wpdb']
+ );
+ }
+
+ }
+}
+
+$employmentApp = new emmet_employment_setup();
+
+/**
+ * Load style sheet for displaying the view and print for the application forms
+ */
+function emmet_load_view_style()
+{
+ wp_enqueue_style('foundation', plugin_dir_url(__FILE__) . 'css/foundation.css');
+}
+function emmet_load_edit_style()
+{
+ wp_enqueue_style('emmet_jobs', plugin_dir_url(__FILE__) . 'css/emmet_jobs.css');
+}
+if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'view') {
+ add_action('admin_enqueue_scripts', 'emmet_load_view_style');
+}
+if ( isset($_REQUEST['post_type'])
+ && $_REQUEST['post_type'] == EMMET_EMP_POST_TYPE
+ && !isset($_REQUEST['page'])
+) {
+ add_action('admin_enqueue_scripts', 'emmet_load_edit_style');
+}
--- /dev/null
+/*!
+ * jQuery Print Previw Plugin v1.0.1
+ *
+ * Copyright 2011, Tim Connell
+ * Licensed under the GPL Version 2 license
+ * http://www.gnu.org/licenses/gpl-2.0.html
+ *
+ * Date: Wed Jan 25 00:00:00 2012 -000
+ */
+
+(function($) {
+
+ // Initialization
+ $.fn.printPreview = function() {
+ this.each(function() {
+ $(this).bind('click', function(e) {
+ e.preventDefault();
+ if (!$('#print-modal').length) {
+ $.printPreview.loadPrintPreview();
+ }
+ });
+ });
+ return this;
+ };
+
+ // Private functions
+ var mask, size, print_modal, print_controls;
+ $.printPreview = {
+ loadPrintPreview: function() {
+ // Declare DOM objects
+ print_modal = $('<div id="print-modal"></div>');
+ print_controls = $('<div id="print-modal-controls">' +
+ '<a href="#" class="print" title="Print page">Print page</a>' +
+ '<a href="#" class="close" title="Close print preview">Close</a>').hide();
+ var print_frame = $('<iframe id="print-modal-content" scrolling="no" border="0" frameborder="0" name="print-frame" />');
+
+ // Raise print preview window from the dead, zooooooombies
+ print_modal
+ .hide()
+ .append(print_controls)
+ .append(print_frame)
+ .appendTo('body');
+
+ // The frame lives
+ for (var i=0; i < window.frames.length; i++) {
+ if (window.frames[i].name == "print-frame") {
+ var print_frame_ref = window.frames[i].document;
+ break;
+ }
+ }
+ print_frame_ref.open();
+ print_frame_ref.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' +
+ '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">' +
+ '<head><title>' + document.title + '</title></head>' +
+ '<body></body>' +
+ '</html>');
+ print_frame_ref.close();
+
+ // Grab contents and apply stylesheet
+ var $iframe_head = $('head link[media*=print], head link[media=all]').clone(),
+ $iframe_body = $('body > *:not(#print-modal):not(script)').clone();
+ $iframe_head.each(function() {
+ $(this).attr('media', 'all');
+ });
+ if (!$.browser.msie && !($.browser.version < 7) ) {
+ $('head', print_frame_ref).append($iframe_head);
+ $('body', print_frame_ref).append($iframe_body);
+ }
+ else {
+ $('body > *:not(#print-modal):not(script)').clone().each(function() {
+ $('body', print_frame_ref).append(this.outerHTML);
+ });
+ $('head link[media*=print], head link[media=all]').each(function() {
+ $('head', print_frame_ref).append($(this).clone().attr('media', 'all')[0].outerHTML);
+ });
+ }
+
+ // Disable all links
+ $('a', print_frame_ref).bind('click.printPreview', function(e) {
+ e.preventDefault();
+ });
+
+ // Introduce print styles
+ $('head').append('<style type="text/css">' +
+ '@media print {' +
+ '/* -- Print Preview --*/' +
+ '#print-modal-mask,' +
+ '#print-modal {' +
+ 'display: none !important;' +
+ '}' +
+ '}' +
+ '</style>'
+ );
+
+ // Load mask
+ $.printPreview.loadMask();
+
+ // Disable scrolling
+ $('body').css({overflowY: 'hidden', height: '100%'});
+ $('img', print_frame_ref).load(function() {
+ print_frame.height($('body', print_frame.contents())[0].scrollHeight);
+ });
+
+ // Position modal
+ starting_position = $(window).height() + $(window).scrollTop();
+ var css = {
+ top: starting_position,
+ height: '100%',
+ overflowY: 'auto',
+ zIndex: 10000,
+ display: 'block'
+ }
+ print_modal
+ .css(css)
+ .animate({ top: $(window).scrollTop()}, 400, 'linear', function() {
+ print_controls.fadeIn('slow').focus();
+ });
+ print_frame.height($('body', print_frame.contents())[0].scrollHeight);
+
+ // Bind closure
+ $('a', print_controls).bind('click', function(e) {
+ e.preventDefault();
+ if ($(this).hasClass('print')) { window.print(); }
+ else { $.printPreview.distroyPrintPreview(); }
+ });
+ },
+
+ distroyPrintPreview: function() {
+ print_controls.fadeOut(100);
+ print_modal.animate({ top: $(window).scrollTop() - $(window).height(), opacity: 1}, 400, 'linear', function(){
+ print_modal.remove();
+ $('body').css({overflowY: 'auto', height: 'auto'});
+ });
+ mask.fadeOut('slow', function() {
+ mask.remove();
+ });
+
+ $(document).unbind("keydown.printPreview.mask");
+ mask.unbind("click.printPreview.mask");
+ $(window).unbind("resize.printPreview.mask");
+ },
+
+ /* -- Mask Functions --*/
+ loadMask: function() {
+ size = $.printPreview.sizeUpMask();
+ mask = $('<div id="print-modal-mask" />').appendTo($('body'));
+ mask.css({
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ width: size[0],
+ height: size[1],
+ display: 'none',
+ opacity: 0,
+ zIndex: 9999,
+ backgroundColor: '#000'
+ });
+
+ mask.css({display: 'block'}).fadeTo('400', 0.75);
+
+ $(window).bind("resize..printPreview.mask", function() {
+ $.printPreview.updateMaskSize();
+ });
+
+ mask.bind("click.printPreview.mask", function(e) {
+ $.printPreview.distroyPrintPreview();
+ });
+
+ $(document).bind("keydown.printPreview.mask", function(e) {
+ if (e.keyCode == 27) { $.printPreview.distroyPrintPreview(); }
+ });
+ },
+
+ sizeUpMask: function() {
+ if ($.browser.msie) {
+ // if there are no scrollbars then use window.height
+ var d = $(document).height(), w = $(window).height();
+ return [
+ window.innerWidth || // ie7+
+ document.documentElement.clientWidth || // ie6
+ document.body.clientWidth, // ie6 quirks mode
+ d - w < 20 ? w : d
+ ];
+ } else { return [$(document).width(), $(document).height()]; }
+ },
+
+ updateMaskSize: function() {
+ var size = $.printPreview.sizeUpMask();
+ mask.css({width: size[0], height: size[1]});
+ }
+ }
+})(jQuery);
\ No newline at end of file
--- /dev/null
+<?php
+
+/*
+ * A walker class to use that extends wp_dropdown_categories and allows it to use the term's slug as a value rather than ID.
+ *
+ * See http://core.trac.wordpress.org/ticket/13258
+ *
+ * Usage, as normal:
+ * wp_dropdown_categories($args);
+ *
+ * But specify the custom walker class, and (optionally) a 'id' or 'slug' for the 'value' parameter:
+ * $args=array('walker'=> new SH_Walker_TaxonomyDropdown(), 'value'=>'slug', .... );
+ * wp_dropdown_categories($args);
+ *
+ * If the 'value' parameter is not set it will use term ID for categories, and the term's slug for other taxonomies in the value attribute of the term's <option>.
+ */
+class SH_Walker_TaxonomyDropdown
+ extends Walker_CategoryDropdown
+{
+
+ function start_el(&$output, $category, $depth, $args)
+ {
+ $pad = str_repeat(' ', $depth * 3);
+ $cat_name = apply_filters('list_cats', $category->name, $category);
+ if (!isset($args['value'])) {
+ $args['value'] = ( $category->taxonomy != 'category'
+ ? 'slug'
+ : 'id' );
+ }
+ $value = ($args['value'] == 'slug'
+ ? $category->slug
+ : $category->term_id );
+ $output .= "\t<option class=\"level-$depth\" value=\"" . $value . "\"";
+ if ($value === (string) $args['selected']) {
+ $output .= ' selected="selected"';
+ }
+ $output .= '>';
+ $output .= $pad . $cat_name;
+ if ($args['show_count'])
+ $output .= ' (' . $category->count . ')';
+ $output .= "</option>\n";
+ }
+
+}
--- /dev/null
+<?php
+/**
+ * Base class for displaying a list of items in an ajaxified HTML table.
+ *
+ * @since 3.1.0
+ * @access private
+ *
+ * @package WordPress
+ * @subpackage List_Table
+ */
+class GLM_List_Table {
+
+ /**
+ * The current list of items
+ *
+ * @since 3.1.0
+ * @var array
+ * @access public
+ */
+ public $items;
+
+ /**
+ * Various information about the current table
+ *
+ * @since 3.1.0
+ * @var array
+ * @access private
+ */
+ private $_args;
+
+ /**
+ * Various information needed for displaying the pagination
+ *
+ * @since 3.1.0
+ * @var array
+ * @access private
+ */
+ private $_pagination_args = array();
+
+ /**
+ * The current screen
+ *
+ * @since 3.1.0
+ * @var object
+ * @access protected
+ */
+ protected $screen;
+
+ /**
+ * Cached bulk actions
+ *
+ * @since 3.1.0
+ * @var array
+ * @access private
+ */
+ private $_actions;
+
+ /**
+ * Cached pagination output
+ *
+ * @since 3.1.0
+ * @var string
+ * @access private
+ */
+ private $_pagination;
+
+ /**
+ * Constructor.
+ *
+ * The child class should call this constructor from its own constructor to override
+ * the default $args.
+ *
+ * @since 3.1.0
+ * @access public
+ *
+ * @param array|string $args {
+ * Array or string of arguments.
+ *
+ * @type string $plural Plural value used for labels and the objects being listed.
+ * This affects things such as CSS class-names and nonces used
+ * in the list table, e.g. 'posts'. Default empty.
+ * @type string $singular Singular label for an object being listed, e.g. 'post'.
+ * Default empty
+ * @type bool $ajax Whether the list table supports AJAX. This includes loading
+ * and sorting data, for example. If true, the class will call
+ * the {@see _js_vars()} method in the footer to provide variables
+ * to any scripts handling AJAX events. Default false.
+ * @type string $screen String containing the hook name used to determine the current
+ * screen. If left null, the current screen will be automatically set.
+ * Default null.
+ * }
+ */
+ public function __construct( $args = array() ) {
+ $args = wp_parse_args( $args, array(
+ 'plural' => '',
+ 'singular' => '',
+ 'ajax' => false,
+ 'screen' => null,
+ ) );
+
+ $this->screen = convert_to_screen( $args['screen'] );
+
+ add_filter( "manage_{$this->screen->id}_columns", array( $this, 'get_columns' ), 0 );
+
+ if ( !$args['plural'] )
+ $args['plural'] = $this->screen->base;
+
+ $args['plural'] = sanitize_key( $args['plural'] );
+ $args['singular'] = sanitize_key( $args['singular'] );
+
+ $this->_args = $args;
+
+ if ( $args['ajax'] ) {
+ // wp_enqueue_script( 'list-table' );
+ add_action( 'admin_footer', array( $this, '_js_vars' ) );
+ }
+ }
+
+ /**
+ * Make private properties readable for backwards compatibility.
+ *
+ * @since 4.0.0
+ * @access public
+ *
+ * @param string $name Property to get.
+ * @return mixed Property.
+ */
+ public function __get( $name ) {
+ return $this->$name;
+ }
+
+ /**
+ * Make private properties settable for backwards compatibility.
+ *
+ * @since 4.0.0
+ * @access public
+ *
+ * @param string $name Property to set.
+ * @param mixed $value Property value.
+ * @return mixed Newly-set property.
+ */
+ public function __set( $name, $value ) {
+ return $this->$name = $value;
+ }
+
+ /**
+ * Make private properties checkable for backwards compatibility.
+ *
+ * @since 4.0.0
+ * @access public
+ *
+ * @param string $name Property to check if set.
+ * @return bool Whether the property is set.
+ */
+ public function __isset( $name ) {
+ return isset( $this->$name );
+ }
+
+ /**
+ * Make private properties un-settable for backwards compatibility.
+ *
+ * @since 4.0.0
+ * @access public
+ *
+ * @param string $name Property to unset.
+ */
+ public function __unset( $name ) {
+ unset( $this->$name );
+ }
+
+ /**
+ * Make private/protected methods readable for backwards compatibility.
+ *
+ * @since 4.0.0
+ * @access public
+ *
+ * @param callable $name Method to call.
+ * @param array $arguments Arguments to pass when calling.
+ * @return mixed|bool Return value of the callback, false otherwise.
+ */
+ public function __call( $name, $arguments ) {
+ return call_user_func_array( array( $this, $name ), $arguments );
+ }
+
+ /**
+ * Checks the current user's permissions
+ * @uses wp_die()
+ *
+ * @since 3.1.0
+ * @access public
+ * @abstract
+ */
+ public function ajax_user_can() {
+ die( 'function WP_List_Table::ajax_user_can() must be over-ridden in a sub-class.' );
+ }
+
+ /**
+ * Prepares the list of items for displaying.
+ * @uses WP_List_Table::set_pagination_args()
+ *
+ * @since 3.1.0
+ * @access public
+ * @abstract
+ */
+ public function prepare_items() {
+ die( 'function WP_List_Table::prepare_items() must be over-ridden in a sub-class.' );
+ }
+
+ /**
+ * An internal method that sets all the necessary pagination arguments
+ *
+ * @param array $args An associative array with information about the pagination
+ * @access protected
+ */
+ protected function set_pagination_args( $args ) {
+ $args = wp_parse_args( $args, array(
+ 'total_items' => 0,
+ 'total_pages' => 0,
+ 'per_page' => 0,
+ ) );
+
+ if ( !$args['total_pages'] && $args['per_page'] > 0 )
+ $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] );
+
+ // Redirect if page number is invalid and headers are not already sent.
+ if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
+ wp_redirect( esc_url_raw(add_query_arg( 'paged', $args['total_pages'] ) ) );
+ exit;
+ }
+
+ $this->_pagination_args = $args;
+ }
+
+ /**
+ * Access the pagination args
+ *
+ * @since 3.1.0
+ * @access public
+ *
+ * @param string $key
+ * @return array
+ */
+ public function get_pagination_arg( $key ) {
+ if ( 'page' == $key )
+ return $this->get_pagenum();
+
+ if ( isset( $this->_pagination_args[$key] ) )
+ return $this->_pagination_args[$key];
+ }
+
+ /**
+ * Whether the table has items to display or not
+ *
+ * @since 3.1.0
+ * @access public
+ *
+ * @return bool
+ */
+ public function has_items() {
+ return !empty( $this->items );
+ }
+
+ /**
+ * Message to be displayed when there are no items
+ *
+ * @since 3.1.0
+ * @access public
+ */
+ public function no_items() {
+ _e( 'No items found.' );
+ }
+
+ /**
+ * Display the search box.
+ *
+ * @since 3.1.0
+ * @access public
+ *
+ * @param string $text The search button text
+ * @param string $input_id The search input id
+ */
+ public function search_box( $text, $input_id ) {
+ if ( empty( $_REQUEST['s'] ) && !$this->has_items() )
+ return;
+
+ $input_id = $input_id . '-search-input';
+
+ if ( ! empty( $_REQUEST['orderby'] ) )
+ echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
+ if ( ! empty( $_REQUEST['order'] ) )
+ echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
+ if ( ! empty( $_REQUEST['post_mime_type'] ) )
+ echo '<input type="hidden" name="post_mime_type" value="' . esc_attr( $_REQUEST['post_mime_type'] ) . '" />';
+ if ( ! empty( $_REQUEST['detached'] ) )
+ echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
+?>
+<p class="search-box">
+ <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
+ <input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
+ <?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?>
+</p>
+<?php
+ }
+
+ /**
+ * Get an associative array ( id => link ) with the list
+ * of views available on this table.
+ *
+ * @since 3.1.0
+ * @access protected
+ *
+ * @return array
+ */
+ protected function get_views() {
+ return array();
+ }
+
+ /**
+ * Display the list of views available on this table.
+ *
+ * @since 3.1.0
+ * @access public
+ */
+ public function views() {
+ $views = $this->get_views();
+ /**
+ * Filter the list of available list table views.
+ *
+ * The dynamic portion of the hook name, $this->screen->id, refers
+ * to the ID of the current screen, usually a string.
+ *
+ * @since 3.5.0
+ *
+ * @param array $views An array of available list table views.
+ */
+ $views = apply_filters( "views_{$this->screen->id}", $views );
+
+ if ( empty( $views ) )
+ return;
+
+ echo "<ul class='subsubsub'>\n";
+ foreach ( $views as $class => $view ) {
+ $views[ $class ] = "\t<li class='$class'>$view";
+ }
+ echo implode( " |</li>\n", $views ) . "</li>\n";
+ echo "</ul>";
+ }
+
+ /**
+ * Get an associative array ( option_name => option_title ) with the list
+ * of bulk actions available on this table.
+ *
+ * @since 3.1.0
+ * @access protected
+ *
+ * @return array
+ */
+ protected function get_bulk_actions() {
+ return array();
+ }
+
+ /**
+ * Display the bulk actions dropdown.
+ *
+ * @since 3.1.0
+ * @access protected
+ *
+ * @param string $which The location of the bulk actions: 'top' or 'bottom'.
+ * This is designated as optional for backwards-compatibility.
+ */
+ protected function bulk_actions( $which = '' ) {
+ if ( is_null( $this->_actions ) ) {
+ $no_new_actions = $this->_actions = $this->get_bulk_actions();
+ /**
+ * Filter the list table Bulk Actions drop-down.
+ *
+ * The dynamic portion of the hook name, $this->screen->id, refers
+ * to the ID of the current screen, usually a string.
+ *
+ * This filter can currently only be used to remove bulk actions.
+ *
+ * @since 3.5.0
+ *
+ * @param array $actions An array of the available bulk actions.
+ */
+ $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions );
+ $this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions );
+ $two = '';
+ } else {
+ $two = '2';
+ }
+
+ if ( empty( $this->_actions ) )
+ return;
+
+ echo "<label for='bulk-action-selector-" . esc_attr( $which ) . "' class='screen-reader-text'>" . __( 'Select bulk action' ) . "</label>";
+ echo "<select name='action$two' id='bulk-action-selector-" . esc_attr( $which ) . "'>\n";
+ echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
+
+ foreach ( $this->_actions as $name => $title ) {
+ $class = 'edit' == $name ? ' class="hide-if-no-js"' : '';
+
+ echo "\t<option value='$name'$class>$title</option>\n";
+ }
+
+ echo "</select>\n";
+
+ submit_button( __( 'Apply' ), 'action', false, false, array( 'id' => "doaction$two" ) );
+ echo "\n";
+ }
+
+ /**
+ * Get the current action selected from the bulk actions dropdown.
+ *
+ * @since 3.1.0
+ * @access public
+ *
+ * @return string|bool The action name or False if no action was selected
+ */
+ public function current_action() {
+ if ( isset( $_REQUEST['filter_action'] ) && ! empty( $_REQUEST['filter_action'] ) )
+ return false;
+
+ if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )
+ return $_REQUEST['action'];
+
+ if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )
+ return $_REQUEST['action2'];
+
+ return false;
+ }
+
+ /**
+ * Generate row actions div
+ *
+ * @since 3.1.0
+ * @access protected
+ *
+ * @param array $actions The list of actions
+ * @param bool $always_visible Whether the actions should be always visible
+ * @return string
+ */
+ protected function row_actions( $actions, $always_visible = false ) {
+ $action_count = count( $actions );
+ $i = 0;
+
+ if ( !$action_count )
+ return '';
+
+ $out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">';
+ foreach ( $actions as $action => $link ) {
+ ++$i;
+ ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
+ $out .= "<span class='$action'>$link$sep</span>";
+ }
+ $out .= '</div>';
+
+ return $out;
+ }
+
+ /**
+ * Display a monthly dropdown for filtering items
+ *
+ * @since 3.1.0
+ * @access protected
+ */
+ protected function months_dropdown( $post_type ) {
+ global $wpdb, $wp_locale;
+
+ $months = $wpdb->get_results( $wpdb->prepare( "
+ SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
+ FROM $wpdb->posts
+ WHERE post_type = %s
+ ORDER BY post_date DESC
+ ", $post_type ) );
+
+ /**
+ * Filter the 'Months' drop-down results.
+ *
+ * @since 3.7.0
+ *
+ * @param object $months The months drop-down query results.
+ * @param string $post_type The post type.
+ */
+ $months = apply_filters( 'months_dropdown_results', $months, $post_type );
+
+ $month_count = count( $months );
+
+ if ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) )
+ return;
+
+ $m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
+?>
+ <label for="filter-by-date" class="screen-reader-text"><?php _e( 'Filter by date' ); ?></label>
+ <select name="m" id="filter-by-date">
+ <option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
+<?php
+ foreach ( $months as $arc_row ) {
+ if ( 0 == $arc_row->year )
+ continue;
+
+ $month = zeroise( $arc_row->month, 2 );
+ $year = $arc_row->year;
+
+ printf( "<option %s value='%s'>%s</option>\n",
+ selected( $m, $year . $month, false ),
+ esc_attr( $arc_row->year . $month ),
+ /* translators: 1: month name, 2: 4-digit year */
+ sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
+ );
+ }
+?>
+ </select>
+<?php
+ }
+
+ /**
+ * Display a view switcher
+ *
+ * @since 3.1.0
+ * @access protected
+ */
+ protected function view_switcher( $current_mode ) {
+ $modes = array(
+ 'list' => __( 'List View' ),
+ 'excerpt' => __( 'Excerpt View' )
+ );
+
+?>
+ <input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>" />
+ <div class="view-switch">
+<?php
+ foreach ( $modes as $mode => $title ) {
+ $classes = array( 'view-' . $mode );
+ if ( $current_mode == $mode )
+ $classes[] = 'current';
+ printf(
+ "<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
+ esc_url( add_query_arg( 'mode', $mode ) ),
+ implode( ' ', $classes ),
+ $title
+ );
+ }
+ ?>
+ </div>
+<?php
+ }
+
+ /**
+ * Display a comment count bubble
+ *
+ * @since 3.1.0
+ * @access protected
+ *
+ * @param int $post_id The post ID.
+ * @param int $pending_comments Number of pending comments.
+ */
+ protected function comments_bubble( $post_id, $pending_comments ) {
+ $pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) );
+
+ if ( $pending_comments )
+ echo '<strong>';
+
+ echo "<a href='" . esc_url( add_query_arg( 'p', $post_id, admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>" . number_format_i18n( get_comments_number() ) . "</span></a>";
+
+ if ( $pending_comments )
+ echo '</strong>';
+ }
+
+ /**
+ * Get the current page number
+ *
+ * @since 3.1.0
+ * @access public
+ *
+ * @return int
+ */
+ public function get_pagenum() {
+ $pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
+
+ if( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] )
+ $pagenum = $this->_pagination_args['total_pages'];
+
+ return max( 1, $pagenum );
+ }
+
+ /**
+ * Get number of items to display on a single page
+ *
+ * @since 3.1.0
+ * @access protected
+ *
+ * @return int
+ */
+ protected function get_items_per_page( $option, $default = 20 ) {
+ $per_page = (int) get_user_option( $option );
+ if ( empty( $per_page ) || $per_page < 1 )
+ $per_page = $default;
+
+ /**
+ * Filter the number of items to be displayed on each page of the list table.
+ *
+ * The dynamic hook name, $option, refers to the per page option depending
+ * on the type of list table in use. Possible values may include:
+ * 'edit_comments_per_page', 'sites_network_per_page', 'site_themes_network_per_page',
+ * 'themes_netework_per_page', 'users_network_per_page', 'edit_{$post_type}', etc.
+ *
+ * @since 2.9.0
+ *
+ * @param int $per_page Number of items to be displayed. Default 20.
+ */
+ return (int) apply_filters( $option, $per_page );
+ }
+
+ /**
+ * Display the pagination.
+ *
+ * @since 3.1.0
+ * @access protected
+ */
+ protected function pagination( $which ) {
+ if ( empty( $this->_pagination_args ) ) {
+ return;
+ }
+
+ $total_items = $this->_pagination_args['total_items'];
+ $total_pages = $this->_pagination_args['total_pages'];
+ $infinite_scroll = false;
+ if ( isset( $this->_pagination_args['infinite_scroll'] ) ) {
+ $infinite_scroll = $this->_pagination_args['infinite_scroll'];
+ }
+
+ $output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
+
+ $current = $this->get_pagenum();
+
+ $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
+
+ $current_url = esc_url_raw(remove_query_arg( array( 'hotkeys_highlight_last', 'hotkeys_highlight_first' ), $current_url ) );
+
+ $page_links = array();
+
+ $disable_first = $disable_last = '';
+ if ( $current == 1 ) {
+ $disable_first = ' disabled';
+ }
+ if ( $current == $total_pages ) {
+ $disable_last = ' disabled';
+ }
+ $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
+ 'first-page' . $disable_first,
+ esc_attr__( 'Go to the first page' ),
+ esc_url( remove_query_arg( 'paged', $current_url ) ),
+ '«'
+ );
+
+ $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
+ 'prev-page' . $disable_first,
+ esc_attr__( 'Go to the previous page' ),
+ esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
+ '‹'
+ );
+
+ if ( 'bottom' == $which ) {
+ $html_current_page = $current;
+ } else {
+ $html_current_page = sprintf( "%s<input class='current-page' id='current-page-selector' title='%s' type='text' name='paged' value='%s' size='%d' />",
+ '<label for="current-page-selector" class="screen-reader-text">' . __( 'Select Page' ) . '</label>',
+ esc_attr__( 'Current page' ),
+ $current,
+ strlen( $total_pages )
+ );
+ }
+ $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
+ $page_links[] = '<span class="paging-input">' . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . '</span>';
+
+ $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
+ 'next-page' . $disable_last,
+ esc_attr__( 'Go to the next page' ),
+ esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
+ '›'
+ );
+
+ $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
+ 'last-page' . $disable_last,
+ esc_attr__( 'Go to the last page' ),
+ esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
+ '»'
+ );
+
+ $pagination_links_class = 'pagination-links';
+ if ( ! empty( $infinite_scroll ) ) {
+ $pagination_links_class = ' hide-if-js';
+ }
+ $output .= "\n<span class='$pagination_links_class'>" . join( "\n", $page_links ) . '</span>';
+
+ if ( $total_pages ) {
+ $page_class = $total_pages < 2 ? ' one-page' : '';
+ } else {
+ $page_class = ' no-pages';
+ }
+ $this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
+
+ echo $this->_pagination;
+ }
+
+ /**
+ * Get a list of columns. The format is:
+ * 'internal-name' => 'Title'
+ *
+ * @since 3.1.0
+ * @access public
+ * @abstract
+ *
+ * @return array
+ */
+ public function get_columns() {
+ die( 'function WP_List_Table::get_columns() must be over-ridden in a sub-class.' );
+ }
+
+ /**
+ * Get a list of sortable columns. The format is:
+ * 'internal-name' => 'orderby'
+ * or
+ * 'internal-name' => array( 'orderby', true )
+ *
+ * The second format will make the initial sorting order be descending
+ *
+ * @since 3.1.0
+ * @access protected
+ *
+ * @return array
+ */
+ protected function get_sortable_columns() {
+ return array();
+ }
+
+ /**
+ * Get a list of all, hidden and sortable columns, with filter applied
+ *
+ * @since 3.1.0
+ * @access protected
+ *
+ * @return array
+ */
+ protected function get_column_info() {
+ if ( isset( $this->_column_headers ) )
+ return $this->_column_headers;
+
+ $columns = get_column_headers( $this->screen );
+ $hidden = get_hidden_columns( $this->screen );
+
+ $sortable_columns = $this->get_sortable_columns();
+ /**
+ * Filter the list table sortable columns for a specific screen.
+ *
+ * The dynamic portion of the hook name, $this->screen->id, refers
+ * to the ID of the current screen, usually a string.
+ *
+ * @since 3.5.0
+ *
+ * @param array $sortable_columns An array of sortable columns.
+ */
+ $_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $sortable_columns );
+
+ $sortable = array();
+ foreach ( $_sortable as $id => $data ) {
+ if ( empty( $data ) )
+ continue;
+
+ $data = (array) $data;
+ if ( !isset( $data[1] ) )
+ $data[1] = false;
+
+ $sortable[$id] = $data;
+ }
+
+ $this->_column_headers = array( $columns, $hidden, $sortable );
+
+ return $this->_column_headers;
+ }
+
+ /**
+ * Return number of visible columns
+ *
+ * @since 3.1.0
+ * @access public
+ *
+ * @return int
+ */
+ public function get_column_count() {
+ list ( $columns, $hidden ) = $this->get_column_info();
+ $hidden = array_intersect( array_keys( $columns ), array_filter( $hidden ) );
+ return count( $columns ) - count( $hidden );
+ }
+
+ /**
+ * Print column headers, accounting for hidden and sortable columns.
+ *
+ * @since 3.1.0
+ * @access public
+ *
+ * @param bool $with_id Whether to set the id attribute or not
+ */
+ public function print_column_headers( $with_id = true ) {
+ list( $columns, $hidden, $sortable ) = $this->get_column_info();
+
+ $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
+ $current_url = esc_url_raw( remove_query_arg( 'paged', $current_url ) );
+
+ if ( isset( $_GET['orderby'] ) )
+ $current_orderby = $_GET['orderby'];
+ else
+ $current_orderby = '';
+
+ if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'] )
+ $current_order = 'desc';
+ else
+ $current_order = 'asc';
+
+ if ( ! empty( $columns['cb'] ) ) {
+ static $cb_counter = 1;
+ $columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All' ) . '</label>'
+ . '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
+ $cb_counter++;
+ }
+
+ foreach ( $columns as $column_key => $column_display_name ) {
+ $class = array( 'manage-column', "column-$column_key" );
+
+ $style = '';
+ if ( in_array( $column_key, $hidden ) )
+ $style = 'display:none;';
+
+ $style = ' style="' . $style . '"';
+
+ if ( 'cb' == $column_key )
+ $class[] = 'check-column';
+ elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) )
+ $class[] = 'num';
+
+ if ( isset( $sortable[$column_key] ) ) {
+ list( $orderby, $desc_first ) = $sortable[$column_key];
+
+ if ( $current_orderby == $orderby ) {
+ $order = 'asc' == $current_order ? 'desc' : 'asc';
+ $class[] = 'sorted';
+ $class[] = $current_order;
+ } else {
+ $order = $desc_first ? 'desc' : 'asc';
+ $class[] = 'sortable';
+ $class[] = $desc_first ? 'asc' : 'desc';
+ }
+
+ $column_display_name = '<a href="' . esc_url_raw( add_query_arg( compact( 'orderby', 'order' ), $current_url ) ) . '"><span>' . $column_display_name . '</span><span class="sorting-indicator"></span></a>';
+ }
+
+ $id = $with_id ? "id='$column_key'" : '';
+
+ if ( !empty( $class ) )
+ $class = "class='" . join( ' ', $class ) . "'";
+
+ echo "<th scope='col' $id $class $style>$column_display_name</th>";
+ }
+ }
+
+ /**
+ * Display the table
+ *
+ * @since 3.1.0
+ * @access public
+ */
+ public function display() {
+ $singular = $this->_args['singular'];
+
+ $this->display_tablenav( 'top' );
+
+?>
+<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
+ <thead>
+ <tr>
+ <?php $this->print_column_headers(); ?>
+ </tr>
+ </thead>
+
+ <tfoot>
+ <tr>
+ <?php $this->print_column_headers( false ); ?>
+ </tr>
+ </tfoot>
+
+ <tbody id="the-list"<?php
+ if ( $singular ) {
+ echo " data-wp-lists='list:$singular'";
+ } ?>>
+ <?php $this->display_rows_or_placeholder(); ?>
+ </tbody>
+</table>
+<?php
+ $this->display_tablenav( 'bottom' );
+ }
+
+ /**
+ * Get a list of CSS classes for the <table> tag
+ *
+ * @since 3.1.0
+ * @access protected
+ *
+ * @return array
+ */
+ protected function get_table_classes() {
+ return array( 'widefat', 'fixed', $this->_args['plural'] );
+ }
+
+ /**
+ * Generate the table navigation above or below the table
+ *
+ * @since 3.1.0
+ * @access protected
+ */
+ protected function display_tablenav( $which ) {
+ if ( 'top' == $which )
+ wp_nonce_field( 'bulk-' . $this->_args['plural'] );
+?>
+ <div class="tablenav <?php echo esc_attr( $which ); ?>">
+
+ <div class="alignleft actions bulkactions">
+ <?php $this->bulk_actions( $which ); ?>
+ </div>
+<?php
+ $this->extra_tablenav( $which );
+ $this->pagination( $which );
+?>
+
+ <br class="clear" />
+ </div>
+<?php
+ }
+
+ /**
+ * Extra controls to be displayed between bulk actions and pagination
+ *
+ * @since 3.1.0
+ * @access protected
+ */
+ protected function extra_tablenav( $which ) {}
+
+ /**
+ * Generate the <tbody> part of the table
+ *
+ * @since 3.1.0
+ * @access public
+ */
+ public function display_rows_or_placeholder() {
+ if ( $this->has_items() ) {
+ $this->display_rows();
+ } else {
+ echo '<tr class="no-items"><td class="colspanchange" colspan="' . $this->get_column_count() . '">';
+ $this->no_items();
+ echo '</td></tr>';
+ }
+ }
+
+ /**
+ * Generate the table rows
+ *
+ * @since 3.1.0
+ * @access public
+ */
+ public function display_rows() {
+ foreach ( $this->items as $item )
+ $this->single_row( $item );
+ }
+
+ /**
+ * Generates content for a single row of the table
+ *
+ * @since 3.1.0
+ * @access public
+ *
+ * @param object $item The current item
+ */
+ public function single_row( $item ) {
+ static $row_class = '';
+ $row_class = ( $row_class == '' ? ' class="alternate"' : '' );
+
+ echo '<tr' . $row_class . '>';
+ $this->single_row_columns( $item );
+ echo '</tr>';
+ }
+
+ /**
+ * Generates the columns for a single row of the table
+ *
+ * @since 3.1.0
+ * @access protected
+ *
+ * @param object $item The current item
+ */
+ protected function single_row_columns( $item ) {
+ list( $columns, $hidden ) = $this->get_column_info();
+
+ foreach ( $columns as $column_name => $column_display_name ) {
+ $class = "class='$column_name column-$column_name'";
+
+ $style = '';
+ if ( in_array( $column_name, $hidden ) )
+ $style = ' style="display:none;"';
+
+ $attributes = "$class$style";
+
+ if ( 'cb' == $column_name ) {
+ echo '<th scope="row" class="check-column">';
+ echo $this->column_cb( $item );
+ echo '</th>';
+ }
+ elseif ( method_exists( $this, 'column_' . $column_name ) ) {
+ echo "<td $attributes>";
+ echo call_user_func( array( $this, 'column_' . $column_name ), $item );
+ echo "</td>";
+ }
+ else {
+ echo "<td $attributes>";
+ echo $this->column_default( $item, $column_name );
+ echo "</td>";
+ }
+ }
+ }
+
+ /**
+ * Handle an incoming ajax request (called from admin-ajax.php)
+ *
+ * @since 3.1.0
+ * @access public
+ */
+ public function ajax_response() {
+ $this->prepare_items();
+
+ ob_start();
+ if ( ! empty( $_REQUEST['no_placeholder'] ) ) {
+ $this->display_rows();
+ } else {
+ $this->display_rows_or_placeholder();
+ }
+
+ $rows = ob_get_clean();
+
+ $response = array( 'rows' => $rows );
+
+ if ( isset( $this->_pagination_args['total_items'] ) ) {
+ $response['total_items_i18n'] = sprintf(
+ _n( '1 item', '%s items', $this->_pagination_args['total_items'] ),
+ number_format_i18n( $this->_pagination_args['total_items'] )
+ );
+ }
+ if ( isset( $this->_pagination_args['total_pages'] ) ) {
+ $response['total_pages'] = $this->_pagination_args['total_pages'];
+ $response['total_pages_i18n'] = number_format_i18n( $this->_pagination_args['total_pages'] );
+ }
+
+ die( json_encode( $response ) );
+ }
+
+ /**
+ * Send required variables to JavaScript land
+ *
+ * @access public
+ */
+ public function _js_vars() {
+ $args = array(
+ 'class' => get_class( $this ),
+ 'screen' => array(
+ 'id' => $this->screen->id,
+ 'base' => $this->screen->base,
+ )
+ );
+
+ printf( "<script type='text/javascript'>list_args = %s;</script>\n", json_encode( $args ) );
+ }
+}
--- /dev/null
+<?php
+
+/**
+ * database.php
+ *
+ * PHP version 5.3
+ *
+ * @category Toolkit
+ * @package Package
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: (0.1)
+ * @link <>
+ */
+
+/**
+ * Toolkit_Package_database
+ *
+ * Description of database
+ *
+ * @category Toolkit
+ * @package Package
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: (0.1)
+ * @link <>
+ */
+class emmet_employment_models_database
+{
+ public $wpdb;
+ public $applicationTable;
+ public $appFormTable;
+
+ /**
+ * Clas constructor for the database
+ *
+ * @param type $wpdb Wordpress db object
+ */
+ public function __construct($wpdb)
+ {
+ $this->wpdb = $wpdb;
+ register_activation_hook(
+ EMMET_EMP_PLUGIN_PATH_FILE,
+ array($this, 'install')
+ );
+ add_action('plugins_loaded', array($this, 'emmet_emp_update_db_check'));
+
+ $this->applicationTable = $this->wpdb->prefix . EMMET_EMP_APPLICATION_TABLE;
+ $this->appFormTable = $this->wpdb->prefix . EMMET_EMP_FORM_TABLE;
+ }
+
+ /**
+ * Install the database tables needed for jobs
+ */
+ public function install()
+ {
+ $charset_collate = $this->wpdb->get_charset_collate();
+
+ $sql = "CREATE TABLE {$this->applicationTable} (
+ id BIGINT(20) NOT NULL AUTO_INCREMENT,
+ create_time DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL,
+ fname TEXT NOT NULL,
+ lname TEXT NOT NULL,
+ mname TEXT DEFAULT '' NOT NULL,
+ position BIGINT(20) DEFAULT 0 NOT NULL,
+ resume TEXT DEFAULT '' NOT NULL,
+ archived BOOLEAN DEFAULT false NOT NULL,
+ UNIQUE KEY id (id)
+ ) {$charset_collate}";
+ include ABSPATH . 'wp-admin/includes/upgrade.php';
+ dbDelta($sql);
+
+ $sql = "CREATE TABLE {$this->appFormTable} (
+ id BIGINT(20) NOT NULL AUTO_INCREMENT,
+ create_time DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL,
+ application BIGINT(20) NOT NULL,
+ form_data TEXT DEFAULT '' NOT NULL,
+ form_part INTEGER DEFAULT 0 NOT NULL,
+ UNIQUE KEY id (id)
+ ) {$charset_collate}";
+ dbDelta($sql);
+
+ update_option(EMMET_EMP_VRS_OPTION_NAME, EMMET_EMP_VERSION);
+ }
+
+ /**
+ * DB Version update check to update the database tables
+ */
+ public function emmet_emp_update_db_check()
+ {
+ if (EMMET_EMP_VERSION != get_option(EMMET_EMP_VRS_OPTION_NAME)) {
+ $this->install();
+ }
+ }
+
+}
--- /dev/null
+<?php
+
+/**
+ * Sets up the job post type and its taxonomies. Handles also the new fields in
+ * the metaboxes.
+ */
+class emmet_employment_job
+{
+
+ public $pluginDirName;
+
+ /**
+ * Contstructor for the job class
+ *
+ * Calls filters and actions to setup Job post type
+ *
+ * @param type $path Plugin Path
+ */
+ public function __construct($path)
+ {
+// global $typenow;
+ $this->pluginDirName = $path;
+ add_action('init', array($this, 'addPostTypes'));
+ add_action('init', array($this, 'createJobTaxonomy'));
+
+ add_filter('post_updated_messages', array($this, 'jobsUpdatedMessages'));
+
+ add_filter('manage_edit-emmet_jobs_columns',
+ array($this, 'jobsEditColumns'));
+
+ add_action('manage_posts_custom_column',
+ array($this, 'jobsCustomColumns'));
+ add_action('admin_init', array($this, 'metaDates'));
+ add_action('save_post', array($this, 'saveEmpMeta'));
+ add_filter('manage_edit-emmet_jobs_sortable_columns',
+ array($this, 'sortingColumns'));
+ add_action('restrict_manage_posts',
+ array($this, 'taxonomy_filter_restrict_manage_posts'));
+ add_filter('parse_query', array($this, 'jobFilter'));
+// var_dump($typenow);
+// add_filter('user_row_actions', array($this, 'remove_row_actions'));
+ }
+
+ // Filter the request to just give posts for the given taxonomy, if applicable.
+ function taxonomy_filter_restrict_manage_posts()
+ {
+ global $typenow;
+// var_dump($typenow);
+ if ($typenow == EMMET_EMP_POST_TYPE) {
+ $filters = get_object_taxonomies(EMMET_EMP_POST_TYPE);
+
+ foreach ($filters as $tax_slug) {
+ $tax_obj = get_taxonomy($tax_slug);
+ wp_dropdown_categories(array(
+ 'show_option_all' => __('Show All ' . $tax_obj->label),
+ 'taxonomy' => $tax_slug,
+ 'name' => $tax_obj->name,
+ 'orderby' => 'name',
+ 'selected' => (isset($_GET[$tax_slug]) ? $_GET[$tax_slug] : ''),
+ 'hierarchical' => $tax_obj->hierarchical,
+ 'show_count' => true,
+ 'hide_empty' => true
+ ));
+ }
+ }
+
+
+
+ }
+
+ function taxonomy_filter_post_type_request($query)
+ {
+ global $pagenow, $typenow;
+//var_dump($typenow);
+ if ('edit.php' == $pagenow && $typenow == EMMET_EMP_POST_TYPE) {
+ $filters = get_object_taxonomies(EMMET_EMP_POST_TYPE);
+// var_dump($filters);
+ foreach ($filters as $tax_slug) {
+ $var = &$query->query_vars[$tax_slug];
+// var_dump($var);
+// var_dump($tax_slug);
+ if (isset($var)) {
+ $term = get_term_by('id', $var, $tax_slug);
+ var_dump($term);
+ $var['term'] = $term->slug;
+ var_dump($var['term']);
+ var_dump($term->slug);
+ }
+ }
+ }
+ }
+
+ public function remove_row_actions($actions, $post)
+ {
+ global $curren_screen;
+ if ($curren_screen->post_type != EMMET_EMP_POST_TYPE) {
+ return $actions;
+ }
+ unset($actions['view']);
+ unset($actions['inline hide-if-no-js']);
+ return $actions;
+ }
+
+ /**
+ * Add sorting by columns
+ *
+ * @param type $columns Array of columns
+ *
+ * @return arrray
+ */
+ public function sortingColumns($columns)
+ {
+ $columns['glmjobs_col_date'] = 'glmjobs_col_date';
+ $columns['glmjobs_col_cat'] = 'glmjobs_col_cat';
+ $columns['glmjobs_col_dep'] = 'glmjobs_col_dep';
+ return $columns;
+ }
+
+ /**
+ * Filter for the parse_query action
+ *
+ * @param type $query WP_Query object
+ *
+ * @return Object $query
+ */
+ public function jobFilter($query)
+ {
+ global $pagenow, $typenow;
+ if ('edit.php' == $pagenow && $typenow == EMMET_EMP_POST_TYPE) {
+ $qv = & $query->query_vars;
+ if (isset($qv['post_type']) && $qv['post_type'] == EMMET_EMP_POST_TYPE) {
+ //$qv['post_type'] = 'page';//EMMET_EMP_POST_TYPE;
+ if (isset($qv[EMMET_EMP_TAX_CATEGORIES]) && $qv[EMMET_EMP_TAX_CATEGORIES] != 0) {
+ $term = get_term_by('id', $qv[EMMET_EMP_TAX_CATEGORIES], EMMET_EMP_TAX_CATEGORIES);
+ $qv[EMMET_EMP_TAX_CATEGORIES] = $term->slug;
+
+ if (isset($query->tax_query)) {
+ $tax_query =& $query->tax_query;
+ $queries =& $tax_query->queries;
+// echo '<pre>'.print_r($queries, true).'</pre>';
+ foreach ($queries as $key => &$qs) {
+ if ($qs['taxonomy'] == EMMET_EMP_TAX_CATEGORIES) {
+ $qs['terms'][$key] = $term->slug;
+ }
+ }
+ }
+
+ }
+ if (isset($qv[EMMET_EMP_TAX_DEPARTMENTS]) && $qv[EMMET_EMP_TAX_DEPARTMENTS] != 0) {
+ $term = get_term_by('id', $qv[EMMET_EMP_TAX_DEPARTMENTS], EMMET_EMP_TAX_DEPARTMENTS);
+ $qv[EMMET_EMP_TAX_DEPARTMENTS] = $term->slug;
+ }
+ if ($qv['post_type'] == EMMET_EMP_POST_TYPE) {
+// echo '<pre>'.print_r($qv, true).'</pre>';
+ }
+// echo '<pre>'.print_r($query, true).'</pre>';
+ }
+
+
+ return $query;
+ }
+ }
+
+ /**
+ * Setup the two drop downs for the Taxonomies
+ *
+ * @global type $wp_query
+ */
+ public function jobFilterList()
+ {
+ $screen = get_current_screen();
+ global $wp_query;
+ if ($screen->post_type == EMMET_EMP_POST_TYPE) {
+ $tax1 = get_taxonomy(EMMET_EMP_TAX_CATEGORIES);
+ wp_dropdown_categories(array(
+ 'show_option_all' => __("Show all {$tax1->label}"),
+ 'taxonomy' => EMMET_EMP_TAX_CATEGORIES,
+ 'name' => EMMET_EMP_TAX_CATEGORIES,
+ 'orderby' => 'name',
+ 'selected' => (isset($wp_query->query[EMMET_EMP_TAX_CATEGORIES])
+ ? $wp_query->query[EMMET_EMP_TAX_CATEGORIES]
+ : ''),
+ 'hierarchical' => true,
+ 'depth' => 3,
+ 'show_count' => true,
+ 'hide_empty' => true
+ ));
+ $tax2 = get_taxonomy(EMMET_EMP_TAX_DEPARTMENTS);
+ wp_dropdown_categories(array(
+ 'show_option_all' => __("Show all {$tax2->label}"),
+ 'taxonomy' => EMMET_EMP_TAX_DEPARTMENTS,
+ 'name' => EMMET_EMP_TAX_DEPARTMENTS,
+ 'orderby' => 'name',
+ 'selected' => (isset($wp_query->query[EMMET_EMP_TAX_DEPARTMENTS])
+ ? $wp_query->query[EMMET_EMP_TAX_DEPARTMENTS]
+ : ''),
+ 'hierarchical' => true,
+ 'depth' => 3,
+ 'show_count' => true,
+ 'hide_empty' => true
+ ));
+ }
+ }
+
+ /**
+ * Add meta box for dates
+ */
+ public function metaDates()
+ {
+ add_meta_box('emmet_employment_meta', 'Position Information',
+ array($this, 'editJobMeta'), EMMET_EMP_POST_TYPE);
+ }
+
+ /**
+ * Build the edit part of the date
+ * @global type $post
+ */
+ public function editJobMeta()
+ {
+ global $post;
+ $custom = get_post_custom($post->ID);
+ extract($custom);
+
+ $meta_sd = (isset($custom['emmet_jobs_startdate']))
+ ? $custom['emmet_jobs_startdate'][0]
+ : time();
+ $meta_ed = (isset($custom['emmet_jobs_enddate']))
+ ? $custom['emmet_jobs_enddate'][0]
+ : time();
+
+ $clean_sd = date('D, M d, Y', $meta_sd);
+ $clean_ed = date('D, M d, Y', $meta_ed);
+
+ $emmet_jobs_status = (isset($emmet_jobs_status[0]))
+ ? $emmet_jobs_status[0]
+ : '';
+ $emmet_jobs_pay_grade = (isset($emmet_jobs_pay_grade[0]))
+ ? $emmet_jobs_pay_grade[0]
+ : '';
+ $emmet_jobs_shift = (isset($emmet_jobs_shift[0]))
+ ? $emmet_jobs_shift[0]
+ : '';
+ $emmet_jobs_contact = (isset($emmet_jobs_contact[0]))
+ ? $emmet_jobs_contact[0]
+ : '';
+ $emmet_jobs_email = (isset($emmet_jobs_email[0]))
+ ? $emmet_jobs_email[0]
+ : '';
+ $emmet_jobs_comments = (isset($emmet_jobs_comments[0]))
+ ? $emmet_jobs_comments[0]
+ : '';
+ $emmet_jobs_code = (isset($emmet_jobs_code[0]))
+ ? $emmet_jobs_code[0]
+ : '';
+
+ include $this->pluginDirName . 'views/admin/job_meta.php';
+ }
+
+ /**
+ * Save the Employment meta data
+ *
+ * @global type $post Post Object
+ *
+ * @return mixed
+ */
+ public function saveEmpMeta()
+ {
+ global $post;
+ if (!isset($_POST['glm-jobs-nonce'])) {
+ return;
+ }
+ // - still require nonce
+ if (!wp_verify_nonce($_POST['glm-jobs-nonce'], 'glm-jobs-nonce')) {
+ return $post->ID;
+ }
+
+ if (!current_user_can('edit_post', $post->ID)) {
+ return $post->ID;
+ }
+
+ // - convert back to unix & update post
+ if (!isset($_POST["emmet_jobs_startdate"])) {
+ return $post;
+ }
+
+ $updatestartd = strtotime($_POST['emmet_jobs_startdate']);
+ update_post_meta($post->ID, 'emmet_jobs_startdate', $updatestartd);
+
+ if (!isset($_POST['emmet_jobs_enddate'])) {
+ return $post;
+ }
+ $updateendd = strtotime($_POST['emmet_jobs_enddate']);
+ update_post_meta($post->ID, 'emmet_jobs_enddate', $updateendd);
+
+ update_post_meta($post->ID, 'emmet_jobs_status', $_POST['emmet_jobs_status']);
+ update_post_meta($post->ID, 'emmet_jobs_pay_grade',
+ $_POST['emmet_jobs_pay_grade']);
+ update_post_meta($post->ID, 'emmet_jobs_shift', $_POST['emmet_jobs_shift']);
+ update_post_meta($post->ID, 'emmet_jobs_contact',
+ $_POST['emmet_jobs_contact']);
+ update_post_meta($post->ID, 'emmet_jobs_email', $_POST['emmet_jobs_email']);
+ update_post_meta($post->ID, 'emmet_jobs_comments',
+ $_POST['emmet_jobs_comments']);
+ update_post_meta($post->ID, 'emmet_jobs_code', $_POST['emmet_jobs_code']);
+ }
+
+ /**
+ * Create new Post type
+ */
+ public function addPostTypes()
+ {
+ if (isset($_REQUEST['post_type']) && $_REQUEST['post_type'] == EMMET_EMP_POST_TYPE) {
+ add_filter('months_dropdown_results', '__return_empty_array');
+ }
+ $labels = array(
+ 'name' => _x('Jobs', 'job general name'),
+ 'singular_name' => _x('Job', 'job type singular name'),
+ 'add_new' => _x('Add New', 'job'),
+ 'add_new_item' => __('Add New Job'),
+ 'edit_item' => __('Edit Job'),
+ 'new_item' => __('New Job'),
+ 'all_items' => __('All Jobs'),
+ 'view_item' => __('View Job'),
+ 'search_items' => __('Search Jobs'),
+ 'not_found' => __('No Jobs found'),
+ 'not_found_in_trash' => __('No Jobs found in the Trash'),
+ 'parent_item_colon' => '',
+ 'menu_name' => 'Jobs'
+ );
+ $args = array(
+// 'label' => __('Jobs'),
+ 'labels' => $labels,
+ 'description' => 'Stores Jobs and Job data',
+ 'public' => true,
+ 'can_export' => true,
+ 'menu_position' => 21,
+ 'supports' => array('title', 'editor'),
+ 'has_archive' => true,
+ 'menu_icon' => 'dashicons-businessman',
+ 'capability_type' => 'post',
+ 'hierarchical' => false,
+ 'rewrite' => array('slug' => 'jobs'),
+ 'taxonomies' => array(EMMET_EMP_TAX_CATEGORIES, EMMET_EMP_TAX_DEPARTMENTS),
+ 'show_in_menu' => true,
+ 'show_ui' => true,
+ 'query_var' => true,
+ 'publicly_queryable' => true
+ );
+ register_post_type(EMMET_EMP_POST_TYPE, $args);
+ register_taxonomy_for_object_type(EMMET_EMP_TAX_CATEGORIES,
+ EMMET_EMP_POST_TYPE);
+ register_taxonomy_for_object_type(EMMET_EMP_TAX_DEPARTMENTS,
+ EMMET_EMP_POST_TYPE);
+ }
+
+ /**
+ * Update the message text for the job post type
+ *
+ * @global type $post Post object
+ * @global type $post_ID Id of post
+ *
+ * @param type $messages Messages array
+ *
+ * @return type
+ */
+ public function jobsUpdatedMessages($messages)
+ {
+ global $post, $post_ID;
+
+ $messages['post'] = array(
+ 0 => '', // Unused. Messages start at index 1.
+ 1 => sprintf(__('Job updated. <a href="%s">View item</a>'),
+ esc_url(get_permalink($post_ID))),
+ 2 => __('Custom field updated.'),
+ 3 => __('Custom field deleted.'),
+ 4 => __('Job updated.'),
+ /* translators: %s: date and time of the revision */
+ 5 => isset($_GET['revision'])
+ ? sprintf(__('Job restored to revision from %s'),
+ wp_post_revision_title((int) $_GET['revision'],
+ false))
+ : false,
+ 6 => sprintf(__('Job published. <a href="%s">View event</a>'),
+ esc_url(get_permalink($post_ID))),
+ 7 => __('Job saved.'),
+ 8 => sprintf(__('Job submitted. <a target="_blank" href="%s">Preview event</a>'),
+ esc_url(add_query_arg('preview', 'true',
+ get_permalink($post_ID)))),
+ 9 => sprintf(__('Job scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview job</a>'),
+ // translators: Publish box date format, see http://php.net/date
+ date_i18n(__('M j, Y @ G:i'),
+ strtotime($post->post_date)),
+ esc_url(get_permalink($post_ID))),
+ 10 => sprintf(__('Job draft updated. <a target="_blank" href="%s">Preview event</a>'),
+ esc_url(add_query_arg('preview', 'true',
+ get_permalink($post_ID)))),
+ );
+ return $messages;
+ }
+
+ /**
+ * Create the taxanomies for the post type
+ */
+ public function createJobTaxonomy()
+ {
+ $labels = array(
+ 'name' => _x('Categories',
+ 'taxonomy general name'),
+ 'singular_name' => _x('Category',
+ 'taxonomy singular name'),
+ 'search_items' => __('Search Categories'),
+ 'popular_items' => __('Popular Categories'),
+ 'all_items' => __('All Categories'),
+ 'parent_item' => null,
+ 'parent_item_colon' => null,
+ 'edit_item' => __('Edit Category'),
+ 'update_item' => __('Update Category'),
+ 'add_new_item' => __('Add New Category'),
+ 'new_item_name' => __('New Category Name'),
+ 'separate_items_with_commas' => __('Separate categories with commas'),
+ 'add_or_remove_items' => __('Add or remove categories'),
+ 'choose_from_most_used' => __('Choose from the most used categories'),
+ );
+
+ register_taxonomy(
+ EMMET_EMP_TAX_CATEGORIES, EMMET_EMP_POST_TYPE,
+ array(
+ 'label' => __('Job Category'),
+ 'labels' => $labels,
+ 'hierarchical' => true,
+ 'show_ui' => true,
+ 'query_var' => EMMET_EMP_TAX_CATEGORIES,
+ 'rewrite' => array('slug' => EMMET_EMP_TAX_CATEGORIES),
+ 'show_admin_column' => true,
+ '_builtin' => true
+ ));
+
+ $labels = array(
+ 'name' => _x('Departments',
+ 'taxonomy general name'),
+ 'singular_name' => _x('Department',
+ 'taxonomy singular name'),
+ 'search_items' => __('Search Departments'),
+ 'popular_items' => __('Popular Departments'),
+ 'all_items' => __('All Departments'),
+ 'parent_item' => null,
+ 'parent_item_colon' => null,
+ 'edit_item' => __('Edit Department'),
+ 'update_item' => __('Update Department'),
+ 'add_new_item' => __('Add New Department'),
+ 'new_item_name' => __('New Department Name'),
+ 'separate_items_with_commas' => __('Separate departments with commas'),
+ 'add_or_remove_items' => __('Add or remove departments'),
+ 'choose_from_most_used' => __('Choose from the most used departments'),
+ );
+
+ register_taxonomy(
+ EMMET_EMP_TAX_DEPARTMENTS, EMMET_EMP_POST_TYPE,
+ array(
+ 'label' => __('Job Department'),
+ 'labels' => $labels,
+ 'hierarchical' => true,
+ 'show_ui' => true,
+ 'query_var' => EMMET_EMP_TAX_DEPARTMENTS,
+ 'rewrite' => array('slug' => EMMET_EMP_TAX_DEPARTMENTS),
+ ));
+ }
+
+ /**
+ * To set which fields appear in the post type admin list
+ *
+ * @param array $columns Columns for the admin list view
+ *
+ * @return array
+ */
+ function jobsEditColumns($columns)
+ {
+ $columns = array(
+ "cb" => "<input type=\"checkbox\" />",
+ "title" => "Job Title",
+ "glmjobs_col_cat" => "Category",
+ "glmjobs_col_dep" => "Department",
+ "glmjobs_col_date" => "Dates",
+ );
+ return $columns;
+ }
+
+ /**
+ * Setup the custom columns for the admin list view
+ *
+ * @global type $post Post
+ *
+ * @param type $column Column
+ */
+ function jobsCustomColumns($column)
+ {
+ global $post;
+ $custom = get_post_custom();
+
+ switch ($column) {
+ case "glmjobs_col_cat":
+ // - show taxonomy terms -
+ $eventcats = get_the_terms($post->ID, "emmet_jobscategory");
+ $eventcats_html = array();
+ if ($eventcats) {
+ foreach ($eventcats as $eventcat) {
+ array_push($eventcats_html, $eventcat->name);
+ }
+ echo implode($eventcats_html, ", ");
+ } else {
+ _e('None', 'themeforce');
+ ;
+ }
+ break;
+ case "glmjobs_col_dep":
+ // - show taxonomy terms -
+ $eventcats = get_the_terms($post->ID, "emmet_jobsdepartment");
+ $eventcats_html = array();
+ if ($eventcats) {
+ foreach ($eventcats as $eventcat) {
+ array_push($eventcats_html, $eventcat->name);
+ }
+ echo implode($eventcats_html, ", ");
+ } else {
+ _e('None', 'themeforce');
+ ;
+ }
+ break;
+ case "glmjobs_col_date":
+ // - show dates -
+ $startd = $custom['emmet_jobs_startdate'][0];
+ $endd = $custom['emmet_jobs_enddate'][0];
+ $startdate = date("F j, Y", $startd);
+ $enddate = date("F j, Y", $endd);
+ echo $startdate . '<br /><em>' . $enddate . '</em>';
+ break;
+ }
+ }
+
+}
--- /dev/null
+<?php
+require_once 'class-glm-list-table.php';
+
+class List_Applications extends GLM_List_Table
+{
+ public $wpdb;
+ /** ************************************************************************
+ * REQUIRED. Set up a constructor that references the parent constructor. We
+ * use the parent reference to set some default configs.
+ ***************************************************************************/
+ function __construct($wpdb){
+ global $status, $page;
+ $this->wpdb = $wpdb;
+
+ //Set parent defaults
+ parent::__construct( array(
+ 'singular' => 'application', //singular name of the listed records
+ 'plural' => 'applications', //plural name of the listed records
+ 'ajax' => false //does this table support ajax?
+ ) );
+ }
+ public function get_data()
+ {
+ $where = array();
+ if (isset($_REQUEST['s'])) {
+ $search = filter_var($_REQUEST['s'], FILTER_SANITIZE_STRING);
+ $where[] = "CONCAT(UPPER(fname), UPPER(lname)) like '%".strtoupper($search)."%'";
+ }
+ $archived = (isset($_REQUEST['archived']))
+ ? filter_var($_REQUEST['archived'], FILTER_VALIDATE_BOOLEAN)
+ : false;
+ if ($archived) {
+ $where[] = "archived = true";
+ } else {
+ $where[] = "archived <> true";
+ }
+ $where[] = "(SELECT count(*) FROM "
+ . $this->wpdb->prefix . EMMET_EMP_FORM_TABLE . " emmet_ft WHERE emmet_ft.form_part = 7 AND emmet_ft.application = emmet_at.id)";
+ $sql = "
+ SELECT id as ID,fname,lname,create_time,archived,position,resume
+ FROM " . $this->wpdb->prefix . EMMET_EMP_APPLICATION_TABLE . " emmet_at
+ ";
+ if (!empty($where)) {
+ $sql .= " WHERE ".implode(" AND ", $where);
+ }
+ //var_dump($sql);
+ return $this->wpdb->get_results(
+ $sql,
+ ARRAY_A
+ );
+ }
+ /** ************************************************************************
+ * Recommended. This method is called when the parent class can't find a method
+ * specifically build for a given column. Generally, it's recommended to include
+ * one method for each column you want to render, keeping your package class
+ * neat and organized. For example, if the class needs to process a column
+ * named 'title', it would first see if a method named $this->column_title()
+ * exists - if it does, that method will be used. If it doesn't, this one will
+ * be used. Generally, you should try to use custom column methods as much as
+ * possible.
+ *
+ * Since we have defined a column_title() method later on, this method doesn't
+ * need to concern itself with any column with a name of 'title'. Instead, it
+ * needs to handle everything else.
+ *
+ * For more detailed insight into how columns are handled, take a look at
+ * WP_List_Table::single_row_columns()
+ *
+ * @param array $item A singular item (one full row's worth of data)
+ * @param array $column_name The name/slug of the column to be processed
+ * @return string Text or HTML to be placed inside the column <td>
+ **************************************************************************/
+ function column_default($item, $column_name){
+ switch($column_name){
+ case 'fname':
+ case 'lname':
+ case 'position':
+ case 'create_time':
+ case 'archived':
+ case 'resume':
+ return $item[$column_name];
+ default:
+ return print_r($item,true); //Show the whole array for troubleshooting purposes
+ }
+ }
+
+
+ /** ************************************************************************
+ * Recommended. This is a custom column method and is responsible for what
+ * is rendered in any column with a name/slug of 'title'. Every time the class
+ * needs to render a column, it first looks for a method named
+ * column_{$column_title} - if it exists, that method is run. If it doesn't
+ * exist, column_default() is called instead.
+ *
+ * This example also illustrates how to implement rollover actions. Actions
+ * should be an associative array formatted as 'slug'=>'link html' - and you
+ * will need to generate the URLs yourself. You could even ensure the links
+ *
+ *
+ * @see WP_List_Table::::single_row_columns()
+ * @param array $item A singular item (one full row's worth of data)
+ * @return string Text to be placed inside the column <td> (movie title only)
+ **************************************************************************/
+ function column_fname($item){
+ //Build row actions
+ $urlFormat = '?post_type=%s&page=%s&action=%s&application=%s&archived=%d';
+ $archivedList = (isset($_REQUEST['archived']))
+ ? filter_var($_REQUEST['archived'], FILTER_VALIDATE_BOOLEAN)
+ : false;
+ if ($archivedList ) {
+ $actions = array(
+ 'unarchive' => sprintf(
+ '<a href="'.$urlFormat.'">Unarchive</a>',
+ EMMET_EMP_POST_TYPE,
+ $_REQUEST['page'],
+ 'unarchive',
+ $item['ID'],
+ $_REQUEST['archived']
+ ),
+ 'delete' => sprintf(
+ '<a href="'.$urlFormat.'">Delete Permanently</a>',
+ EMMET_EMP_POST_TYPE,
+ $_REQUEST['page'],
+ 'delete',
+ $item['ID'],
+ $_REQUEST['archived']
+ ),
+ );
+ } else {
+ $actions = array(
+ 'view' => sprintf(
+ '<a href="?post_type=%s&page=%s&action=%s&application=%s">View</a>',
+ EMMET_EMP_POST_TYPE,
+ $_REQUEST['page'],
+ 'view',
+ $item['ID']
+ ),
+ 'archive' => sprintf(
+ '<a href="?post_type=%s&page=%s&action=%s&application=%s">Archive</a>',
+ EMMET_EMP_POST_TYPE,
+ $_REQUEST['page'],
+ 'archive',
+ $item['ID']
+ )
+ );
+ }
+
+
+ //Return the title contents
+ return sprintf('%1$s <span style="color:silver">(id:%2$s)</span>%3$s',
+ /*$1%s*/ $item['fname'],
+ /*$2%s*/ $item['ID'],
+ /*$3%s*/ $this->row_actions($actions)
+ );
+ }
+
+ function column_position($item)
+ {
+ if ($item['position']) {
+ $jobData = get_post($item['position']);
+ return $jobData->post_title;
+ } else {
+ return '';
+ }
+ }
+
+ function column_resume($item)
+ {
+ if ($item['resume'] && is_file(EMMET_EMP_UPLOAD_DIR . $item['resume'])) {
+ $format = '<a href="%s%s">Resume File</a>';
+ return sprintf(
+ $format,
+ EMMET_EMP_UPLOAD_URL,
+ $item['resume']
+ );
+ } else {
+ return '';
+ }
+ }
+
+
+ /** ************************************************************************
+ * REQUIRED if displaying checkboxes or using bulk actions! The 'cb' column
+ * is given special treatment when columns are processed. It ALWAYS needs to
+ * have it's own method.
+ *
+ * @see WP_List_Table::::single_row_columns()
+ * @param array $item A singular item (one full row's worth of data)
+ * @return string Text to be placed inside the column <td> (movie title only)
+ **************************************************************************/
+ function column_cb($item){
+ return sprintf(
+ '<input type="checkbox" name="%1$s[]" value="%2$s" />',
+ /*$1%s*/ $this->_args['singular'], //Let's simply repurpose the table's singular label ("movie")
+ /*$2%s*/ $item['ID'] //The value of the checkbox should be the record's id
+ );
+ }
+
+
+ /** ************************************************************************
+ * REQUIRED! This method dictates the table's columns and titles. This should
+ * return an array where the key is the column slug (and class) and the value
+ * is the column's title text. If you need a checkbox for bulk actions, refer
+ * to the $columns array below.
+ *
+ * The 'cb' column is treated differently than the rest. If including a checkbox
+ * column in your table you must create a column_cb() method. If you don't need
+ * bulk actions or checkboxes, simply leave the 'cb' entry out of your array.
+ *
+ * @see WP_List_Table::::single_row_columns()
+ * @return array An associative array containing column information: 'slugs'=>'Visible Titles'
+ **************************************************************************/
+ function get_columns(){
+ $columns = array(
+ 'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
+ 'fname' => 'First Name',
+ 'lname' => 'Last Name',
+ 'resume' => 'Resume File',
+ 'position' => 'Position',
+ 'create_time' => 'Created'
+ );
+ return $columns;
+ }
+
+
+ /** ************************************************************************
+ * Optional. If you want one or more columns to be sortable (ASC/DESC toggle),
+ * you will need to register it here. This should return an array where the
+ * key is the column that needs to be sortable, and the value is db column to
+ * sort by. Often, the key and value will be the same, but this is not always
+ * the case (as the value is a column name from the database, not the list table).
+ *
+ * This method merely defines which columns should be sortable and makes them
+ * clickable - it does not handle the actual sorting. You still need to detect
+ * the ORDERBY and ORDER querystring variables within prepare_items() and sort
+ * your data accordingly (usually by modifying your query).
+ *
+ * @return array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool)
+ **************************************************************************/
+ function get_sortable_columns() {
+ $sortable_columns = array(
+ 'fname' => array('fname', false), //true means it's already sorted
+ 'lname' => array('lname', false),
+ 'position' => array('position', false),
+ 'create_time' => array('create_time', false)
+ );
+ return $sortable_columns;
+ }
+
+
+ /** ************************************************************************
+ * Optional. If you need to include bulk actions in your list table, this is
+ * the place to define them. Bulk actions are an associative array in the format
+ * 'slug'=>'Visible Title'
+ *
+ * If this method returns an empty value, no bulk action will be rendered. If
+ * you specify any bulk actions, the bulk actions box will be rendered with
+ * the table automatically on display().
+ *
+ * Also note that list tables are not automatically wrapped in <form> elements,
+ * so you will need to create those manually in order for bulk actions to function.
+ *
+ * @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'
+ **************************************************************************/
+ function get_bulk_actions() {
+ $archivedList = (isset($_REQUEST['archived']))
+ ? filter_var($_REQUEST['archived'], FILTER_VALIDATE_BOOLEAN)
+ : false;
+ if ($archivedList) {
+ $actions = array(
+ 'delete' => 'Delete Permanently',
+ 'unarchive' => 'Unarchive'
+ );
+ } else {
+ $actions = array(
+ 'archive' => 'Archive'
+ );
+ }
+
+ return $actions;
+ }
+
+
+ /** ************************************************************************
+ * Optional. You can handle your bulk actions anywhere or anyhow you prefer.
+ * For this example package, we will handle it in the class to keep things
+ * clean and organized.
+ *
+ * @see $this->prepare_items()
+ **************************************************************************/
+ function process_bulk_action() {
+
+ //Detect when a bulk action is being triggered...
+ if( 'delete'===$this->current_action() ) {
+// wp_die('Items deleted (or they would be if we had items to delete)!');
+ $applications = filter_var(
+ $_REQUEST['application'],
+ FILTER_VALIDATE_INT,
+ array('filter' => FILTER_VALIDATE_INT, 'flags' => FILTER_FORCE_ARRAY)
+ );
+ $appId = filter_var($_REQUEST['application'], FILTER_VALIDATE_INT);
+ if (!$applications && $appId) {
+ $applications[0] = $appId;
+ }
+ foreach ($applications as $app) {
+ $sql = "
+ DELETE FROM " . $this->wpdb->prefix . EMMET_EMP_APPLICATION_TABLE ."
+ WHERE id = {$app}";
+ $this->wpdb->query($sql);
+ $sql = "
+ DELETE FROM " . $this->wpdb->prefix . EMMET_EMP_FORM_TABLE ."
+ WHERE application = {$app}";
+ $this->wpdb->query($sql);
+ }
+ }
+ if( 'archive'===$this->current_action() ) {
+ $applications = filter_var(
+ $_REQUEST['application'],
+ FILTER_VALIDATE_INT,
+ array('filter' => FILTER_VALIDATE_INT, 'flags' => FILTER_FORCE_ARRAY)
+ );
+ $appId = filter_var($_REQUEST['application'], FILTER_VALIDATE_INT);
+ if (!$applications && $appId) {
+ $applications[0] = $appId;
+ }
+ foreach ($applications as $app) {
+ $sql = "
+ UPDATE " . $this->wpdb->prefix . EMMET_EMP_APPLICATION_TABLE ."
+ SET archived = true
+ WHERE id = {$app}";
+ $this->wpdb->query($sql);
+ }
+ }
+ if( 'unarchive'===$this->current_action() ) {
+ $applications = filter_var(
+ $_REQUEST['application'],
+ FILTER_VALIDATE_INT,
+ array('filter' => FILTER_VALIDATE_INT, 'flags' => FILTER_FORCE_ARRAY)
+ );
+ $appId = filter_var($_REQUEST['application'], FILTER_VALIDATE_INT);
+ if (!$applications && $appId) {
+ $applications[0] = $appId;
+ }
+ foreach ($applications as $app) {
+ $sql = "
+ UPDATE " . $this->wpdb->prefix . EMMET_EMP_APPLICATION_TABLE ."
+ SET archived = false
+ WHERE id = {$app}";
+ $this->wpdb->query($sql);
+ }
+ }
+ }
+
+
+ /** ************************************************************************
+ * REQUIRED! This is where you prepare your data for display. This method will
+ * usually be used to query the database, sort and filter the data, and generally
+ * get it ready to be displayed. At a minimum, we should set $this->items and
+ * $this->set_pagination_args(), although the following properties and methods
+ * are frequently interacted with here...
+ *
+ * @global WPDB $wpdb
+ * @uses $this->_column_headers
+ * @uses $this->items
+ * @uses $this->get_columns()
+ * @uses $this->get_sortable_columns()
+ * @uses $this->get_pagenum()
+ * @uses $this->set_pagination_args()
+ **************************************************************************/
+ function prepare_items() {
+ global $wpdb; //This is used only if making any database queries
+
+ /**
+ * First, lets decide how many records per page to show
+ */
+ $per_page = 5;
+
+
+ /**
+ * REQUIRED. Now we need to define our column headers. This includes a complete
+ * array of columns to be displayed (slugs & titles), a list of columns
+ * to keep hidden, and a list of columns that are sortable. Each of these
+ * can be defined in another method (as we've done here) before being
+ * used to build the value for our _column_headers property.
+ */
+ $columns = $this->get_columns();
+ $hidden = array();
+ $sortable = $this->get_sortable_columns();
+
+
+ /**
+ * REQUIRED. Finally, we build an array to be used by the class for column
+ * headers. The $this->_column_headers property takes an array which contains
+ * 3 other arrays. One for all columns, one for hidden columns, and one
+ * for sortable columns.
+ */
+ $this->_column_headers = array($columns, $hidden, $sortable);
+
+
+ /**
+ * Optional. You can handle your bulk actions however you see fit. In this
+ * case, we'll handle them within our package just to keep things clean.
+ */
+ $this->process_bulk_action();
+
+
+ /**
+ * Instead of querying a database, we're going to fetch the example data
+ * property we created for use in this plugin. This makes this example
+ * package slightly different than one you might build on your own. In
+ * this example, we'll be using array manipulation to sort and paginate
+ * our data. In a real-world implementation, you will probably want to
+ * use sort and pagination data to build a custom query instead, as you'll
+ * be able to use your precisely-queried data immediately.
+ */
+ $data = $this->get_data();
+
+
+ /**
+ * This checks for sorting input and sorts the data in our array accordingly.
+ *
+ * In a real-world situation involving a database, you would probably want
+ * to handle sorting by passing the 'orderby' and 'order' values directly
+ * to a custom query. The returned data will be pre-sorted, and this array
+ * sorting technique would be unnecessary.
+ */
+ function usort_reorder($a,$b){
+ $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'create_time'; //If no sort, default to created
+ $order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'desc'; //If no order, default to desc
+ $result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order
+ return ($order==='asc') ? $result : -$result; //Send final sort direction to usort
+ }
+ usort($data, 'usort_reorder');
+
+
+ /***********************************************************************
+ * ---------------------------------------------------------------------
+ * vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+ *
+ * In a real-world situation, this is where you would place your query.
+ *
+ * For information on making queries in WordPress, see this Codex entry:
+ * http://codex.wordpress.org/Class_Reference/wpdb
+ *
+ * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ * ---------------------------------------------------------------------
+ **********************************************************************/
+
+
+ /**
+ * REQUIRED for pagination. Let's figure out what page the user is currently
+ * looking at. We'll need this later, so you should always include it in
+ * your own package classes.
+ */
+ $current_page = $this->get_pagenum();
+
+ /**
+ * REQUIRED for pagination. Let's check how many items are in our data array.
+ * In real-world use, this would be the total number of items in your database,
+ * without filtering. We'll need this later, so you should always include it
+ * in your own package classes.
+ */
+ $total_items = count($data);
+
+
+ /**
+ * The WP_List_Table class does not handle pagination for us, so we need
+ * to ensure that the data is trimmed to only the current page. We can use
+ * array_slice() to
+ */
+ $data = array_slice($data,(($current_page-1)*$per_page),$per_page);
+
+
+
+ /**
+ * REQUIRED. Now we can add our *sorted* data to the items property, where
+ * it can be used by the rest of the class.
+ */
+ $this->items = $data;
+
+
+ /**
+ * REQUIRED. We also have to register our pagination options & calculations.
+ */
+ $this->set_pagination_args( array(
+ 'total_items' => $total_items, //WE have to calculate the total number of items
+ 'per_page' => $per_page, //WE have to determine how many items to show on a page
+ 'total_pages' => ceil($total_items/$per_page) //WE have to calculate the total number of pages
+ ) );
+ }
+
+
+}
+
--- /dev/null
+<h2>Applications</h2>
+<?php
+$search = (isset($_REQUEST['s']))
+ ? filter_var($_REQUEST['s'], FILTER_SANITIZE_STRING)
+ : false;
+if ($search) {
+ echo '<span class="subtitle"> Search Results for "' . $search.'"</span>';
+}
+?>
+<ul class="subsubsub">
+ <li class="all"><a href="edit.php?post_type=<?php echo EMMET_EMP_POST_TYPE;?>&page=applications">Unarchived</a> |</li>
+ <li class="all"><a href="edit.php?post_type=<?php echo EMMET_EMP_POST_TYPE;?>&page=applications&archived=1">Archived</a></li>
+</ul>
+
+<form method="post" action="">
+ <p class="search-box">
+ <label class="screen-reader-text" for="app-search-input">Search Applicants</label>
+ <input id="app-search-input" name="s" type="search"
+ value="<?php echo htmlspecialchars($search);?>">
+ <input type="submit" class="button" value="Search Applicants">
+ </p>
+ <div class="wrap">
+ <?php $applicationList->prepare_items();?>
+ <?php $applicationList->display();?>
+ </div>
+</form>
--- /dev/null
+<div class="row">
+ <?php foreach ($forms as $form):?>
+ <div class="small-12 columns">
+ <?php foreach($form as $row):?>
+ <?php if (isset($row['type']) && $row['type'] == 'header') :?>
+ <h3><?php echo $row['label'];?></h3>
+ <?php else:?>
+ <div class="row">
+ <?php foreach($row as $field) :?>
+ <div class="large-<?php echo $field['grid'];?> small-12 columns">
+ <label<?php if (isset ($field['req']) && $field['req']):?> class="error"<?php endif;?>>
+ <?php if(isset($field['label'])) {echo $field['label'];}?>
+ </label>
+ <?php switch($field['type']) :
+ case 'text':?>
+ <?php case 'tel':?>
+ <?php case 'email':?>
+ <?php case 'textarea':?>
+ <?php case 'static': ?>
+ <?php if (isset($field['placeholder']) && $field['placeholder']) {echo '<span><b>'.$field['placeholder'].'</b></span>';}?>
+ <span><?php if(isset($field['value'])) { echo $field['value'];}?></span>
+ <?php break;?>
+ <?php case 'radio':?>
+ <?php foreach($field['opts'] as $option) :?>
+ <span>( <?php if ($field['value'] == $option['value']) {
+ echo 'x';
+ }?> )
+ <?php echo $option['label'];?></span>
+ <?php endforeach;?>
+ <?php break;?>
+ <?php case 'checkbox':?>
+ <?php foreach($field['opts'] as $option) :?>
+ <span>( <?php if (isset($option['checked']) && $option['checked']) {
+ echo 'x';
+ }?> )
+ <?php echo $option['label'];?></span>
+ <?php endforeach;?>
+ <?php break;?>
+ <?php endswitch;?>
+ <?php if (isset($field['error']) && $field['error']):?>
+ <small class="error"><?php echo $field['error'];?></small>
+ <?php endif;?>
+ </div>
+ <?php endforeach;?>
+ </div>
+ <?php endif;?>
+ <?php endforeach;?>
+ </div>
+ <?php endforeach;?>
+</div>
--- /dev/null
+<style>
+ .tf-meta { }
+ .tf-meta ul li { height: 20px; clear:both; margin: 0 0 15px 0;}
+ .tf-meta ul li label { width: 160px; display:block; float:left; padding-top:4px; text-align: right;padding-right: 20px;}
+ .tf-meta ul li input { width:200px; display:block; float:left; }
+ .tf-meta ul li em { width: 200px; display:block; float:left; color:gray; margin-left:10px; padding-top: 4px}
+</style>
+<input type="hidden"
+ name="glm-jobs-nonce"
+ id="tf-events-nonce"
+ value="<?php echo wp_create_nonce( 'glm-jobs-nonce' );?>" />
+<div class="tf-meta">
+ <ul>
+ <li>
+ <label>Start Date</label>
+ <input name="emmet_jobs_startdate" class="tfdate"
+ value="<?php echo $clean_sd; ?>" />
+ </li>
+ <li>
+ <label>End Date</label>
+ <input name="emmet_jobs_enddate" class="tfdate"
+ value="<?php echo $clean_ed; ?>" />
+ </li>
+ <li>
+ <label>Status</label>
+ <input name="emmet_jobs_status"
+ value="<?php echo $emmet_jobs_status; ?>" />
+ </li>
+ <li>
+ <label>Pay Grade</label>
+ <input name="emmet_jobs_pay_grade"
+ value="<?php echo $emmet_jobs_pay_grade; ?>" />
+ </li>
+ <li>
+ <label>Primary Shift</label>
+ <input name="emmet_jobs_shift"
+ value="<?php echo $emmet_jobs_shift; ?>" />
+ </li>
+ <li>
+ <label>HR Contact Name</label>
+ <input name="emmet_jobs_contact"
+ value="<?php echo $emmet_jobs_contact; ?>" />
+ </li>
+ <li>
+ <label>HR Email</label>
+ <input name="emmet_jobs_email"
+ value="<?php echo $emmet_jobs_email; ?>" />
+ </li>
+ <li>
+ <label>Comments</label>
+ <input name="emmet_jobs_comments"
+ value="<?php echo $emmet_jobs_comments; ?>" />
+ </li>
+ <li>
+ <label>Job Code</label>
+ <input name="emmet_jobs_code"
+ value="<?php echo $emmet_jobs_code; ?>" />
+ </li>
+ </ul>
+</div>
+<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
+<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
+<script>
+ jQuery(document).ready(function (){
+ jQuery(".tfdate").datepicker({
+ dateFormat: 'D, M d, yy',
+ showOn: 'button',
+ buttonImage: 'http://app.gaslightmedia.com/assets/icons/calendar.png',
+ buttonImageOnly: true,
+ numberOfMonths: 1
+
+ });
+ });
+</script>
--- /dev/null
+<link rel="stylesheet" href="../wp-content/plugins/glm-employment/css/admin-view-application.css" type="text/css"/>
+<link rel="stylesheet" href="../wp-content/plugins/glm-employment/css/admin-print-application.css" type="text/css" media="print" />
+<div id="appForm">
+ <?php include $viewPath . 'form_1.php';?>
+</div>
--- /dev/null
+<style>
+ div.static {
+ text-align:left;
+ padding-top: 5px;
+ }
+ .row.content ul.glm-emp-forms-ul {
+ columns: 1;
+ -moz-columns: 1;
+ -webkit-columns: 1;
+ margin-left: auto;
+ margin-right: auto;
+ padding-left: 20px;
+ }
+ input[type="checkbox"] {
+ margin-top: 10px;
+ }
+ .row h4 {padding-top: 0;}
+</style>
+<div class="row">
+ <div class="small-12 columns">
+ <h1><?php if(isset($formTitle)) {echo $formTitle;}?></h1>
+ <form method="post" action="<?php echo $formAction;?>" enctype="multipart/form-data">
+ <input type="hidden" name="<?php echo self::FORM_VAR;?>" value="1">
+ <input type="hidden" name="form_part" value="<?php echo $formPart;?>" />
+ <?php if (isset($appId) && $appId):?>
+ <input type="hidden" name="appId" value="<?php echo $appId;?>">
+ <?php endif;?>
+ <?php if (isset($jobId) && $jobId):?>
+ <input type="hidden" name="job" value="<?php echo $jobId;?>">
+ <?php endif;?>
+ <?php foreach($form as $row):?>
+ <?php if (isset($row['type']) && $row['type'] == 'header') :?>
+ <h3><?php echo $row['label'];?></h3>
+ <?php if (isset($row['subheader']) && $row['subheader']) {?>
+ <h4 class="subheader"><?php echo $row['subheader'];?></h4>
+ <?php }?>
+ <?php if (isset($row['notes']) && $row['notes']) {?>
+ <p><?php echo $row['notes'];?></p>
+ <?php }?>
+ <?php else:?>
+ <div class="row<?php echo (isset($row[0]['rcoll']) && $row[0]['rcoll'])?' collapse':'';?>">
+ <?php foreach($row as $field) :?>
+ <div class="small-<?php echo $field['grid'];?> columns">
+ <label<?php if (isset($field['req']) && $field['req']):?> class="error"<?php endif;?>>
+ <?php if(isset($field['label'])) { echo $field['label'];}?>
+ </label>
+ <?php switch($field['type']) :
+ case 'text':?>
+ <input
+ <?php if (isset($field['placeholder']) && $field['placeholder']) {echo ' placeholder="'.$field['placeholder'].'"';}?>
+ <?php if (isset($field['error']) && $field['error']){echo 'class="error"';}?>
+ <?php if (isset($field['req']) && $field['req']){echo 'required';}?>
+ <?php if (isset($field['pat']) && $field['pat']):?>
+ pattern="<?php echo $field['pat'];?>"
+ <?php endif;?>
+ name="<?php echo $field['name'];?>"
+ type="text"
+ value="<?php if(isset($field['value'])) {echo $field['value'];}?>" />
+ <?php break;?>
+ <?php case 'tel':?>
+ <input
+ <?php if (isset($field['error']) && $field['error']){echo 'class="error"';}?>
+ <?php if (isset($field['error']) && $field['req']){echo 'required';}?>
+ <?php if (isset($field['pat']) && $field['pat']):?>
+ pattern="<?php echo $field['pat'];?>"
+ <?php endif;?>
+ name="<?php echo $field['name'];?>"
+ type="tel"
+ value="<?php if(isset($field['value'])) { echo $field['value'];}?>" />
+ <?php break;?>
+ <?php case 'email':?>
+ <input
+ <?php if (isset($field['error']) && $field['error']){echo 'class="error"';}?>
+ <?php if (isset($field['req']) && $field['req']){echo 'required';}?>
+ <?php if (isset($field['pat']) && $field['pat']):?>
+ pattern="<?php echo $field['pat'];?>"
+ <?php endif;?>
+ name="<?php echo $field['name'];?>"
+ type="email"
+ value="<?php if (isset($field['value'])) { echo $field['value'];}?>" />
+ <?php break;?>
+ <?php case 'static':?>
+ <?php if(isset($field['value'])) { echo $field['value'];}?>
+ <?php break;?>
+ <?php case 'file':?>
+ <input type="file" name="resume_file">
+ <?php break;?>
+ <?php case 'textarea':?>
+ <textarea
+ <?php if (isset($field['error']) && $field['error']){echo 'class="error"';}?>
+ <?php if (isset($field['req']) && $field['req']){echo 'required';}?>
+ name="<?php echo $field['name'];?>"
+ value="<?php if (isset($field['value'])) { echo $field['value'];}?>"><?php if (isset($field['value'])) { echo $field['value'];}?></textarea>
+ <?php break;?>
+ <?php case 'radio':?>
+ <?php foreach($field['opts'] as $option) :?>
+ <input
+ <?php if (isset($field['error']) && $field['error']){echo 'class="error"';}?>
+ <?php if (isset($field['req']) && $field['req']){ echo 'required';}?>
+ <?php if (isset($field['pat']) && $field['pat']):?>
+ pattern="<?php echo $field['pat'];?>"
+ <?php endif;?>
+ id="<?php echo $option['name'];?>"
+ name="<?php echo $field['name'];?>"
+ type="radio"
+ value="<?php if (isset($option['value'])) { echo $option['value'];}?>"
+ <?php
+ $radioOptionValue = (isset($field['value']))
+ ? filter_var($field['value'], FILTER_VALIDATE_INT)
+ : false;
+ if (isset($field['value']) && $radioOptionValue === $option['value']) {
+ echo 'checked';
+ }?> />
+ <label for="<?php echo $option['name'];?>"><?php echo $option['label'];?></label>
+ <?php endforeach;?>
+ <?php break;?>
+ <?php case 'checkbox':?>
+ <?php foreach($field['opts'] as $option) :?>
+ <input
+ <?php if (isset($field['error']) && $field['error']){echo 'class="error"';}?>
+ <?php if (isset($field['req']) && $field['req']){echo 'required';}?>
+ <?php if (isset($field['pat']) && $field['pat']):?>
+ pattern="<?php echo $field['pat'];?>"
+ <?php endif;?>
+ id="<?php echo $option['name'];?>"
+ name="<?php echo $option['name'];?>"
+ type="checkbox"
+ value="<?php if (isset($field['value'])) { echo $option['value'];}?>"
+ <?php if (isset($option['checked']) && $option['checked']) {
+ echo 'checked';
+ }?> />
+ <label for="<?php echo $option['name'];?>"><?php echo $option['label'];?></label>
+ <?php endforeach;?>
+ <?php break;?>
+ <?php endswitch;?>
+ <?php if (isset($field['error']) && $field['error']):?>
+ <small class="error"><?php echo $field['error'];?></small>
+ <?php endif;?>
+ </div>
+ <?php endforeach;?>
+ </div>
+ <?php endif;?>
+ <?php endforeach;?>
+ <div class="row">
+ <div>
+ <input type="submit" class="button" value="Continue">
+ </div>
+ </div>
+ </form>
+ </div>
+
+</div>
--- /dev/null
+<a href="<?php echo get_permalink();?>">Back To Search</a>
+<div class="small-12 columns">
+ <h2><a href="<?php echo $job->href; ?>"><?php echo $job->post_title; ?></a></h2>
+ <?php if($job->emmet_jobs_status):?>
+ <div><strong>Status: </strong><?php echo $job->emmet_jobs_status; ?></div>
+ <?php endif;?>
+ <?php if($job->emmet_jobs_pay_grade):?>
+ <div><strong>Pay Grade: </strong><?php echo $job->emmet_jobs_pay_grade; ?></div>
+ <?php endif;?>
+
+ <?php if($job->emmet_jobs_shift):?>
+ <div><strong>Shift: </strong><?php echo $job->emmet_jobs_shift; ?></div>
+ <?php endif;?>
+
+ <?php if($job->emmet_jobs_code):?>
+ <div><strong>Job Code: </strong><?php echo $job->emmet_jobs_code; ?></div>
+ <?php endif;?>
+
+ <?php if($job->emmet_jobs_contact):?>
+ <div><strong>Contact: </strong>
+ <?php if ($job->emmet_jobs_email):?>
+ <a href="mailto: <?php echo $job->emmet_jobs_email;?>">
+ <?php endif;?>
+ <?php echo $job->emmet_jobs_contact; ?>
+ <?php if ($job->emmet_jobs_email):?>
+ </a>
+ <?php endif;?>
+ </div>
+ <?php endif;?>
+ <div><?php echo apply_filters('the_content', $job->post_content);?></div>
+ <a href="<?php echo get_template_directory_uri();?>/assets/employment-form.pdf">Employment Application</a>
+</div>
--- /dev/null
+<div>
+ <h1>List Jobs</h1>
+ <div class="row">
+ <?php if ($jobs): foreach($jobs as $job) :?>
+ <div class="small-12 medium-6 columns<?php if ($job->end){ echo ' end';}?>">
+ <h2><a href="<?php echo $job->href;?>"><?php echo $job->post_title;?></a></h2>
+ <div><strong>Status: </strong><?php echo $job->emmet_jobs_status;?></div>
+ <div><a href="<?php echo $job->href;?>">Full Job Description</a></div>
+ </div>
+ <?php endforeach; endif;?>
+ </div>
+</div>
--- /dev/null
+<h2>Employment Search</h2>
+<form name="job_search" id="job_search" action="<?php echo $form_url;?>" method="post">
+ <input type="hidden" name="emmet_job_search" value="1">
+ <div class="row">
+ <?php
+ $catSel = wp_dropdown_categories( $cat_args );
+ $depSel = wp_dropdown_categories( $dep_args );
+ if ($catSel || $depSel) :?>
+ <?php if($catSel):?>
+ <div class="small-12 medium-5 columns">
+ <label>Search by Category</label>
+ <?php echo $catSel;?>
+ </div>
+ <?php endif;?>
+ <?php if($depSel):?>
+ <div class="small-12 medium-5 columns">
+ <label>Search by Department</label>
+ <?php echo $depSel;?>
+ </div>
+ <?php endif;?>
+ <div class="small-12 medium-2 columns">
+ <input class="button" type="submit" value="Search">
+ </div>
+ <?php endif;?>
+ </div>
+</form>
--- /dev/null
+<div class="alert-box success">
+ Thank You For Completing This Application Form And For Your Interest In
+ Preston Feather Building Centers.
+</div>
--- /dev/null
+<div class="wrap">
+
+ <div id="icon-users" class="icon32"><br/></div>
+ <h2>List Jobs</h2>
+
+ <!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->
+ <form id="movies-filter" method="get">
+ <!-- For Plugins, we also need to ensure that the form posts back to our current page -->
+ <input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" />
+ <!-- Now we can render the completed list table -->
+ <?php $jobListTable->display() ?>
+ </form>
+
+</div>