Removed references to admin debug code.
authorChuck Scott <cscott@gaslightmedia.com>
Wed, 6 Sep 2017 19:14:20 +0000 (15:14 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Wed, 6 Sep 2017 19:14:20 +0000 (15:14 -0400)
Added more functionality in registrations admin for account, requests, and events.

24 files changed:
classes/data/dataRegRequest.php
config/plugin.ini
models/admin/management/registrations.php
models/admin/management/regterms.php
models/admin/registrations/accounts.php
models/admin/registrations/index-SAVE.php [new file with mode: 0644]
models/admin/registrations/index.php
models/admin/registrations/list.php [deleted file]
models/admin/registrations/requests.php
models/admin/settings/registrationsMisc.php
models/admin/settings/registrationsPaymentCode.php
setup/adminMenus.php
setup/validActions.php
views/admin/registrations/accountDashboard.html
views/admin/registrations/accountHeader.html
views/admin/registrations/accountsDashboard.html
views/admin/registrations/event.html
views/admin/registrations/index.html
views/admin/registrations/list-save.html [deleted file]
views/admin/registrations/list.html [deleted file]
views/admin/registrations/requestDashboard.html [new file with mode: 0644]
views/admin/registrations/requestHeader.html [new file with mode: 0644]
views/admin/registrations/requests.html [deleted file]
views/admin/registrations/requestsDashboard.html [new file with mode: 0644]

index caed6e2..c459b2c 100644 (file)
@@ -124,6 +124,30 @@ class GlmDataRegistrationsRequest extends GlmDataAbstract
                 'use'       => 'lgneud'
             ),
 
+            // Account First Name
+            'account_fname' => array (
+                'field' => 'account',
+                'as' => 'account_fname',
+                'type' => 'pointer',
+                    'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX.'account',
+                    'p_field' => 'fname',
+                    'p_static' => true,
+                'required' => true,
+                'use' => 'gle'
+            ),
+            
+            // Account Last Name
+            'account_lname' => array (
+                'field' => 'account',
+                'as' => 'account_lname',
+                'type' => 'pointer',
+                    'p_table' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX.'account',
+                    'p_field' => 'lname',
+                    'p_static' => true,
+                'required' => true,
+                'use' => 'gle'
+            ),
+            
             // Flag that indicates if request passed last validation with checkRegistrationRequest()
             'validated' => array (
                 'field'     => 'validated',
@@ -219,7 +243,7 @@ class GlmDataRegistrationsRequest extends GlmDataAbstract
                 'field'     => 'pay_method',
                 'type'      => 'list',
                     'list'      => $this->config['payment_method'],
-                'default'   => $this->config['payment_method_numb']['Not Yet Defined'],
+                'default'   => $this->config['payment_method_numb']['Undefined'],
                 'use'       => 'a'
             ),
 
index f8cc7f3..7771061 100644 (file)
@@ -36,6 +36,7 @@ payment_method[3]                               = 'Cash'
 payment_method[4]                               = 'Check'
 payment_method[5]                               = 'Credit Card'
 payment_method[6]                               = 'Call from Merchant' 
+payment_method[99]                              = 'Undefined' 
 
 payment_method_numb['No Charge']                = 1
 payment_method_numb['Comp Code']                = 2
@@ -43,6 +44,7 @@ payment_method_numb['Cash']                     = 3
 payment_method_numb['Check']                    = 4
 payment_method_numb['Credit Card']              = 5
 payment_method_numb['Call from Merchant']       = 6
+payment_method_numb['Undefined']                = 99
 
 ;
 ; Payment Code Types - List only
index 81d64df..69a39d5 100644 (file)
@@ -146,11 +146,6 @@ class GlmMembersAdmin_management_registrations extends GlmDataRegistrationsManag
                 // Check if we were successful
                 if ($regSettings['status']) {
 
-
-                    if ( GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE ) {
-                        glmMembersAdmin::addNotice( $misc, 'DataBlock', 'Misc Registrations Settings' );
-                    }
-
                     $settingsUpdated = true;
                     $regSettings = $this->editEntry( $id );
 
@@ -174,10 +169,8 @@ class GlmMembersAdmin_management_registrations extends GlmDataRegistrationsManag
 
                     $errorMsg = "Unable to load the Registrations management settings";
 
-                    if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
-                        glmMembersAdmin::addNotice("<b>/models/admin/settings/terms.php:</b> $errorMsg", 'Alert');
-                    }
-
+                    trigger_error($errorMsg, E_USER_NOTICE);
+                    
                     return array(
                         'status' => false,
                         'menuItemRedirect' => 'error',
index db98478..446a76e 100644 (file)
@@ -155,10 +155,8 @@ class GlmMembersAdmin_management_regterms extends GlmDataRegistrationsSettingsTe
                 // Check that we actually have the terms
                 if ($termsSettings === false) {
 
-                    if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
-                        glmMembersAdmin::addNotice("<b>/models/admin/settings/terms.php:</b> Unable to load Terms Settings.", 'Alert');
-                    }
-
+                    trigger_error("Unable to load Terms Settings: /models/admin/settings/terms.php", E_USER_NOTICE);
+                    
                     return array(
                         'status' => false,
                         'menuItemRedirect' => 'error',
index 612779a..d7f4cc0 100644 (file)
@@ -112,8 +112,8 @@ class GlmMembersAdmin_registrations_accounts extends GlmDataRegistrationsAccount
         $namesList          = false;
         $numbDisplayed      = false;
         $lastDisplayed      = false;
-        $registrations      = false;
-        $haveRegistrations  = false;
+        $requests           = false;
+        $haveRequests       = false;
         $registered         = false;
         $haveRegistered     = false;
         
@@ -123,10 +123,10 @@ class GlmMembersAdmin_registrations_accounts extends GlmDataRegistrationsAccount
         }
 
         // Get account ID if supplied
-        if (isset($_REQUEST['account'])) {
+        if (isset($_REQUEST['accountID'])) {
 
             // Make sure it's numeric
-            $accountID = ($_REQUEST['account'] - 0);
+            $accountID = ($_REQUEST['accountID'] - 0);
 
         } else {
             
@@ -204,9 +204,9 @@ class GlmMembersAdmin_registrations_accounts extends GlmDataRegistrationsAccount
                 $haveAccount = true;
                 
                 // Get any registrations submitted
-                $registrations = $RegRequest->getList("T.account = $accountID");
-                if (is_array($registrations) && count($registrations) > 0) {
-                    $haveRegistrations = true;
+                $requests = $RegRequest->getList("T.account = $accountID");
+                if (is_array($requests) && count($requests) > 0) {
+                    $haveRequests = true;
                 }
                 
                 // Get any events registered
@@ -327,8 +327,8 @@ class GlmMembersAdmin_registrations_accounts extends GlmDataRegistrationsAccount
             'namesList'          => $namesList,
             'numbDisplayed'      => $numbDisplayed,
             'lastDisplayed'      => $lastDisplayed,
-            'registrations'      => $registrations,
-            'haveRegistrations'  => $haveRegistrations,
+            'requests'           => $requests,
+            'haveRequests'       => $haveRequests,
             'registered'         => $registered,
             'haveRegistered'     => $haveRegistered,
             'reason'             => $reason
diff --git a/models/admin/registrations/index-SAVE.php b/models/admin/registrations/index-SAVE.php
new file mode 100644 (file)
index 0000000..0e2fa5f
--- /dev/null
@@ -0,0 +1,105 @@
+<?php
+/**
+ * Gaslight Media Members Database
+ * Admin Registrations Dashboard
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package  glmMembersDatabase
+ * @author   Chuck Scott <cscott@gaslightmedia.com>
+ * @license  http://www.gaslightmedia.com Gaslightmedia
+ * @release  index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link     http://dev.gaslightmedia.com/
+ */
+
+// Load Registrations data abstract
+// require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegistrations.php';
+
+class GlmMembersAdmin_registrations_index // extends GlmDataRegistrations
+{
+
+    /**
+     * WordPress Database Object
+     *
+     * @var $wpdb
+     * @access public
+     */
+    public $wpdb;
+    /**
+     * Plugin Configuration Data
+     *
+     * @var $config
+     * @access public
+     */
+    public $config;
+    /**
+     * Registrations Event ID
+     *
+     * @var $eventID
+     * @access public
+     */
+    public $regEventID = false;
+
+    /**
+     * Constructor
+     *
+     * This contructor performs the work for this model. This model returns
+     * an array containing the following.
+     *
+     * 'status'
+     *
+     * True if successfull and false if there was a fatal failure.
+     *
+     * 'view'
+     *
+     * A suggested view name that the contoller should use instead of the
+     * default view for this model or false to indicate that the default view
+     * should be used.
+     *
+     * 'data'
+     *
+     * Data that the model is returning for use in merging with the view to
+     * produce output.
+     *
+     * @wpdb object WordPress database object
+     *
+     * @return array Array containing status, suggested view, and any data
+     */
+    public function __construct ($wpdb, $config)
+    {
+
+        // Save WordPress Database object
+        $this->wpdb = $wpdb;
+
+        // Save plugin configuration object
+        $this->config = $config;
+
+        /*
+         * Run constructor for the REgistrations data class
+         *
+         * Note, the third parameter is a flag that indicates to the Contacts
+         * data class that it should flag a group of fields as 'view_only'.
+         */
+//        parent::__construct(false, false, true);
+
+    }
+
+    public function modelAction($actionData = false)
+    {
+
+        // Compile template data
+        $templateData = array(
+        );
+             // Return status, any suggested view, and any data to controller
+        return array(
+            'status'        => true,
+            'modelRedirect' => false,
+            'view'          => 'admin/registrations/index.html',
+            'data'          => $templateData
+        );
+
+    }
+
+
+}
index 0e2fa5f..9c43253 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Gaslight Media Members Database
- * Admin Registrations Dashboard
+ * Admin Registrations Events Dashboard
  *
  * PHP version 5.5
  *
@@ -14,9 +14,9 @@
  */
 
 // Load Registrations data abstract
-// require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegistrations.php';
+require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegEvent.php';
 
-class GlmMembersAdmin_registrations_index // extends GlmDataRegistrations
+class GlmMembersAdmin_registrations_index extends GlmDataRegistrationsRegEvent
 {
 
     /**
@@ -81,21 +81,295 @@ class GlmMembersAdmin_registrations_index // extends GlmDataRegistrations
          * Note, the third parameter is a flag that indicates to the Contacts
          * data class that it should flag a group of fields as 'view_only'.
          */
-//        parent::__construct(false, false, true);
+        parent::__construct(false, false, true);
 
     }
 
     public function modelAction($actionData = false)
-    {
+    {  
+        
+        $where              = ' true ';
+        $alphaWhere         = ' true ';
+        $numbDisplayed      = false;
+        $lastDisplayed      = false;
+        $paging             = true;
+        $prevStart          = false;
+        $nextStart          = false;
+        $start              = 1;
+        $limit              = 20;        // Set to the number of listings per page
+        $textSearch         = false;
+        $where              = "TRUE";
+        $alphaList          = false;
+        $alphaWhere         = '';
+        $alphaSelected      = false;
+        $haveRegEvents      = false;
+        $regEventsCount     = false;
+        $namesList          = false;
+        
+        // If doing alpha list
+        if (isset($_REQUEST['alpha'])) {
+            $actionData['request']['alpha'] = $_REQUEST['alpha'];
+        }
+                
+        // If user clicked a page request then we need to check the savedAlpha value
+        if (isset($_REQUEST['savedAlpha']) && isset($_REQUEST['pageSelect'])) {
+            $actionData['request']['alpha'] = $_REQUEST['savedAlpha'];
+        }
+        
+        if ($actionData['request']['alpha'] && strlen($actionData['request']['alpha']) == 1) {
+            $alphaSelected = strtoupper($actionData['request']['alpha']);
+            $alphaWhere .= " AND T.event_name LIKE '$alphaSelected%'";
+        }
+
+        // Get full list for all other filters, but not filtered by alpha (that would be silly)
+        $alphaList = $this->getAlphaList(' AND '.$where, $alphaSelected);
+        
+        // Get count of reg event listed
+        $regEventsCount = $this->getStats($where);
+        
+        // Get stats for number of registration events found matching current selection criteria (includes alpha selection)
+        $filteredRegEventsFound = $this->getStats(str_replace('T.', '', $where.$alphaWhere));
+        
+        // Get a current list of reg events
+        $listResult = $this->getSimpleRegEventsList($where.$alphaWhere, 'event_name', true, 'id', $start, $limit, true);
 
+        // Get paging results
+        $numbDisplayed = $listResult['returned'];
+        $lastDisplayed = $listResult['last'];
+        if ($start == 1) {
+            $prevStart = false;
+        } else {
+            $prevStart = $start - $limit;
+            if ($start < 1) {
+                $start = 1;
+            }
+        }
+        if ($listResult['returned'] == $limit) {
+            $nextStart = $start + $limit;
+        }
+        
+        // since we're doing paging, we have to break out just the event data
+        $list = $listResult['list'];
+        unset($listResult);
+        
+        // If we have list entries - even if it's an empty list
+        $success = true;
+        $haveRegEvents = false;
+        if ($list !== false) {
+       
+            $success = true;
+            
+            // If we have any entries
+            if (count($list) > 0) {
+                $haveRegEvents = true;
+            }
+        }
+        
+        // Get full list of event names matching the current where clause for text search box
+        $namesList = $this->getSimpleRegEventsList($where);        
+        
+        
+        
+        $template = 'index.html';
+        
+/*        
+        
+        // Check for a text search
+        if (isset($_REQUEST['text_search']) && trim($_REQUEST['text_search']) != '') {
+            
+            $textSearch = addslashes(filter_input(INPUT_POST, 'text_search', FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));
+            $where .= " AND T.id in (
+            SELECT DISTINCT(member)
+              FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_info
+             WHERE member_name like '%$textSearch%'
+        )";
+        }
+                
+        // Check for "Pending Only
+        if (isset($_REQUEST['filterPending'])) {
+            
+            // Refine search only to members with pending Info data
+            $where .= " AND (
+            SELECT COUNT(id)
+              FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_info I
+             WHERE I.status = ".$this->config['status_numb']['Pending']."
+               AND I.member = T.id
+        )";
+            
+            $filterPending = true;
+            $haveFilter = true;
+        }
+        
+        // Check for "Featured Only
+        if (isset($_REQUEST['filterFeatured'])) {
+            
+            // Refine search only to members with pending Info data
+            $where .= " AND (
+            SELECT COUNT(id)
+              FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members I
+             WHERE I.featured = 1
+               AND I.id = T.id
+                  
+        )";
+            $filterFeatured = true;
+            $haveFilter = true;
+        }
+        
+        // If doing alpha list
+        if (isset($_REQUEST['alpha'])) {
+            $actionData['request']['alpha'] = $_REQUEST['alpha'];
+        }
+        
+        $alphaList = false;
+        $alphaWhere = '';
+        
+        $alphaSelected = false;
+        
+        // If user clicked a page request then we need to check the savedAlpha value
+        if (isset($_REQUEST['savedAlpha']) && isset($_REQUEST['pageSelect'])) {
+            $actionData['request']['alpha'] = $_REQUEST['savedAlpha'];
+        }
+        
+        if ($actionData['request']['alpha'] && strlen($actionData['request']['alpha']) == 1) {
+            $alphaSelected = strtoupper($actionData['request']['alpha']);
+            $alphaWhere .= " AND T.name LIKE '$alphaSelected%'";
+        }
+        
+        // Get full list for all other filters, but not filtered by alpha (that would be silly)
+        $alphaList = $this->getAlphaList(' AND '.$where, $alphaSelected);
+        
+        $whereParts = apply_filters('glm-member-db-admin-search-query', $where);
+        if ( is_array( $whereParts ) && count( $whereParts ) > 0 ) {
+            $where .= ' AND '.implode(" AND ", $whereParts);
+            $whereSep = ' AND ';
+        }
+        
+        // Get count of members listed
+        $memberCount = $this->getStats($where);
+        
+        // If the number of members is less than a page, don't do paging
+        if ($memberCount <= $limit) {
+            $paging = false;
+        }
+        
+        // Get full list of names matching this where clause for search box
+        $namesList = $this->getIdName($where);
+        
+        // Check if we're doing paging
+        if (isset($_REQUEST['pageSelect'])) {
+            
+            // If request is for Next
+            if ($_REQUEST['pageSelect'][0] == 'N') {
+                $newStart = $_REQUEST['nextStart'] - 0;
+                
+                // Otherwise it must be Previous
+            } else {
+                $newStart = $_REQUEST['prevStart'] - 0;
+            }
+            
+            if ($newStart > 0) {
+                $start = $newStart;
+            }
+        }
+        
+        // Get stats for number of members found matching current selection criteria (includes alpha selection)
+        $filteredMembersFound = $this->getStats(str_replace('T.', '', $where.$alphaWhere));
+        
+        // Get a current list of members
+        $listResult = $this->getSimpleMembersList($where.$alphaWhere, 'name', true, 'id', $start, $limit);
+        
+        // Get paging results
+        $numbDisplayed = $listResult['returned'];
+        $lastDisplayed = $listResult['last'];
+        if ($start == 1) {
+            $prevStart = false;
+        } else {
+            $prevStart = $start - $limit;
+            if ($start < 1) {
+                $start = 1;
+            }
+        }
+        if ($listResult['returned'] == $limit) {
+            $nextStart = $start + $limit;
+        }
+        
+        // since we're doing paging, we have to break out just the member data
+        $list = $listResult['list'];
+        unset($listResult);
+        
+        // If we have list entries - even if it's an empty list
+        $success = true;
+        $haveMembers = false;
+        if ($list !== false) {
+            
+            $success = true;
+            
+            // If we have any entries
+            if (count($list) > 0) {
+                $haveMembers = true;
+            }
+        }
+        
+        // Determine if current user can add, edit, delete member data
+        //        $canEdit = current_user_can('glm_members_edit');
+        
+        // Add a url for each member
+        if ( isset( $list) && is_array( $list ) ) {
+            foreach ($list as $member) {
+                $list[$member['id']]['member_slug'] = sanitize_title($member['name']);
+            }
+        }
+        
+        // Compile template data
+        $templateData = array(
+            'enable_members' => $enable_members,
+            'haveMembers'    => $haveMembers,
+            'members'        => $list,
+            'memberCount'    => $memberCount,
+            'categories'     => $categories,
+            'haveFilter'     => $haveFilter,
+            'filterArchived' => $filterArchived,
+            'filterFeatured' => $filterFeatured,
+            'filterPending'  => $filterPending,
+            'catSelected' => $catSelected,
+            'catSearchSelected' => $catSelectedString,
+            'alphaList'      => $alphaList,
+            'alphaSelected'  => $alphaSelected,
+            'numbDisplayed'  => $numbDisplayed,
+            'lastDisplayed'  => $lastDisplayed,
+            'paging'         => $paging,
+            'prevStart'      => $prevStart,
+            'nextStart'      => $nextStart,
+            'start'          => $start,
+            'limit'          => $limit,
+            'namesList'      => $namesList,
+            'textSearch'     => $textSearch
+        );
+*/
+        
         // Compile template data
         $templateData = array(
+            'regEventsCount'    => $regEventsCount,
+            'haveRegEvents'     => $haveRegEvents,
+            'regEvents'         => $list,
+            'alphaList'         => $alphaList,
+            'alphaSelected'     => $alphaSelected,
+            'numbDisplayed'     => $numbDisplayed,
+            'lastDisplayed'     => $lastDisplayed,
+            'paging'            => $paging,
+            'prevStart'         => $prevStart,
+            'nextStart'         => $nextStart,
+            'start'             => $start,
+            'limit'             => $limit,
+            'namesList'         => $namesList,
+            'textSearch'        => $textSearch
         );
-             // Return status, any suggested view, and any data to controller
+        
+        // Return status, any suggested view, and any data to controller
         return array(
             'status'        => true,
             'modelRedirect' => false,
-            'view'          => 'admin/registrations/index.html',
+            'view'          => 'admin/registrations/'.$template,
             'data'          => $templateData
         );
 
diff --git a/models/admin/registrations/list.php b/models/admin/registrations/list.php
deleted file mode 100644 (file)
index 62ed55f..0000000
+++ /dev/null
@@ -1,383 +0,0 @@
-<?php
-/**
- * Gaslight Media Members Database
- * Admin Registrations Events List
- *
- * PHP version 5.5
- *
- * @category glmWordPressPlugin
- * @package  glmMembersDatabase
- * @author   Chuck Scott <cscott@gaslightmedia.com>
- * @license  http://www.gaslightmedia.com Gaslightmedia
- * @release  index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
- * @link     http://dev.gaslightmedia.com/
- */
-
-// Load Registrations data abstract
-require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegEvent.php';
-
-class GlmMembersAdmin_registrations_list extends GlmDataRegistrationsRegEvent
-{
-
-    /**
-     * WordPress Database Object
-     *
-     * @var $wpdb
-     * @access public
-     */
-    public $wpdb;
-    /**
-     * Plugin Configuration Data
-     *
-     * @var $config
-     * @access public
-     */
-    public $config;
-    /**
-     * Registrations Event ID
-     *
-     * @var $eventID
-     * @access public
-     */
-    public $regEventID = false;
-
-    /**
-     * Constructor
-     *
-     * This contructor performs the work for this model. This model returns
-     * an array containing the following.
-     *
-     * 'status'
-     *
-     * True if successfull and false if there was a fatal failure.
-     *
-     * 'view'
-     *
-     * A suggested view name that the contoller should use instead of the
-     * default view for this model or false to indicate that the default view
-     * should be used.
-     *
-     * 'data'
-     *
-     * Data that the model is returning for use in merging with the view to
-     * produce output.
-     *
-     * @wpdb object WordPress database object
-     *
-     * @return array Array containing status, suggested view, and any data
-     */
-    public function __construct ($wpdb, $config)
-    {
-
-        // Save WordPress Database object
-        $this->wpdb = $wpdb;
-
-        // Save plugin configuration object
-        $this->config = $config;
-
-        /*
-         * Run constructor for the REgistrations data class
-         *
-         * Note, the third parameter is a flag that indicates to the Contacts
-         * data class that it should flag a group of fields as 'view_only'.
-         */
-        parent::__construct(false, false, true);
-
-    }
-
-    public function modelAction($actionData = false)
-    {  
-        
-        $where              = ' true ';
-        $alphaWhere         = ' true ';
-        $numbDisplayed      = false;
-        $lastDisplayed      = false;
-        $paging             = true;
-        $prevStart          = false;
-        $nextStart          = false;
-        $start              = 1;
-        $limit              = 20;        // Set to the number of listings per page
-        $textSearch         = false;
-        $where              = "TRUE";
-        $alphaList          = false;
-        $alphaWhere         = '';
-        $alphaSelected      = false;
-        $haveRegEvents      = false;
-        $regEventsCount     = false;
-        $namesList          = false;
-        
-        // If doing alpha list
-        if (isset($_REQUEST['alpha'])) {
-            $actionData['request']['alpha'] = $_REQUEST['alpha'];
-        }
-                
-        // If user clicked a page request then we need to check the savedAlpha value
-        if (isset($_REQUEST['savedAlpha']) && isset($_REQUEST['pageSelect'])) {
-            $actionData['request']['alpha'] = $_REQUEST['savedAlpha'];
-        }
-        
-        if ($actionData['request']['alpha'] && strlen($actionData['request']['alpha']) == 1) {
-            $alphaSelected = strtoupper($actionData['request']['alpha']);
-            $alphaWhere .= " AND T.event_name LIKE '$alphaSelected%'";
-        }
-
-        // Get full list for all other filters, but not filtered by alpha (that would be silly)
-        $alphaList = $this->getAlphaList(' AND '.$where, $alphaSelected);
-        
-        // Get count of reg event listed
-        $regEventsCount = $this->getStats($where);
-        
-        // Get stats for number of registration events found matching current selection criteria (includes alpha selection)
-        $filteredRegEventsFound = $this->getStats(str_replace('T.', '', $where.$alphaWhere));
-        
-        // Get a current list of reg events
-        $listResult = $this->getSimpleRegEventsList($where.$alphaWhere, 'event_name', true, 'id', $start, $limit, true);
-
-        // Get paging results
-        $numbDisplayed = $listResult['returned'];
-        $lastDisplayed = $listResult['last'];
-        if ($start == 1) {
-            $prevStart = false;
-        } else {
-            $prevStart = $start - $limit;
-            if ($start < 1) {
-                $start = 1;
-            }
-        }
-        if ($listResult['returned'] == $limit) {
-            $nextStart = $start + $limit;
-        }
-        
-        // since we're doing paging, we have to break out just the event data
-        $list = $listResult['list'];
-        unset($listResult);
-        
-        // If we have list entries - even if it's an empty list
-        $success = true;
-        $haveRegEvents = false;
-        if ($list !== false) {
-       
-            $success = true;
-            
-            // If we have any entries
-            if (count($list) > 0) {
-                $haveRegEvents = true;
-            }
-        }
-        
-        // Get full list of event names matching the current where clause for text search box
-        $namesList = $this->getSimpleRegEventsList($where);        
-        
-        
-        
-        $template = 'list.html';
-        
-/*        
-        
-        // Check for a text search
-        if (isset($_REQUEST['text_search']) && trim($_REQUEST['text_search']) != '') {
-            
-            $textSearch = addslashes(filter_input(INPUT_POST, 'text_search', FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));
-            $where .= " AND T.id in (
-            SELECT DISTINCT(member)
-              FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_info
-             WHERE member_name like '%$textSearch%'
-        )";
-        }
-                
-        // Check for "Pending Only
-        if (isset($_REQUEST['filterPending'])) {
-            
-            // Refine search only to members with pending Info data
-            $where .= " AND (
-            SELECT COUNT(id)
-              FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_info I
-             WHERE I.status = ".$this->config['status_numb']['Pending']."
-               AND I.member = T.id
-        )";
-            
-            $filterPending = true;
-            $haveFilter = true;
-        }
-        
-        // Check for "Featured Only
-        if (isset($_REQUEST['filterFeatured'])) {
-            
-            // Refine search only to members with pending Info data
-            $where .= " AND (
-            SELECT COUNT(id)
-              FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members I
-             WHERE I.featured = 1
-               AND I.id = T.id
-                  
-        )";
-            $filterFeatured = true;
-            $haveFilter = true;
-        }
-        
-        // If doing alpha list
-        if (isset($_REQUEST['alpha'])) {
-            $actionData['request']['alpha'] = $_REQUEST['alpha'];
-        }
-        
-        $alphaList = false;
-        $alphaWhere = '';
-        
-        $alphaSelected = false;
-        
-        // If user clicked a page request then we need to check the savedAlpha value
-        if (isset($_REQUEST['savedAlpha']) && isset($_REQUEST['pageSelect'])) {
-            $actionData['request']['alpha'] = $_REQUEST['savedAlpha'];
-        }
-        
-        if ($actionData['request']['alpha'] && strlen($actionData['request']['alpha']) == 1) {
-            $alphaSelected = strtoupper($actionData['request']['alpha']);
-            $alphaWhere .= " AND T.name LIKE '$alphaSelected%'";
-        }
-        
-        // Get full list for all other filters, but not filtered by alpha (that would be silly)
-        $alphaList = $this->getAlphaList(' AND '.$where, $alphaSelected);
-        
-        $whereParts = apply_filters('glm-member-db-admin-search-query', $where);
-        if ( is_array( $whereParts ) && count( $whereParts ) > 0 ) {
-            $where .= ' AND '.implode(" AND ", $whereParts);
-            $whereSep = ' AND ';
-        }
-        
-        // Get count of members listed
-        $memberCount = $this->getStats($where);
-        
-        // If the number of members is less than a page, don't do paging
-        if ($memberCount <= $limit) {
-            $paging = false;
-        }
-        
-        // Get full list of names matching this where clause for search box
-        $namesList = $this->getIdName($where);
-        
-        // Check if we're doing paging
-        if (isset($_REQUEST['pageSelect'])) {
-            
-            // If request is for Next
-            if ($_REQUEST['pageSelect'][0] == 'N') {
-                $newStart = $_REQUEST['nextStart'] - 0;
-                
-                // Otherwise it must be Previous
-            } else {
-                $newStart = $_REQUEST['prevStart'] - 0;
-            }
-            
-            if ($newStart > 0) {
-                $start = $newStart;
-            }
-        }
-        
-        // Get stats for number of members found matching current selection criteria (includes alpha selection)
-        $filteredMembersFound = $this->getStats(str_replace('T.', '', $where.$alphaWhere));
-        
-        // Get a current list of members
-        $listResult = $this->getSimpleMembersList($where.$alphaWhere, 'name', true, 'id', $start, $limit);
-        
-        // Get paging results
-        $numbDisplayed = $listResult['returned'];
-        $lastDisplayed = $listResult['last'];
-        if ($start == 1) {
-            $prevStart = false;
-        } else {
-            $prevStart = $start - $limit;
-            if ($start < 1) {
-                $start = 1;
-            }
-        }
-        if ($listResult['returned'] == $limit) {
-            $nextStart = $start + $limit;
-        }
-        
-        if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
-            glmMembersAdmin::addNotice($list, 'DataBlock', 'Member Data');
-        }
-        
-        // since we're doing paging, we have to break out just the member data
-        $list = $listResult['list'];
-        unset($listResult);
-        
-        // If we have list entries - even if it's an empty list
-        $success = true;
-        $haveMembers = false;
-        if ($list !== false) {
-            
-            $success = true;
-            
-            // If we have any entries
-            if (count($list) > 0) {
-                $haveMembers = true;
-            }
-        }
-        
-        // Determine if current user can add, edit, delete member data
-        //        $canEdit = current_user_can('glm_members_edit');
-        
-        // Add a url for each member
-        if ( isset( $list) && is_array( $list ) ) {
-            foreach ($list as $member) {
-                $list[$member['id']]['member_slug'] = sanitize_title($member['name']);
-            }
-        }
-        
-        // Compile template data
-        $templateData = array(
-            'enable_members' => $enable_members,
-            'haveMembers'    => $haveMembers,
-            'members'        => $list,
-            'memberCount'    => $memberCount,
-            'categories'     => $categories,
-            'haveFilter'     => $haveFilter,
-            'filterArchived' => $filterArchived,
-            'filterFeatured' => $filterFeatured,
-            'filterPending'  => $filterPending,
-            'catSelected' => $catSelected,
-            'catSearchSelected' => $catSelectedString,
-            'alphaList'      => $alphaList,
-            'alphaSelected'  => $alphaSelected,
-            'numbDisplayed'  => $numbDisplayed,
-            'lastDisplayed'  => $lastDisplayed,
-            'paging'         => $paging,
-            'prevStart'      => $prevStart,
-            'nextStart'      => $nextStart,
-            'start'          => $start,
-            'limit'          => $limit,
-            'namesList'      => $namesList,
-            'textSearch'     => $textSearch
-        );
-*/
-        
-        // Compile template data
-        $templateData = array(
-            'regEventsCount'    => $regEventsCount,
-            'haveRegEvents'     => $haveRegEvents,
-            'regEvents'         => $list,
-            'alphaList'         => $alphaList,
-            'alphaSelected'     => $alphaSelected,
-            'numbDisplayed'     => $numbDisplayed,
-            'lastDisplayed'     => $lastDisplayed,
-            'paging'            => $paging,
-            'prevStart'         => $prevStart,
-            'nextStart'         => $nextStart,
-            'start'             => $start,
-            'limit'             => $limit,
-            'namesList'         => $namesList,
-            'textSearch'        => $textSearch
-        );
-        
-        // Return status, any suggested view, and any data to controller
-        return array(
-            'status'        => true,
-            'modelRedirect' => false,
-            'view'          => 'admin/registrations/'.$template,
-            'data'          => $templateData
-        );
-
-    }
-
-
-}
index e1cf5aa..376ecfa 100644 (file)
@@ -83,10 +83,11 @@ class GlmMembersAdmin_registrations_requests extends GlmDataRegistrationsRequest
 
         $haveRequests   = false;
         $requests       = false;
+        $requestID      = false;
         $haveRequest    = false;
-        $requestId      = false;
-        $requestCart    = false;
-        $option         = 'list';
+        $cart           = false;
+        $haveCart       = false;
+        $option         = 'dashboard';
         $errorMsg       = false;
 
         // Load registrations support class
@@ -106,34 +107,62 @@ class GlmMembersAdmin_registrations_requests extends GlmDataRegistrationsRequest
         if (isset($_REQUEST['option']) && $_REQUEST['option'] != '') {
             $option = $_REQUEST['option'];
         }
-
-        // Check for registration request ID submitted
-        if (isset($_REQUEST['requestID']) && $_REQUEST['requestID'] != '') {
-            $requestId = ($_REQUEST['requestID'] - 0);
+        
+        
+        // Get request ID if supplied
+        if (isset($_REQUEST['requestID'])) {
+            
+            // Make sure it's numeric
+            $requestID = ($_REQUEST['requestID'] - 0);
+            
+        } else {
+            
+            // Try to get saved
+            $requestID = get_option('glmMembersDatabaseRegistrationsRequestID');
+            
         }
-
+        
+        if (!$requestID || $requestID <= 0) {
+            $requestID = false;
+        }
+        
         // Perform selected option
         switch ($option) {
 
             // Check request and update holds
             case 'check':
 
-                $requestCart = $regCartSupport->checkRegistrationRequest($requestId);
+                $cart = $regCartSupport->checkRegistrationRequest($requestID);
+                
+                break;
+                
+            // Display selected registration request dashboard
+            case 'requestDashboard':
+                
+                $cart = $regCartSupport->getRegistrationCart($requestID);
+
+                if ($cart) {
+                    $haveCart = true;
+                }
+                
+                $view = 'requestDashboard.html';
+                
+                break;
 
             // Display/Edit a registration request
             case 'edit':
 
                 // If a request ID has been supplied
-                if ($requestId) {
+                if ($requestID) {
 
                     // Try to get the complete cart for this request
-                    $requestCart = $regCartSupport->getRegistrationCart($requestId);
+                    $cart = $regCartSupport->getRegistrationCart($requestID);
 
                     // If a valid cart was returned
-                    if ($requestCart && $requestCart['status']) {
+                    if ($cart && $requestCart['status']) {
                         $haveRequest = true;
                     } else {
-                        $errorMsg = $requestCart['errorMsg'];
+                        $errorMsg = $cart['errorMsg'];
                     }
 
                     $view = 'requestEdit.html';
@@ -147,6 +176,7 @@ class GlmMembersAdmin_registrations_requests extends GlmDataRegistrationsRequest
                 // Fall through to list if no requestID submitted
 
             // Default is to list requests
+            case 'dashboard':
             default:
 
                 // Get list of requests
@@ -155,18 +185,25 @@ class GlmMembersAdmin_registrations_requests extends GlmDataRegistrationsRequest
                     $haveRequests = true;
                 }
 
-                $view = 'requests.html';
+                $view = 'requestsDashboard.html';
 
                 break;
 
         }
 
+        // If we have a valid request ID, save that for future use
+        if ($requestID > 0) {
+            update_option('glmMembersDatabaseRegistrationsRequestID', $requestID);
+        }
+        
         // Compile template data
         $templateData = array(
             'haveRequests'  => $haveRequests,
             'requests'      => $requests,
             'haveRequest'   => $haveRequest,
-            'cart'          => $requestCart,
+            'requestID'     => $requestID,
+            'cart'          => $cart,
+            'haveCart'      => $haveCart,
             'errorMsg'      => $errorMsg,
             'option'        => $option
         );
index 2ade88b..df11b46 100644 (file)
@@ -133,10 +133,6 @@ class GlmMembersAdmin_settings_registrationsMisc extends GlmDataRegistrationsMis
                 // Check if we were successful
                 if ($regMisc['status']) {
 
-                    if ( GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE ) {
-                        glmMembersAdmin::addNotice( $regMisc, 'DataBlock', 'Misc Registrations Settings' );
-                    }
-
                     $miscUpdated = true;
                     $success = true;
 
@@ -160,10 +156,7 @@ class GlmMembersAdmin_settings_registrationsMisc extends GlmDataRegistrationsMis
                 // If we didn't get the misc settings
                 if ($regMisc == false) {
 
-                    if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
-                        glmMembersAdmin::addNotice("<b>/models/admin/settings/registrationsMisc.php:</b> Unable to load Misc Settings.", 'Alert');
-                    }
-
+                    trigger_error("Unable to load Misc Settings: /models/admin/settings/registrationsMisc.php", E_USER_NOTICE);
                     return array(
                         'status' => false,
                         'menuItemRedirect' => 'error',
index f128382..5c7ffb9 100644 (file)
@@ -147,9 +147,6 @@ class GlmMembersAdmin_settings_registrationsPaymentCode extends GlmDataRegistrat
         // Get a current list of payment_codes
         $payment_codes = $this->getList('ref_type = 10');
 
-        if ( GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE ) {
-            glmMembersAdmin::addNotice( $payment_codes, 'DataBlock', 'Payment Code Data' );
-        }
         // If we have list entries - even if it's an empty list
         if ( $payment_codes !== false ) {
 
@@ -171,9 +168,6 @@ class GlmMembersAdmin_settings_registrationsPaymentCode extends GlmDataRegistrat
             );
         }
 
-        if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
-            glmMembersAdmin::addNotice( $payment_codes, 'DataBlock', 'Payment Code Data' );
-        }
         // Compile template data
         $templateData = array(
             'enable_members'    => $enable_members,
index b653cff..62c2e99 100644 (file)
@@ -58,16 +58,16 @@ add_submenu_page(
     'glm-members-admin-menu-registrations-index',
     function() {$this->controller('registrations');}
 );
-
+/*
 add_submenu_page(
     'glm-members-admin-menu-members',
-    'Registration Events List',
-    '&nbsp;&nbsp;&nbsp;&nbsp;List',
+    'Registration Events Dashboard',
+    '&nbsp;&nbsp;&nbsp;&nbsp;Dashboard',
     'glm_members_members',
-    'glm-members-admin-menu-registrations-list',
-    function() {$this->controller('registrations', 'list');}
+    'glm-members-admin-menu-registrations-index',
+    function() {$this->controller('registrations', 'index');}
 );
-
+*/
 add_submenu_page(
     'glm-members-admin-menu-members',
     'Selected Event',
index ac9f491..b9d73ff 100644 (file)
@@ -64,7 +64,6 @@ $glmMembersRegistrationsAddOnValidActions = array(
         ),
         'registrations' => array(
             'index'                     => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
-            'list'                      => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
             'event'                     => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
             'requests'                  => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
             'accounts'                  => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG
index 15cfca6..99303f0 100644 (file)
@@ -1,64 +1,59 @@
 {include file='admin/registrations/accountHeader.html'}
 
-<h3>Account Dashboard
-    <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts&glm_action=accounts&option=edit&account={$accountID}" class="button button-secondary glm-button glm-right">Edit Account</a>
-</h3>
-
+<h1>Selected Account Dashboard</h1>
 
-{if $paging && $numAccounts}
-    <input type="Submit" name="pageSelect" value="Previous {$limit} Events" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
-    <input type="Submit" name="pageSelect" value="Next {$limit} Events" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
-{/if}
-
-<div id="glm-admin-member-registrations-account-detail" class="glm-admin-table">
-    <div class="glm-row">
-        <div class="glm-small-4 glm-left">
-            <div class="glm-admin-table">
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-                        <h3>Account:</h3>
-                    </div>
-                    <div class="glm-small-12 glm-column">
-                        {$account.fname} {$account.lname}{if $account.title}, {$account.title}{/if}
-                    </div>
-                    <div class="glm-small-12 glm-column">
-                        {$account.org}
-                    </div>
-                    <div class="glm-small-12 glm-column">
-                        {$account.addr1}
-                    </div>
-                {if $account.addr2}
-                    <div class="glm-small-12 glm-column">
-                        {$account.addr2}
-                    </div>
-                {/if}
-                    <div class="glm-small-12 glm-column">
-                        {$account.city}, {$account.state} {$account.zip}
-                    </div>
-                    <div class="glm-small-12 glm-column">
-                        {$account.country}
+<div class="glm-admin-table-inner glm-admin-table">
+    
+    <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts&glm_action=accounts&option=edit&account={$accountID}" class="button button-secondary glm-button glm-right">Edit Account</a>
+    <h3>Account</h3>
+    
+    <div id="glm-admin-member-registrations-account-detail" class="glm-admin-table">
+        <div class="glm-row">
+            <div class="glm-small-4 glm-left">
+                <div class="glm-admin-table">
+                    <div class="glm-row">
+                        <div class="glm-small-12 glm-column">
+                            {$account.fname} {$account.lname}{if $account.title}, {$account.title}{/if}
+                        </div>
+                        <div class="glm-small-12 glm-column">
+                            {$account.org}
+                        </div>
+                        <div class="glm-small-12 glm-column">
+                            {$account.addr1}
+                        </div>
+                    {if $account.addr2}
+                        <div class="glm-small-12 glm-column">
+                            {$account.addr2}
+                        </div>
+                    {/if}
+                        <div class="glm-small-12 glm-column">
+                            {$account.city}, {$account.state} {$account.zip}
+                        </div>
+                        <div class="glm-small-12 glm-column">
+                            {$account.country}
+                        </div>
                     </div>
                 </div>
             </div>
-        </div>
-        <div class="glm-small-4 glm-left">
-            <div class="glm-admin-table">
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-                        <h3>Active:</h3>
-                    </div>
-                    <div class="glm-small-12 glm-column">
-                        {if $account.active}Yes{/if}
+            <div class="glm-small-4 glm-left">
+                <div class="glm-admin-table">
+                    <div class="glm-row">
+                        <div class="glm-small-12 glm-column">
+                            <h3>Active:</h3>
+                        </div>
+                        <div class="glm-small-12 glm-column">
+                            {if $account.active}Yes{/if}
+                        </div>
                     </div>
                 </div>
-            </div>
-            <div class="glm-admin-table">
-                <div class="glm-row">
-                    <div class="glm-small-12 glm-column">
-                        <h3>Login Validated:</h3>
-                    </div>
-                    <div class="glm-small-12 glm-column">
-                        {if $account.validated}Yes{/if}
+                <div class="glm-admin-table">
+                    <div class="glm-row">
+                        <div class="glm-small-12 glm-column">
+                            <h3>Login Validated:</h3>
+                        </div>
+                        <div class="glm-small-12 glm-column">
+                            {if $account.validated}Yes{/if}
+                        </div>
                     </div>
                 </div>
             </div>
     </div>
 </div>
 
-<div style="margin-top: 2em">
-    <h1>Registration Requests</h1>
-    {assign var="i" value="0"}
-    <table class="wp-list-table striped glm-admin-table">
-        <thead>
-            <tr>
-                <th>Submitted</th>
-                <th>Payment By</th>
-                <th>Total Payment</th>
-                <th>Status</th>
+<div class="glm-admin-table-inner glm-admin-table">
+        <p><h3>Registration Requests</h3></p>
+        {assign var="i" value="0"}
+        <table class="wp-list-table striped glm-admin-table">
+            <thead>
+                <tr>
+                    <th>ID</th>
+                    <th>Submitted</th>
+                    <th>Payment By</th>
+                    <th>Total Payment</th>
+                    <th>Status</th>
+                </tr>
+            </thead>
+            <tbody>
+        {foreach $requests as $req}
+            {if $i++ is odd by 1}
+                <tr>
+            {else}
+                <tr class="alternate">
+            {/if}
+                <td>
+                    <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&glm_action=requests&option=requestDashboard&requestID={$req.id}">
+                    {$req.id}
+                    </a>
+                </td>
+                <td>{$req.date_submitted.datetime}</td>
+                <td>{$req.pay_method.name}</td>
+                <td>{$req.total}</td>
+                <td>{$req.status.name}</td>
             </tr>
-        </thead>
-        <tbody>
-    {foreach $registrations as $reg}
-        {if $i++ is odd by 1}
-            <tr>
-        {else}
-            <tr class="alternate">
-        {/if}
-            <td>{$reg.date_submitted.datetime}</td>
-            <td>{$reg.pay_method.name}</td>
-            <td>{$reg.total}</td>
-            <td>{$reg.status.name}</td>
-        </tr>
-    {/foreach}
-    </table>
-</div>    
+        {/foreach}
+        </table>
+        
+</div>
 
-<div style="margin-top: 2em">
-    <h1>Registered for Events</h1>
+<div class="glm-admin-table-inner glm-admin-table">
+    <p><h3>Registered for Events</h3></p>
     {assign var="i" value="0"}
     <table class="wp-list-table striped glm-admin-table">
         <thead>
         {else}
             <tr class="alternate">
         {/if}
-            <td>{$reg.event_name}</td>
+            <td>
+                <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-event&option=requestDashboard&requestID={$req.id}">
+                {$reg.event_name}
+            </td>
             <td>{$reg.event_datetime.datetime}</td>
         </tr>
     {/foreach}
 </div>    
 
 
-
 {include file='admin/footer.html'}
 
index 2cc4960..d89063d 100644 (file)
@@ -1,5 +1,5 @@
 <div class="wrap">
-<h2>Registration Accounts</h2>
+<h2>Event Registrations</h2>
 <h2 class="nav-tab-wrapper">
     <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts" class="nav-tab{if $option==dashboard} nav-tab-active{/if}">Dashboard</a>
     <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts&option=accountDashboard" class="nav-tab{if $option==accountDashboard} nav-tab-active{/if}">Selected Account</a>
index bfcd4c4..9f26b15 100644 (file)
@@ -1,8 +1,10 @@
 {include file='admin/registrations/accountHeader.html'}
 
-<h3>Accounts Dashboard
-    <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts&glm_action=accounts&option=add" class="button button-secondary glm-button glm-right">Add A New Account</a>
-</h3>
+<h1>Accounts Dashboard</h1>
+
+<div class="glm-admin-table-inner glm-admin-table">
+
+    <h3>Accounts List    <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts&glm_action=accounts&option=add" class="button button-secondary glm-button glm-right">Add A New Account</a> </h3>
 
     <form action="{$thisUrl}?page={$thisPage}" method="post" id="searchForm">
 
@@ -49,7 +51,7 @@
             <td>{$account.id}</td>
             <td>{$account.active.name}</td>
             <td>
-                <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts&glm_action=accounts&option=accountDashboard&account={$account.id}">{$account.fname} {$account.lname}</a>
+                <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts&glm_action=accounts&option=accountDashboard&accountID={$account.id}">{$account.fname} {$account.lname}</a>
             </td>
             <td>{$account.date_created.timestamp|date_format:"%D"}</td>
             <td>{$account.member_id}</td>
@@ -64,6 +66,7 @@
     {/if}
 
     </form>
+</div>
 
     <script>
         jQuery(document).ready(function($){
@@ -88,7 +91,7 @@
                  position: { my : "right top", at: "right bottom" },
                  select: function( event, ui ) {
                      var accountID = ui.item.id;
-                     window.location.replace("{$adminUrl}?page=glm-members-admin-menu-registrations-accounts&glm_action=accounts&option=edit&account=" + accountID );
+                     window.location.replace("{$adminUrl}?page=glm-members-admin-menu-registrations-accounts&glm_action=accounts&option=edit&accountID=" + accountID );
                  },
                  response: function(event, ui) {
                      if (!ui.content.length) {
index 507c782..d653d32 100644 (file)
@@ -1,19 +1,21 @@
 {include file='admin/registrations/header.html'}
 
-{if $reason}
-       <p class="glm-error">{$reason}</p>
-{/if}
+<h1>Selected Event Dashboard</h1>
 
-<div id="glm-admin-member-dashboard" class="glm-admin-table">
-  {if $haveRegEvent}
+<div class="glm-admin-table-inner glm-admin-table">
 
+    {if $reason}
+       <p class="glm-error">{$reason}</p>
+    {/if}
+    
+    <h3>Event</h3>
+    <div id="glm-admin-member-dashboard" class="glm-admin-table">
+      {if $haveRegEvent}
+    
         <div class="glm-row">
             <div class="glm-small-4 glm-left">
                 <div class="glm-admin-table">
                     <div class="glm-row">
-                        <div class="glm-small-12 glm-column">
-                            <h4>Event Name:</h4>
-                        </div>
                         <div class="glm-small-12 glm-column">
                             {$regEvent.event_name}
                         </div>
             </div>
             {if apply_filters('glm_members_menu_members', true)}
             <div class="glm-small-4 glm-right">
-                <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-event&option=edit&regEventID={$regEvent.id}" class="button button-primary glm-button glm-right">Edit Registration Event</a>
+                <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-event&option=edit&regEventID={$regEvent.id}" class="button button-secondary glm-button glm-right">Edit Registration Event</a>
             </div>
             {/if}
         </div>
-        
-        <table id="glm-table-calendar" class="glm-admin-table glm-event-table">
-            <tr>
-                <td>
-                    <div id="eventCalendar">(calendar loads here)</div>
-                </td>
-            </tr>
-        </table>
+        {else}
+            <h3>Did not find selected event.</h3>
+        {/if}
+    </div>    
+</div>        
 
-        
-  {else}
-        <h3></h3>
-  {/if}
+<div class="glm-admin-table-inner glm-admin-table">
+    {if $haveRegEvent}
+    <p><h3>Dates and Availability</h3></p>
+    <table id="glm-table-calendar" class="glm-admin-table glm-event-table">
+        <tr>
+            <td>
+                <div id="eventCalendar">(calendar loads here)</div>
+            </td>
+        </tr>
+    </table>
+    {else}
+        <h3>Did not find selected event.</h3>
+    {/if}
+    
+</div>
 
 </div>
     <script type="text/javascript">
index 7a33c98..1b20e26 100644 (file)
@@ -1,8 +1,148 @@
 {include file='admin/registrations/header.html'}
-    
-<h3>Registrations Dashboard</h3>
-    
-<h2>Not Built Yet</h2>
-    
-{include file='admin/footer.html'}
 
+<h1 class="glm-admin-table-header">Registrations Dashboard</h1>
+
+<div class="glm-admin-table-inner glm-admin-table">
+    <form action="{$thisUrl}?page={$thisPage}" method="post" id="searchForm">
+        <input type="hidden" name="glm_action" value="list">
+        <input type="hidden" name="prevStart" value="{$prevStart}">
+        <input type="hidden" name="nextStart" value="{$nextStart}">
+        <input type="hidden" name="limit" value="{$limit}">
+        <input type="hidden" name="savedAlpha" value="{$alphaSelected}">
+
+        <p><h2 class="glm-admin-table-header">List&nbsp;of&nbsp;Registration&nbsp;Events</h2></p>
+        
+        <div class="glm-row">   
+            <b>Text Search: </b><input  class="glmRegEventsSearch" type="text" name="text_search" id="autoTest">
+            <input type="submit" value="Submit" style="margin-right: 2em;">
+        </div>
+
+        <p><b>Total found:</b> {$regEventsCount}&nbsp;&nbsp;</p>
+
+        <br clear="all">
+
+        <!-- Add Reg Event Type Button and Dialog Box -->
+
+        {if $paging}
+            <input type="Submit" name="pageSelect" value="Previous {$limit} Registration Events" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
+            <input type="Submit" name="pageSelect" value="Next {$limit} Registration Events" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
+        {/if}
+
+        <div class="glm-alpha-links">
+            <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-list&glm_action=list&textSearch={$textSearch}" class="glm-alpha-link{if !$alphaSelected} glm-alpha-link-selected{/if}">All</a>
+      {foreach $alphaList as $a}
+            <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-list&glm_action=list&alpha={$a.alpha}&textSearch={$textSearch}" class="glm-alpha-link{if $a.default} glm-alpha-link-selected{/if}">{$a.alpha}</a>
+      {/foreach}
+       </div>
+
+        <table class="wp-list-table striped glm-admin-table-single">
+            <thead>
+                <tr>
+                    <th>ID</th>
+                    <th>Event Name</th>
+                </tr>
+            </thead>
+            <tbody>
+    {if $haveRegEvents}
+        {assign var="i" value="0"}
+        {foreach $regEvents as $r}
+            {if $i++ is odd by 1}
+                <tr>
+            {else}
+                <tr class="alternate">
+            {/if}
+                    <td style="width: 50px;">
+                        {$r.id}
+                    </td>
+                    <td>
+                        <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-event&regEventID={$r.id}">{$r.event_name}</a>
+                    </td>
+                </tr>
+        {/foreach}
+    {else}
+                <tr class="alternate"><td colspan="2">(no registration events listed)</td></tr>
+    {/if}
+            </tbody>
+        </table>
+
+        {if $paging}
+            <input type="Submit" name="pageSelect" value="Previous {$limit} Events" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
+            <input type="Submit" name="pageSelect" value="Next {$limit} Events" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
+        {/if}
+
+    </form>
+</div>
+<script type="text/javascript">
+    jQuery(document).ready(function($) {
+
+        // Filter triggers
+        $(".listFilter" ).change( function() {
+
+            var filter = '';
+
+            // Check for archived filter
+            if ($("#filterArchived").attr('checked')) {
+                filter += '&filterArchived=true';
+            }
+
+            // Check for pending data filter
+            if ($("#filterPending").attr('checked')) {
+                filter += '&filterPending=true';
+            }
+
+            // Check for featured data filter
+            if ($("#filterFeatured").attr('checked')) {
+                filter += '&filterFeatured=true';
+            }
+
+            window.location.href = "{$thisUrl}?page={$thisPage}&glm_action=list" + filter;
+
+            return false;
+        });
+
+        /*
+         *
+         * Do autocomplete search for registration events
+         * label: What will be searched
+         * value: What will be displayed when selected
+         * id: Member id added so we can go to the member while showing what was selected
+         * Also note that autocomplete does not properly render HTML codes, so we
+         * "unescape" them for HTML in Smarty.
+         */
+
+         var availableTags = [
+   {foreach $namesList as $m}
+                   { label: "{$m.event_name|unescape:'html'|replace:'"':''}", value: "{$m.event_name|unescape:'html'|replace:'"':''}", id: '{$m.id}' },
+                       {/foreach}
+         ];
+
+         // Autocomplete for list Text Search
+         $( ".glmRegEventsSearch" ).autocomplete({
+
+             source: availableTags,
+             html: true,
+             position: { my : "right top", at: "right bottom" },
+             select: function( event, ui ) {
+                 var regEventID = ui.item.id;
+                 window.location.replace("{$adminUrl}?page=glm-members-admin-menu-registrations-event&regEventID=" + regEventID );
+             },
+             response: function(event, ui) {
+                 if (!ui.content.length) {
+                     var noResult = { value:"",label:"No results found" };
+                     ui.content.push(noResult);
+                 }
+             }
+         });
+
+         // Restrict autocomplete list to a certain height with scrollbar
+         $('.ui-autocomplete').css('height','200px').css('overflow-y','scroll');
+         
+         // Expand multi-select on hover
+         $('#filterCategories').multiselect();
+         $('#exportFilterCategories').multiselect();
+
+    });
+</script>
+
+
+{include file='admin/footer.html'}
diff --git a/views/admin/registrations/list-save.html b/views/admin/registrations/list-save.html
deleted file mode 100644 (file)
index fbf4367..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{include file='admin/registrations/header.html'}
-    
-<h3>Registrations Event List</h3>
-
-<h2>Not Built Yet</h2>
-    
-{include file='admin/footer.html'}
-
diff --git a/views/admin/registrations/list.html b/views/admin/registrations/list.html
deleted file mode 100644 (file)
index 0e6c8b9..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-{include file='admin/registrations/header.html'}
-
-<div class="glm-admin-table-inner glm-admin-table">
-    <form action="{$thisUrl}?page={$thisPage}" method="post" id="searchForm">
-        <input type="hidden" name="glm_action" value="list">
-        <input type="hidden" name="prevStart" value="{$prevStart}">
-        <input type="hidden" name="nextStart" value="{$nextStart}">
-        <input type="hidden" name="limit" value="{$limit}">
-        <input type="hidden" name="savedAlpha" value="{$alphaSelected}">
-
-        <h2 class="glm-admin-table-header">List&nbsp;of&nbsp;Registration&nbsp;Events</h2>
-        
-        <div class="glm-row">   
-            <b>Text Search: </b><input  class="glmRegEventsSearch" type="text" name="text_search" id="autoTest">
-            <input type="submit" value="Submit" style="margin-right: 2em;">
-        </div>
-
-        <p><b>Total found:</b> {$regEventsCount}&nbsp;&nbsp;</p>
-
-        <br clear="all">
-
-        <!-- Add Reg Event Type Button and Dialog Box -->
-
-        {if $paging}
-            <input type="Submit" name="pageSelect" value="Previous {$limit} Registration Events" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
-            <input type="Submit" name="pageSelect" value="Next {$limit} Registration Events" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
-        {/if}
-
-        <div class="glm-alpha-links">
-            <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-list&glm_action=list&textSearch={$textSearch}" class="glm-alpha-link{if !$alphaSelected} glm-alpha-link-selected{/if}">All</a>
-      {foreach $alphaList as $a}
-            <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-list&glm_action=list&alpha={$a.alpha}&textSearch={$textSearch}" class="glm-alpha-link{if $a.default} glm-alpha-link-selected{/if}">{$a.alpha}</a>
-      {/foreach}
-       </div>
-
-        <table class="wp-list-table striped glm-admin-table-single">
-            <thead>
-                <tr>
-                    <th>ID</th>
-                    <th>Event Name</th>
-                </tr>
-            </thead>
-            <tbody>
-    {if $haveRegEvents}
-        {assign var="i" value="0"}
-        {foreach $regEvents as $r}
-            {if $i++ is odd by 1}
-                <tr>
-            {else}
-                <tr class="alternate">
-            {/if}
-                    <td style="width: 50px;">
-                        {$r.id}
-                    </td>
-                    <td>
-                        <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-event&regEventID={$r.id}">{$r.event_name}</a>
-                    </td>
-                </tr>
-        {/foreach}
-    {else}
-                <tr class="alternate"><td colspan="2">(no registration events listed)</td></tr>
-    {/if}
-            </tbody>
-        </table>
-
-        {if $paging}
-            <input type="Submit" name="pageSelect" value="Previous {$limit} Events" class="button button-secondary glm-button"{if !$prevStart} disabled{/if}>
-            <input type="Submit" name="pageSelect" value="Next {$limit} Events" class="button button-secondary glm-button"{if !$nextStart} disabled{/if}>
-        {/if}
-
-    </form>
-</div>
-<script type="text/javascript">
-    jQuery(document).ready(function($) {
-
-        // Filter triggers
-        $(".listFilter" ).change( function() {
-
-            var filter = '';
-
-            // Check for archived filter
-            if ($("#filterArchived").attr('checked')) {
-                filter += '&filterArchived=true';
-            }
-
-            // Check for pending data filter
-            if ($("#filterPending").attr('checked')) {
-                filter += '&filterPending=true';
-            }
-
-            // Check for featured data filter
-            if ($("#filterFeatured").attr('checked')) {
-                filter += '&filterFeatured=true';
-            }
-
-            window.location.href = "{$thisUrl}?page={$thisPage}&glm_action=list" + filter;
-
-            return false;
-        });
-
-        /*
-         *
-         * Do autocomplete search for registration events
-         * label: What will be searched
-         * value: What will be displayed when selected
-         * id: Member id added so we can go to the member while showing what was selected
-         * Also note that autocomplete does not properly render HTML codes, so we
-         * "unescape" them for HTML in Smarty.
-         */
-
-         var availableTags = [
-   {foreach $namesList as $m}
-                   { label: "{$m.event_name|unescape:'html'|replace:'"':''}", value: "{$m.event_name|unescape:'html'|replace:'"':''}", id: '{$m.id}' },
-                       {/foreach}
-         ];
-
-         // Autocomplete for list Text Search
-         $( ".glmRegEventsSearch" ).autocomplete({
-
-             source: availableTags,
-             html: true,
-             position: { my : "right top", at: "right bottom" },
-             select: function( event, ui ) {
-                 var regEventID = ui.item.id;
-                 window.location.replace("{$adminUrl}?page=glm-members-admin-menu-registrations-event&regEventID=" + regEventID );
-             },
-             response: function(event, ui) {
-                 if (!ui.content.length) {
-                     var noResult = { value:"",label:"No results found" };
-                     ui.content.push(noResult);
-                 }
-             }
-         });
-
-         // Restrict autocomplete list to a certain height with scrollbar
-         $('.ui-autocomplete').css('height','200px').css('overflow-y','scroll');
-         
-         // Expand multi-select on hover
-         $('#filterCategories').multiselect();
-         $('#exportFilterCategories').multiselect();
-
-    });
-</script>
-
-
-{include file='admin/footer.html'}
diff --git a/views/admin/registrations/requestDashboard.html b/views/admin/registrations/requestDashboard.html
new file mode 100644 (file)
index 0000000..d064641
--- /dev/null
@@ -0,0 +1,46 @@
+{include file='admin/registrations/requestHeader.html'}
+
+<h1>Selected Request Dashboard</h1>
+
+{$acct = $cart.request.account}
+
+<div class="glm-admin-table-inner glm-admin-table">
+    
+    <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&glm_action=requests&option=edit&account={$acct}" class="button button-secondary glm-button glm-right">Edit Request</a>
+    <h3>Request</h3>
+    
+    <div id="glm-admin-member-registrations-account-detail" class="glm-admin-table">
+        <div class="glm-row">
+            <div class="glm-small-4 glm-left">
+                <div class="glm-admin-table">
+                    <div class="glm-row">
+                        <div class="glm-small-12 glm-column">
+                            <h3>Account Submitting Request:</h3>
+                        </div>
+                        <div class="glm-small-12 glm-column">
+                            <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-accounts&glm_action=accounts&option=accountDashboard&account={$acct}">
+                            {$cart.accounts.$acct.fname} {$cart.accounts.$acct.lname}
+                            </a>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="glm-small-4 glm-left">
+                <div class="glm-admin-table">
+                    <div class="glm-row">
+                        <div class="glm-small-12 glm-column">
+                            <h3>Validated:</h3>
+                        </div>
+                        <div class="glm-small-12 glm-column">
+                            {if $cart.request.validated.value}Yes{else}{if $cart.request.validation_message}{$cart.request.validation_message}{else}(not yet validated){/if}{/if}
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+
+{include file='admin/footer.html'}
+
diff --git a/views/admin/registrations/requestHeader.html b/views/admin/registrations/requestHeader.html
new file mode 100644 (file)
index 0000000..4b33685
--- /dev/null
@@ -0,0 +1,7 @@
+<div class="wrap">
+<h2>Event Registrations</h2>
+<h2 class="nav-tab-wrapper">
+    <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests" class="nav-tab{if $option==dashboard} nav-tab-active{/if}">Requests Dashboard</a>
+    <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=requestDashboard" class="nav-tab{if $option==requestDashboard} nav-tab-active{/if}">Selected Request</a>
+</h2>
+<div id="glm-admin-content-container">
diff --git a/views/admin/registrations/requests.html b/views/admin/registrations/requests.html
deleted file mode 100644 (file)
index b2931a0..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-{include file='admin/registrations/header.html'}
-
-{if $errorMsg}
-    <h3 class="glm-error">{$errorMsg}</h3>
-{/if}
-    
-<h3>Registrations Requests List</h3>
-
-        <table class="wp-list-table striped glm-admin-table">
-            <thead>
-                <tr>
-                    <th>ID</th>
-                    <th>First Name</th>
-                    <th>Last Name</th>
-                    <th>Org</th>
-                    <th>City</th>
-                    <th>State</th>
-                </tr>
-            </thead>
-            <tbody>
-    {if $haveRequests}
-        {foreach $requests as $r}
-                <tr>
-                    <td>{$r.id}</a></td>
-                    <td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=edit&requestID={$r.id}">{$r.bill_fname}</td>
-                    <td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=edit&requestID={$r.id}">{$r.bill_lname}</td>
-                    <td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=edit&requestID={$r.id}">{$r.bill_org}</td>
-                    <td>{$r.bill_city}</td>
-                    <td>{$r.bill_state}</td>
-                </tr>
-        {/foreach}
-    {else}
-                <tr class="alternate"><td colspan="2">(no requests listed)</td></tr>
-    {/if}
-            </tbody>
-        </table>
-
-    
-{include file='admin/footer.html'}
-
diff --git a/views/admin/registrations/requestsDashboard.html b/views/admin/registrations/requestsDashboard.html
new file mode 100644 (file)
index 0000000..7016f2b
--- /dev/null
@@ -0,0 +1,40 @@
+{include file='admin/registrations/requestHeader.html'}
+
+{if $errorMsg}
+    <h3 class="glm-error">{$errorMsg}</h3>
+{/if}
+    
+<h3>Registrations Requests List</h3>
+
+        <table class="wp-list-table striped glm-admin-table">
+            <thead>
+                <tr>
+                    <th>ID</th>
+                    <th>First Name</th>
+                    <th>Last Name</th>
+                    <th>Org</th>
+                    <th>City</th>
+                    <th>State</th>
+                </tr>
+            </thead>
+            <tbody>
+    {if $haveRequests}
+        {foreach $requests as $r}
+                <tr>
+                    <td>{$r.id}</a></td>
+                    <td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=requestDashboard&requestID={$r.id}">{$r.bill_fname}</td>
+                    <td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=requestDashboard&requestID={$r.id}">{$r.bill_lname}</td>
+                    <td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-requests&option=requestDashboard&requestID={$r.id}">{$r.bill_org}</td>
+                    <td>{$r.bill_city}</td>
+                    <td>{$r.bill_state}</td>
+                </tr>
+        {/foreach}
+    {else}
+                <tr class="alternate"><td colspan="2">(no requests listed)</td></tr>
+    {/if}
+            </tbody>
+        </table>
+
+    
+{include file='admin/footer.html'}
+