Field updates
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 18 Dec 2014 18:07:16 +0000 (13:07 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 18 Dec 2014 18:07:16 +0000 (13:07 -0500)
need to output the static value instead of label

config/settings2.php
config/settings5.php
config/settings6.php
config/settings7.php
glm-employment.php
views/front/formTemplate.php

index 799b538..e2c76dd 100644 (file)
@@ -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' => '<div class="static">'.$titles[$i].'</div>',
         '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
     ];
index 3c63742..e0d5ffd 100644 (file)
@@ -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',
index 984ae10..af5875c 100644 (file)
@@ -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',
index 34f11c9..3b280ba 100644 (file)
@@ -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 = [
index 56f88a0..d9d86df 100644 (file)
@@ -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');
 }
index f383fc9..80452a4 100644 (file)
@@ -11,6 +11,9 @@
         margin-right: auto;
         padding-left: 20px;
     }
+    input[type="checkbox"] {
+        margin-top: 10px;
+    }
 </style>
 <div class="row">
     <div class="small-12 columns">
@@ -76,7 +79,7 @@
                                 value="<?php if (isset($field['value'])) { echo $field['value'];}?>" />
                             <?php break;?>
                             <?php case 'static':?>
-                                <?php if(isset($field['label'])) { echo $field['label'];}?>
+                                <?php if(isset($field['value'])) { echo $field['value'];}?>
                             <?php break;?>
                             <?php case 'file':?>
                                 <input type="file" name="resume_file">