Added more fields to registration events dashboard list.
Added active flag status to specific reg evnet dashboard.
Remvoed local function that is now in main plugin.
Fixed some minor issues with checks as to why a reg event might not show in list.
$this->fields = array(
'id' => $fSave['id'],
'event' => $fSave['event'],
+ 'active' => $fSave['active'],
+ 'event_code' => $fSave['event_code'],
'event_name' => $fSave['event_name'],
'time_specific' => $fSave['time_specific'],
'first_datetime' => $fSave['first_datetime'],
$statusSelected = $_REQUEST['request_status_select'];
}
-/**
- * ******* TEMPORARY - USE SAME FUNCTION IN MAIN PLUGIN WHEN THAT'S UPDATED (less the number 2 at the end) *************
- */
-// require_once GLM_MEMBERS_REGISTRATIONS_MAIN_PLUGIN_PATH.'/classes/glmPluginSupport.php';
-function glmMembersConfigArraySetup2( $configTable, $configNumbTable = false, $configSelectedArray = false)
-{
-
- // Check if config table array exits
- if (!is_array($configTable) || count($configTable) == 0) {
- return false;
- }
-
- // Build base array
- $conf = array();
- foreach ($configTable as $key=>$descr) {
- $conf[$key] = array(
- 'id' => $key,
- 'descr' => $descr,
- 'name' => false,
- 'selected' => false
- );
- }
-
- // If name->number array add that data
- if (is_array($configNumbTable) && count($configNumbTable) > 0) {
- foreach ($configNumbTable as $name=>$key) {
- if (isset($conf[$key])) {
- $conf[$key]['name'] = $name;
- }
- }
- }
-
- // If a selected array is provided, add that data
- if (is_array($configSelectedArray) && count($configSelectedArray) > 0) {
- foreach ($configSelectedArray as $key) {
- if (isset($conf[$key])) {
- $conf[$key]['selected'] = true;
- }
- }
- }
-
- return $conf;
-
-}
-
// Check for an update to the status of a request
if (isset($_REQUEST['option2']) && $_REQUEST['option2'] == 'updateStatus' && isset($_REQUEST['requestId']) && isset($_REQUEST['status'])) {
if ($time['active']['value']) {
$haveActiveFutureTimes = true;
- // If this is a time specific time entry and there's availability
- if ($haveTimeSpecificEvent && $time['attendees_available'] > 0) {
+ // If this is a time specific time entry and there's availability or unlimited
+ if ($haveTimeSpecificEvent && ($time['attendees_available'] > 0 || $time['attendee_max'] == 0)) {
$haveActiveFutureAvailability = true;
}
// Build data for picklist output
$status = $this->config['submission_status'];
-
-/**
- * ******* TEMPORARY - USE SAME FUNCTION IN MAIN PLUGIN WHEN THAT'S UPDATED (less the number 2 at the end) *************
- */
-function glmMembersConfigArraySetup2( $configTable, $configNumbTable = false, $configSelectedArray)
-{
-
- // Check if config table array exits
- if (!is_array($configTable) || count($configTable) == 0) {
- return false;
- }
-
- // Build base array
- $conf = array();
- foreach ($configTable as $key=>$descr) {
- $conf[$key] = array(
- 'id' => $key,
- 'descr' => $descr,
- 'name' => false,
- 'selected' => false
- );
- }
-
- // If name->number array add that data
- if (is_array($configNumbTable) && count($configNumbTable) > 0) {
- foreach ($configNumbTable as $name=>$key) {
- if (isset($conf[$key])) {
- $conf[$key]['name'] = $name;
- }
- }
- }
-
- // If a selected array is provided, add that data
- if (is_array($configSelectedArray) && count($configSelectedArray) > 0) {
- foreach ($configSelectedArray as $key) {
- if (isset($conf[$key])) {
- $conf[$key]['selected'] = true;
- }
- }
- }
-
- return $conf;
-
-}
-
// Build array of status options for view
-$statusOptions = glmMembersConfigArraySetup2($this->config['submission_status'], $this->config['submission_status_numb'], $statusSelected);
+$statusOptions = glmMembersConfigArraySetup($this->config['submission_status'], $this->config['submission_status_numb'], $statusSelected);
// Build where clause for status and add to where parts
// Build data for picklist output
$status = $this->config['submission_status'];
-
- /**
- * ******* TEMPORARY - USE SAME FUNCTION IN MAIN PLUGIN WHEN THAT'S UPDATED (less the number 2 at the end) *************
- */
- function glmMembersConfigArraySetup2( $configTable, $configNumbTable = false, $configSelectedArray)
- {
-
- // Check if config table array exits
- if (!is_array($configTable) || count($configTable) == 0) {
- return false;
- }
-
- // Build base array
- $conf = array();
- foreach ($configTable as $key=>$descr) {
- $conf[$key] = array(
- 'id' => $key,
- 'descr' => $descr,
- 'name' => false,
- 'selected' => false
- );
- }
-
- // If name->number array add that data
- if (is_array($configNumbTable) && count($configNumbTable) > 0) {
- foreach ($configNumbTable as $name=>$key) {
- if (isset($conf[$key])) {
- $conf[$key]['name'] = $name;
- }
- }
- }
-
- // If a selected array is provided, add that data
- if (is_array($configSelectedArray) && count($configSelectedArray) > 0) {
- foreach ($configSelectedArray as $key) {
- if (isset($conf[$key])) {
- $conf[$key]['selected'] = true;
- }
- }
- }
-
- return $conf;
-
- }
-
// Build array of status options for view
- $statusOptions = glmMembersConfigArraySetup2($this->config['submission_status'], $this->config['submission_status_numb'], $statusSelected);
-
+ $statusOptions = glmMembersConfigArraySetup($this->config['submission_status'], $this->config['submission_status_numb'], $statusSelected);
// Build where clause for status and add to where parts
$statusWhere = "(".implode(',', $statusSelected).")";
// Otherwise it should be an event code
} else {
- if ($action)
// Try to get reg event ID
$regEventID = $this->wpdb->get_var("
SELECT id
<div class="glm-row">
<div class="glm-small-12 glm-medium-4 glm-left">
<div class="glm-admin-table">
+ <div class="glm-row">
+ <div class="glm-small-6 glm-column">
+ <h3>{$terms.reg_term_event_cap} Active:</h3>
+ </div>
+ <div class="glm-small-6 glm-column">
+ {$regEvent.active.name}
+ </div>
+ </div>
<div class="glm-row">
<div class="glm-small-6 glm-column">
<h3>{$terms.reg_term_event_cap} Code:</h3>
<div class="glm-small-12 glm-column">
<h3 class="glm-notice">This {$terms.reg_term_event_cap} is Not Displayed in Lists</h3>
</div>
- <div class="glm-small-12 glm-column">
- This {$terms.reg_term_event} is not displayed to users in lists of available
- {$terms.reg_term_registration_plur} {$terms.reg_term_event_plur}.
- </div>
</div>
{/if}
</div>
<tr><th colspan="2" class="reg-event-edit-section"><h2>{$terms.reg_term_event_cap} Location{if $regEvent.fieldData.event} - Using location from {$terms.reg_term_event}{/if}</h2></th></tr>
- {if !$regEvent.fieldData.event}
+ {if $regEvent.fieldData.event}
+ {* If this data is coming from a linked event, supply blank input for these fields. *}
+ <input type="hidden" name="hide_address" value="0">
+ <input type="hidden" name="useMemberLocationCheckbox" value="0">
+ <input type="hidden" name="member" value="0">
+ <input type="hidden" name="location_name" value="">
+ <input type="hidden" name="address" value="">
+ <input type="hidden" name="city" value="0">
+ <input type="hidden" name="state" value="">
+ <input type="hidden" name="region" value="0">
+ <input type="hidden" name="phone" value="">
+ <input type="hidden" name="url" value="">
+ <input type="hidden" name="email" value="">
+ <input type="hidden" name="lat" value="0">
+ <input type="hidden" name="lon" value="0">
+ {else}
<tr>
<th class="glm-nowrap-left-align">Hide Location Address:</th>
<td>
<tr>
<th>ID</th>
<th>{$terms.reg_term_event_cap} Name</th>
- <th>Date Specific?</th>
+ <th>Code</th>
+ <th>Active</th>
+ <th>Date<br>Specific?</th>
<th>Maximum<br>{$terms.reg_term_attendee_plur_cap}</th>
<th>{$terms.reg_term_registered_cap}</th>
<th>Cart<br>Hold</th>
{/if}
<td style="width: 50px;"><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&option=eventDashboard®EventID={$r.id}">{$r.id}</a></td>
<td><a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&option=eventDashboard®EventID={$r.id}">{$r.event_name}</a></td>
+ <td>{$r.event_code}</td>
+ <td>{if $r.active.value}Yes{/if}</td>
<td>{if $r.time_specific.value}Yes{/if}</td>
<td>{$r.total}</td>
<td>{$r.registered}</td>
</div>
{if $haveMessages}
-<div class="glm-registrations-messages glm-reg-warning glm-row" style="clear: all;">
- <i>Please Note:</i>
- <ul>
-{foreach $messages as $m}
- <li>{$m}</li>
-{/foreach}
- </ul>
-</div>
+ <div class="glm-registrations-messages glm-reg-warning glm-row" style="clear: all;">
+ <i>Please Note:</i>
+ <ul>
+ {foreach $messages as $m}
+ <li>{$m}</li>
+ {/foreach}
+ </ul>
+ </div>
{/if}
</div>
{/if}
{if $settings.reg_show_select_by_code}
- <form action="{$thisUrl}?page={$thisPage}" method="get" id="regEventByCode">
- <label>If you know the code for your desired {$terms.reg_term_event}, enter it here.</label><input type="text" name="event" value="" class="glm-form-text-input-short">
- </form>
+
+ <div class="glm-row" style="white-space: nowrap; line-height: 1rem; text-align: center;">
+
+ <form action="{$thisUrl}?page={$thisPage}" method="get" id="regEventByCode">
+ If you have an {$terms.reg_term_event} code, enter it here.
+ <input type="text" name="event" value="" style="width: 10rem; display: inline;">
+ <input type="submit" class="button button-secondary glm-button" style="font-size: .8rem;" name="applyPaymentCode" value="Go to {$terms.reg_term_event}">
+ </form>
+ </div>
+
+
{/if}
{if $haveRegEvents}
{foreach $regEvents as $event}
<!-- EVENT REG ITEM END -->
{/foreach}
{else}
- <center><h3>Sorry, no {$terms.reg_term_event_plur} listed for {$terms.reg_term_registration} at this time.</h3></center>
+ <center>
+ <p style="padding-top: 2em;">
+ Sorry, no {$terms.reg_term_event_plur} listed for {$terms.reg_term_registration} at this time.
+ {if $settings.reg_show_select_by_code}
+ <br>If you have an {$terms.reg_term_event} code you may enter that above.
+ {/if}
+
+ </p>
+ </center>
{/if}
</div>