From: Steve Sutton Date: Thu, 3 Dec 2015 14:34:34 +0000 (-0500) Subject: Update style for apply form and add references section. X-Git-Tag: v0.2.5^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=4367bc7387828f732d9ced51649e82f828816721;p=WP-Plugins%2Fstaffords-employment.git Update style for apply form and add references section. --- diff --git a/config/settings2.php b/config/settings2.php index 18b4481..5e63e6a 100644 --- a/config/settings2.php +++ b/config/settings2.php @@ -104,6 +104,66 @@ $additional_comments = [ '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, + 'hdr' => $nameHdr + ]; + ${'address'.$i} = [ + 'type' => 'text', + 'name' => 'address' . $i, + 'label' => '', + 'grid' => 3, + 'req' => $referenceReq, + 'hdr' => $addressHdr + ]; + ${'relationship'.$i} = [ + 'type' => 'text', + 'name' => 'relationship' . $i, + 'label' => '', + 'grid' => 3, + 'req' => $referenceReq, + 'hdr' => $relationshipHdr + ]; + ${'year'.$i} = [ + 'type' => 'text', + 'name' => 'years' . $i, + 'label' => '', + 'grid' => 3, + 'req' => $referenceReq, + 'hdr' => $yearHdr + ]; +} $form = [ ['type' => 'header', 'label' => ''], [$why_do_you_want_to_work_for_staffords], @@ -134,6 +194,18 @@ $form = [ [$emp_3_super], [$emp_3_reason], ['type' => 'header', 'label' => ''], + + ['type' => 'header', 'label' => 'References'], + [$nameHdr, $addressHdr, $relationshipHdr, $yearHdr], + [$name1, $address1, $relationship1, $year1], + ['type' => 'header', 'label' => ''], + [$nameHdr, $addressHdr, $relationshipHdr, $yearHdr], + [$name2, $address2, $relationship2, $year2], + ['type' => 'header', 'label' => ''], + [$nameHdr, $addressHdr, $relationshipHdr, $yearHdr], + [$name3, $address3, $relationship3, $year3], + + ['type' => 'header', 'label' => 'Resume Upload'], [$resume_file], ['type' => 'header', 'label' => ''], [$additional_comments] diff --git a/views/front/formTemplate.php b/views/front/formTemplate.php index 714b90f..e776d05 100644 --- a/views/front/formTemplate.php +++ b/views/front/formTemplate.php @@ -1,22 +1,11 @@ -
+

@@ -48,7 +37,16 @@
class="error"> - + ' . $field['label'] . ''; + } else { + echo $field['label']; + } + if ( $field['label'] == '' && $field ['hdr'] ) { + echo '' . $field['hdr']['label'] . ''; + } + }?>