From a5ad7566bada97667fb291fd1abc1caa24906f84 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 17 Jul 2017 15:09:51 -0400 Subject: [PATCH] adding shortcodes , models, actions and views for registrationSummary and accountSummary created the model files, view files, shortcodes and actions to hook up the registrationSummary and accountSummary parts of the front end. Tested that the files are hooked up properly by echoing a string --- .../registrationAccountSummary.php | 59 +++++++++++++++++++ .../registrations/registrationSummary.php | 58 ++++++++++++++++++ setup/shortcodes.php | 20 +++++++ setup/validActions.php | 6 +- .../registrationAccountSummary.html | 0 .../registrations/registrationSummary.html | 0 6 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 models/front/registrations/registrationAccountSummary.php create mode 100644 models/front/registrations/registrationSummary.php create mode 100644 views/front/registrations/registrationAccountSummary.html create mode 100644 views/front/registrations/registrationSummary.html diff --git a/models/front/registrations/registrationAccountSummary.php b/models/front/registrations/registrationAccountSummary.php new file mode 100644 index 0000000..bfaef29 --- /dev/null +++ b/models/front/registrations/registrationAccountSummary.php @@ -0,0 +1,59 @@ +accountID = ($_REQUEST['account'] - 0); + + if ($this->accountID <= 0) { + $this->accountID = false; + } + + } + + $view = 'registrationAccountSummary'; + + switch ( $option ) { + + } + + // Compile template data + $templateData = array( + + ); + // Return status, any suggested view, and any data to controller + return array( + 'status' => true, + 'modelRedirect' => false, + 'view' => 'front/registrations/' . $view . '.html', + 'data' => $templateData + ); + + } + } diff --git a/models/front/registrations/registrationSummary.php b/models/front/registrations/registrationSummary.php new file mode 100644 index 0000000..5b9a0dd --- /dev/null +++ b/models/front/registrations/registrationSummary.php @@ -0,0 +1,58 @@ +accountID = ($_REQUEST['account'] - 0); + + if ($this->accountID <= 0) { + $this->accountID = false; + } + } + + $view = 'registrationSummary'; + + switch ( $option ) { + + } + + // Compile template data + $templateData = array( + + ); + // Return status, any suggested view, and any data to controller + return array( + 'status' => true, + 'modelRedirect' => false, + 'view' => 'front/registrations/' . $view . '.html', + 'data' => $templateData + ); + + } + } diff --git a/setup/shortcodes.php b/setup/shortcodes.php index 69d2b5d..99300e7 100644 --- a/setup/shortcodes.php +++ b/setup/shortcodes.php @@ -87,6 +87,26 @@ */ $glmMembersRegistrationsShortcodes = array( + 'glm-registration-summary' => array( + 'plugin' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG, + 'menu' => 'registrations', + 'action' => 'registrationSummary', + 'table' => false, + 'attributes' => array( + 'id' => false, + 'member_only' => false, + ) + ), + 'glm-registration-account-summary' => array( + 'plugin' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG, + 'menu' => 'registrations', + 'action' => 'registrationAccountSummary', + 'table' => false, + 'attributes' => array( + 'id' => false, + 'member_only' => false, + ) + ), ); $glmMembersRegistrationsShortcodesDescription = ''; diff --git a/setup/validActions.php b/setup/validActions.php index 6913195..3bf8364 100644 --- a/setup/validActions.php +++ b/setup/validActions.php @@ -76,7 +76,11 @@ $glmMembersRegistrationsAddOnValidActions = array( ), ), 'frontActions' => array( - ) + 'registrations' => array( + 'registrationSummary' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG, + 'registrationAccountSummary' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG, + ) + ), ); ?> diff --git a/views/front/registrations/registrationAccountSummary.html b/views/front/registrations/registrationAccountSummary.html new file mode 100644 index 0000000..e69de29 diff --git a/views/front/registrations/registrationSummary.html b/views/front/registrations/registrationSummary.html new file mode 100644 index 0000000..e69de29 -- 2.17.1