From 758b32fd6a0e63e2633f4f3526235dd9a4bedfd1 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 26 Jul 2017 15:11:33 -0400 Subject: [PATCH] Working more on the view file for the select shortcode. Setting up array in model to pass to the view file for the output. --- css/front.css | 76 ++++++++++++ .../registrations/registrationSelect.php | 51 +++++++- .../registrations/registrationSelect.html | 117 ++---------------- 3 files changed, 136 insertions(+), 108 deletions(-) create mode 100644 css/front.css diff --git a/css/front.css b/css/front.css new file mode 100644 index 0000000..d2fc016 --- /dev/null +++ b/css/front.css @@ -0,0 +1,76 @@ +.glm-reg-event-list { + width: 100%; + padding: 0; +} +.glm-reg-event-item { + border: 1px solid black; + padding: 10px; + margin: 1.2rem 1rem; + position: relative; +} +.glm-reg-event-item h2 { + font-size: 1.5rem; + font-weight: bold; + text-decoration: none; + padding: .4rem; + width: 80%; +} +.glm-reg-dates { + width: 48%; + float: right; +} +.glm-reg-dates input { + width: 8rem; + float: left; + margin: 0 1rem; +} +.glm-reg-level { + width: 48%; + float: left; + clear: left; +} +.glm-reg-level h3 { + font-size: 1rem; + font-weight: bold; + background-color: #729d8d; + color: white; + text-decoration: none; + padding: .3rem; +} +.glm-reg-entryforms { + width: 100%; + clear: both; + position: relative; +} +.glm-reg-level-add-registrant { + float: right; + font-size: 1.5rem; +} +.glm-reg-level-registrant { + width: 90%; + font-size: 1rem; + padding: .4rem; + margin: .4rem; + background-color: lightgrey; +} +.glm-reg-level-registrant span { + text-decoration: underline; + padding: .3rem 1rem .3rem .2rem; +} +.glm-reg-compcode-entry { + width: 11rem; + position: absolute; + top: .8rem; + right: .5rem; +} +.glm-reg-submit { + padding: 1rem; + position: absolute; + bottom: .3rem; + right: .5rem; +} +.glm-reg-level-registrant-name { +} +.glm-reg-level-registrant-email { +} + diff --git a/models/front/registrations/registrationSelect.php b/models/front/registrations/registrationSelect.php index 902a5b3..346ba4b 100644 --- a/models/front/registrations/registrationSelect.php +++ b/models/front/registrations/registrationSelect.php @@ -44,6 +44,7 @@ public function modelAction($actionData = false) { + $events = array(); // Get any provided option if (isset($_REQUEST['option'])) { @@ -67,9 +68,57 @@ } + $events = array( + 1 => array( + 'id' => 1, + 'title' => 'PHP Payment Gateways', + 'short_desc' => 'Setting up your developer account and testing payment gateways', + 'levels' => array( + 3 => array( + 'id' => 3, + 'title' => 'General Admittance', + 'registrants' => array( + 1 => array( + 'id' => 1, + 'fname' => 'Dan', + 'lname' => 'Smith', + 'email' => 'dan@smith.com', + ), + 3 => array( + 'id' => 3, + 'fname' => 'Tony', + 'lname' => 'Johnson', + 'email' => 'tj@website.com', + ), + ), + ), + ), + ), + 2 => array( + 'id' => 2, + 'title' => 'Mailchimp Newsletters', + 'short_desc' => 'Learning how to setup test and use mailchimp to the fullest.', + 'levels' => array( + 4 => array( + 'id' => 4, + 'title' => 'General Admittance', + 'registrants' => array( + 2 => array( + 'id' => 2, + 'fname' => 'John', + 'lname' => 'Handler', + 'email' => 'johny@handler.com', + ), + ), + ), + ), + ) + ); + //echo '
$events: ' . print_r( $events, true ) . '
'; + // Compile template data $templateData = array( - + 'events' => $events, ); // Return status, any suggested view, and any data to controller return array( diff --git a/views/front/registrations/registrationSelect.html b/views/front/registrations/registrationSelect.html index ebbd731..1f1f640 100644 --- a/views/front/registrations/registrationSelect.html +++ b/views/front/registrations/registrationSelect.html @@ -1,128 +1,31 @@ -
+ {foreach $events as $event}
-

Event Title

+

{$event.title}

-

Event Short Description text. This is from the event intro or maybe even part of the event description.

+

{$event.short_desc}

Pick your registration dates

+ {foreach $event.levels as $level}
-

V.I.P. Membership

+

{$level.title}

+ -
Jodie Bissonette jodie@gaslightmedia.com
-
-
-

Attendees

- + -
Steve Sutton steve@gaslightmedia.com
+ {foreach $level.registrants as $reg} +
{$reg.fname} {$reg.lname} {$reg.email}
+ {/foreach}
+ {/foreach}
+ {/foreach} -
-

Event Title 2

-
- -
-

Event Short Description text. This is from the event intro or maybe even part of the event description.

-
-
-

Attendees

- + -
Jodie Bissonette jodie@gaslightmedia.com
-
Steve Sutton steve@gaslightmedia.com
-
-
- -
-
-
-- 2.17.1