Added more functionality in registrations admin for account, requests, and events.
'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',
'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'
),
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
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
// 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 );
$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',
// 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',
$namesList = false;
$numbDisplayed = false;
$lastDisplayed = false;
- $registrations = false;
- $haveRegistrations = false;
+ $requests = false;
+ $haveRequests = false;
$registered = false;
$haveRegistered = false;
}
// 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 {
$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
'namesList' => $namesList,
'numbDisplayed' => $numbDisplayed,
'lastDisplayed' => $lastDisplayed,
- 'registrations' => $registrations,
- 'haveRegistrations' => $haveRegistrations,
+ 'requests' => $requests,
+ 'haveRequests' => $haveRequests,
'registered' => $registered,
'haveRegistered' => $haveRegistered,
'reason' => $reason
--- /dev/null
+<?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
+ );
+
+ }
+
+
+}
<?php
/**
* Gaslight Media Members Database
- * Admin Registrations Dashboard
+ * Admin Registrations Events Dashboard
*
* PHP version 5.5
*
*/
// 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
{
/**
* 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
);
+++ /dev/null
-<?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
- );
-
- }
-
-
-}
$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
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';
// Fall through to list if no requestID submitted
// Default is to list requests
+ case 'dashboard':
default:
// Get list of requests
$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
);
// 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;
// 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',
// 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 ) {
);
}
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
- glmMembersAdmin::addNotice( $payment_codes, 'DataBlock', 'Payment Code Data' );
- }
// Compile template data
$templateData = array(
'enable_members' => $enable_members,
'glm-members-admin-menu-registrations-index',
function() {$this->controller('registrations');}
);
-
+/*
add_submenu_page(
'glm-members-admin-menu-members',
- 'Registration Events List',
- ' List',
+ 'Registration Events Dashboard',
+ ' 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',
),
'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
{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'}
<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>
{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">
<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>
{/if}
</form>
+</div>
<script>
jQuery(document).ready(function($){
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) {
{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®EventID={$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®EventID={$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">
{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 of Registration 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} </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®EventID={$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®EventID=" + 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'}
+++ /dev/null
-{include file='admin/registrations/header.html'}
-
-<h3>Registrations Event List</h3>
-
-<h2>Not Built Yet</h2>
-
-{include file='admin/footer.html'}
-
+++ /dev/null
-{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 of Registration 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} </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®EventID={$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®EventID=" + 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'}
--- /dev/null
+{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'}
+
--- /dev/null
+<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">
+++ /dev/null
-{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'}
-
--- /dev/null
+{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'}
+