From 12eaea5247413721c06da3f9a7cb7bbd6b57709c Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 18 Dec 2014 13:07:16 -0500 Subject: [PATCH] Field updates need to output the static value instead of label --- config/settings2.php | 22 +++++++++++----------- config/settings5.php | 2 +- config/settings6.php | 2 +- config/settings7.php | 12 ++++++------ glm-employment.php | 5 ++++- views/front/formTemplate.php | 5 ++++- 6 files changed, 27 insertions(+), 21 deletions(-) diff --git a/config/settings2.php b/config/settings2.php index 799b538..e2c76dd 100644 --- a/config/settings2.php +++ b/config/settings2.php @@ -47,35 +47,35 @@ for ($i = 1; $i <= 4; ++$i) { ${'state'.$i} = [ 'type' => 'text', 'name' => 'state' . $i, - 'label' => '', //'State', + 'label' => '', 'grid' => 1, 'req' => $licenseReq ]; ${'license'.$i} = [ 'type' => 'text', 'name' => 'license' . $i, - 'label' => '', //'License No.', + 'label' => '', 'grid' => 4, 'req' => $licenseReq ]; ${'class'.$i} = [ 'type' => 'text', 'name' => 'class' . $i, - 'label' => '', //'Class', + 'label' => '', 'grid' => 1, 'req' => $licenseReq ]; ${'endorsement'.$i} = [ 'type' => 'text', 'name' => 'endorsement' . $i, - 'label' => '', //'Endorsement(s)', + 'label' => '', 'grid' => 4, 'req' => $licenseReq ]; ${'exp_date'.$i} = [ 'type' => 'text', 'name' => 'exp_date' . $i, - 'label' => '', //'Expiration Date', + 'label' => '', 'grid' => 2, 'req' => $licenseReq ]; @@ -115,7 +115,7 @@ $disqualified_license = [ 'type' => 'radio', 'name' => 'disqualified_license', 'label' => 'C. Have you ever been disqualified for violations of the Federal' - . 'Motor Carrier Safety Regulations?', + . ' Motor Carrier Safety Regulations?', 'grid' => 4, 'req' => true, 'opts' => [[ @@ -172,35 +172,35 @@ $eq_approx_milesHdr = [ for ($i = 1; $i <= 4; ++$i) { ${'eq_class'.$i} = [ 'type' => 'static', - 'label' => '', //'Class of Equipment', + 'label' => '', 'value' => '
'.$titles[$i].'
', 'grid' => 3 ]; ${'eq_type'.$i} = [ 'type' => 'text', 'name' => 'eq_type' . $i, - 'label' => '', //'Type of Equipment (Van, Tank, Flat, etc.)', + 'label' => '', 'grid' => 4, 'req' => false ]; ${'eq_dates_from'.$i} = [ 'type' => 'text', 'name' => 'eq_dates_from' . $i, - 'label' => '', //'From', + 'label' => '', 'grid' => 1, 'req' => false ]; ${'eq_dates_to'.$i} = [ 'type' => 'text', 'name' => 'eq_dates_to' . $i, - 'label' => '', //'To', + 'label' => '', 'grid' => 1, 'req' => false ]; ${'eq_approx_miles'.$i} = [ 'type' => 'text', 'name' => 'eq_approx_miles' . $i, - 'label' => '', //'Approximate total Miles', + 'label' => '', 'grid' => 3, 'req' => false ]; diff --git a/config/settings5.php b/config/settings5.php index 3c63742..e0d5ffd 100644 --- a/config/settings5.php +++ b/config/settings5.php @@ -49,7 +49,7 @@ $name_of_applicant = [ 'name' => 'name_of_applicant', 'label' => 'Name of Applicant', 'grid' => 6, - 'req' => false + 'req' => true ]; $agree_form_waiver = [ 'type' => 'checkbox', diff --git a/config/settings6.php b/config/settings6.php index 984ae10..af5875c 100644 --- a/config/settings6.php +++ b/config/settings6.php @@ -28,7 +28,7 @@ $name_of_applicant = [ 'name' => 'name_of_applicant', 'label' => 'Name of Applicant', 'grid' => 6, - 'req' => false + 'req' => true ]; $agree_form_waiver = [ 'type' => 'checkbox', diff --git a/config/settings7.php b/config/settings7.php index 34f11c9..3b280ba 100644 --- a/config/settings7.php +++ b/config/settings7.php @@ -101,42 +101,42 @@ $app_name = [ 'name' => 'app_name', 'label' => 'Applicants Name', 'grid' => 6, - 'req' => false + 'req' => true ]; $app_address = [ 'type' => 'text', 'name' => 'app_address', 'label' => 'Address', 'grid' => 6, - 'req' => false + 'req' => true ]; $app_city = [ 'type' => 'text', 'name' => 'app_city', 'label' => 'City', 'grid' => 4, - 'req' => false + 'req' => true ]; $app_state = [ 'type' => 'text', 'name' => 'app_state', 'label' => 'State', 'grid' => 4, - 'req' => false + 'req' => true ]; $app_zip = [ 'type' => 'text', 'name' => 'app_zip', 'label' => 'Zip', 'grid' => 4, - 'req' => false + 'req' => true ]; $app_social = [ 'type' => 'text', 'name' => 'app_social', 'label' => 'Social Security Number', 'grid' => 6, - 'req' => false + 'req' => true ]; $agree_form_waiver2 = [ diff --git a/glm-employment.php b/glm-employment.php index 56f88a0..d9d86df 100644 --- a/glm-employment.php +++ b/glm-employment.php @@ -82,6 +82,9 @@ function glm_load_edit_style() if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'view') { add_action('admin_enqueue_scripts', 'glm_load_view_style'); } -if (isset($_REQUEST['post_type']) && $_REQUEST['post_type'] == GLM_EMP_POST_TYPE) { +if ( isset($_REQUEST['post_type']) + && $_REQUEST['post_type'] == GLM_EMP_POST_TYPE + && !isset($_REQUEST['page']) +) { add_action('admin_enqueue_scripts', 'glm_load_edit_style'); } diff --git a/views/front/formTemplate.php b/views/front/formTemplate.php index f383fc9..80452a4 100644 --- a/views/front/formTemplate.php +++ b/views/front/formTemplate.php @@ -11,6 +11,9 @@ margin-right: auto; padding-left: 20px; } + input[type="checkbox"] { + margin-top: 10px; + }
@@ -76,7 +79,7 @@ value="" /> - + -- 2.17.1