From: Steve Sutton Date: Wed, 2 Dec 2015 19:50:14 +0000 (-0500) Subject: Style updates for records and forms X-Git-Tag: v0.2.0^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=4789d11c31d78d885f0606d00f5ebc0c2af6b3e9;p=WP-Plugins%2Fstaffords-employment.git Style updates for records and forms Did lot's of work on the application form styling. Adding div class panel around sections. I used the header types as the starting point for each section. For the list and detail views I added the properties and categories taxonomies. --- diff --git a/config/settings1.php b/config/settings1.php index 3102a3c..390ccce 100644 --- a/config/settings1.php +++ b/config/settings1.php @@ -103,7 +103,7 @@ $employed_before = [ 'type' => 'radio', 'name' => 'employed_before', 'label' => 'Have you ever worked for Stafford\'s?', - 'grid' => 6, + 'grid' => 12, 'req' => true, 'opts' => [[ 'name' => 'employed_before_yes', @@ -118,7 +118,7 @@ $employed_which_property = [ 'type' => 'text', 'name' => 'employed_which_property', 'label' => 'Which property?', - 'grid' => 6 + 'grid' => 12 ]; $can_you_preform_duties = [ 'type' => 'radio', @@ -328,26 +328,35 @@ $form = [ [$fname, $lname, $mname], [$street, $city, $state, $zip], [$phone, $altPhone, $email], + ['type' => 'header', 'label' => ''], [$over_18, $us_auth], + ['type' => 'header', 'label' => ''], [$employed_before, $employed_which_property], ['type' => 'header', 'label' => 'POSITION YOU ARE APPLYING FOR'], [$position_applied_for, $referred_by], + ['type' => 'header', 'label' => ''], [$location_preference], + ['type' => 'header', 'label' => ''], [$date_available_for_work, $last_date_available_for_work], + ['type' => 'header', 'label' => ''], [$can_you_preform_duties], [$can_you_preform_duties_explain], + ['type' => 'header', 'label' => ''], [$ever_plead_guilty], [$ever_plead_guilty_explain], ['type' => 'header', 'label' => 'EDUCATION RECORD'], [$high_school_name], [$high_school_location, $high_school_grad_date], + ['type' => 'header', 'label' => ''], [$tech_school_name, $tech_school_location], [$tech_school_dates, $tech_school_degree], + ['type' => 'header', 'label' => ''], [$undergraduate_college_name, $undergraduate_college_location], [$undergraduate_college_dates, $undergraduate_college_degree], + ['type' => 'header', 'label' => ''], [$graduate_college_name, $graduate_college_location], [$graduate_college_dates, $graduate_college_degree], diff --git a/config/settings2.php b/config/settings2.php index 6001d6a..18b4481 100644 --- a/config/settings2.php +++ b/config/settings2.php @@ -92,9 +92,22 @@ for ($index = 1; $index <= $numberOfEmployers; ++$index) { 'req' => false ); } - +$resume_file = [ + 'type' => 'file', + 'label' => 'Upload your resume', + 'grid' => 12 +]; +$additional_comments = [ + 'type' => 'textarea', + 'name' => 'additional_comments', + 'label' => 'Additional Comments:', + 'grid' => 12, + 'req' => false +]; $form = [ + ['type' => 'header', 'label' => ''], [$why_do_you_want_to_work_for_staffords], + ['type' => 'header', 'label' => ''], [$emp_1_name, $emp_1_dates], [$emp_1_address], [$emp_1_city, $emp_1_state, $emp_1_zip], @@ -103,6 +116,7 @@ $form = [ [$emp_1_super], [$emp_1_reason], + ['type' => 'header', 'label' => ''], [$emp_2_name, $emp_2_dates], [$emp_2_address], [$emp_2_city, $emp_2_state, $emp_2_zip], @@ -111,6 +125,7 @@ $form = [ [$emp_2_super], [$emp_2_reason], + ['type' => 'header', 'label' => ''], [$emp_3_name, $emp_3_dates], [$emp_3_address], [$emp_3_city, $emp_3_state, $emp_3_zip], @@ -118,6 +133,8 @@ $form = [ [$emp_3_duties], [$emp_3_super], [$emp_3_reason], - + ['type' => 'header', 'label' => ''], + [$resume_file], + ['type' => 'header', 'label' => ''], + [$additional_comments] ]; - diff --git a/controllers/front.php b/controllers/front.php index 5a4c33a..a830fb6 100644 --- a/controllers/front.php +++ b/controllers/front.php @@ -105,7 +105,6 @@ class staffords_employment_front * * @return type */ - public function load_form_settings($form_part = '') { include $this->settingDir . "/settings{$form_part}.php"; @@ -125,6 +124,7 @@ class staffords_employment_front $formAction = ''; switch ($formPart) { case 1: + $endOfForms = true; case 2: if ($this->formSubmitted) { $this->appId = $appId = (isset($_REQUEST['appId'])) ? filter_var($_REQUEST['appId'], FILTER_VALIDATE_INT): null; @@ -154,7 +154,6 @@ class staffords_employment_front } break; default: - echo '

Part default

'; unset($_SESSION['glmJobsApplication'], $_SESSION['glmJobsAppForm']); if ($jobId = filter_var($_REQUEST['job'], FILTER_VALIDATE_INT)) { $jobData = get_post($jobId); @@ -427,6 +426,14 @@ class staffords_employment_front global $wpdb, $wp; $job = get_post($job_id); $custom = get_post_custom($job->ID); + $depTax = wp_get_post_terms( $job->ID, STAFFORDS_EMP_TAX_DEPARTMENTS, 'name' ); + foreach ($depTax as $depTerm) { + $deps[] = $depTerm->name; + } + $catTax = wp_get_post_terms( $job->ID, STAFFORDS_EMP_TAX_CATEGORIES, 'name' ); + foreach ($catTax as $catTerm) { + $cats[] = $catTerm->name; + } $job->staffords_jobs_startdate = $custom['staffords_jobs_startdate'][0]; $job->staffords_jobs_enddate = $custom['staffords_jobs_enddate'][0]; $job->staffords_jobs_contact = $custom['staffords_jobs_contact'][0]; @@ -436,6 +443,8 @@ class staffords_employment_front $job->staffords_jobs_email = $custom['staffords_jobs_email'][0]; $job->staffords_jobs_comments = $custom['staffords_jobs_comments'][0]; $job->staffords_jobs_code = $custom['staffords_jobs_code'][0]; + $job->staffords_jobs_property = $deps; + $job->staffords_jobs_category = $cats; $current_url = esc_url(add_query_arg($wp->query_string, '', home_url($wp->request))); $applyOnlineHref = $current_url . ((strpos($current_url, '?')) ? '&' : '?') @@ -503,7 +512,15 @@ class staffords_employment_front $iterator = 1; foreach ($jobs as $job) { $custom = get_post_custom($job->ID); - $job->end = false; + $depTax = wp_get_post_terms( $job->ID, STAFFORDS_EMP_TAX_DEPARTMENTS, 'name' ); + foreach ($depTax as $depTerm) { + $deps[] = $depTerm->name; + } + $catTax = wp_get_post_terms( $job->ID, STAFFORDS_EMP_TAX_CATEGORIES, 'name' ); + foreach ($catTax as $catTerm) { + $cats[] = $catTerm->name; + } + $job->end = false; $job->staffords_jobs_startdate = $custom['staffords_jobs_startdate'][0]; $job->staffords_jobs_enddate = $custom['staffords_jobs_enddate'][0]; $job->staffords_jobs_contact = $custom['staffords_jobs_contact'][0]; @@ -513,6 +530,8 @@ class staffords_employment_front $job->staffords_jobs_email = $custom['staffords_jobs_email'][0]; $job->staffords_jobs_comments = $custom['staffords_jobs_comments'][0]; $job->staffords_jobs_code = $custom['staffords_jobs_code'][0]; + $job->staffords_jobs_property = $deps; + $job->staffords_jobs_category = $cats; $job->href = $current_url . ((strpos($current_url, '?')) ? '&' : '?') . "job=" . $job->ID; diff --git a/views/front/formTemplate.php b/views/front/formTemplate.php index cd7fe1d..714b90f 100644 --- a/views/front/formTemplate.php +++ b/views/front/formTemplate.php @@ -28,9 +28,15 @@ - + + + -

+ + + +

+

@@ -143,10 +149,17 @@
- + + + +
-
+
+ + + +
diff --git a/views/front/jobDetail.php b/views/front/jobDetail.php index 571fb15..87ff3a2 100644 --- a/views/front/jobDetail.php +++ b/views/front/jobDetail.php @@ -1,6 +1,18 @@ Back To Search

post_title; ?>

+ staffords_jobs_property) : ?> +
+ staffords_jobs_property ) > 1 ) ? 'Properties:' : 'Property:' ?> + staffords_jobs_property);?> +
+ + staffords_jobs_category) : ?> +
+ staffords_jobs_category ) > 1 ) ? 'Categories:' : 'Category:' ?> + staffords_jobs_category);?> +
+ staffords_jobs_status):?>
Status: staffords_jobs_status; ?>
diff --git a/views/front/jobList.php b/views/front/jobList.php index cd9f7e4..2ff3194 100644 --- a/views/front/jobList.php +++ b/views/front/jobList.php @@ -1,13 +1,20 @@
-
-
+

post_title;?>

- staffords_jobs_status ) :?> -
Status: staffords_jobs_status;?>
- - + staffords_jobs_property) : ?> +
+ staffords_jobs_property ) > 1 ) ? 'Properties:' : 'Property:' ?> + staffords_jobs_property);?> +
+ + staffords_jobs_category) : ?> +
+ staffords_jobs_category ) > 1 ) ? 'Categories:' : 'Category:' ?> + staffords_jobs_category);?> +
+