/////////////////////////////////////
- $haveRegistrations = false;
- $registrations = false;
- $haveRegistration = false;
- $registrationId = false;
- $registrationCart = false;
- $option = 'list';
- $errorMsg = false;
- $view = "events";
+ $option = 'list';
+ $numbRegistrations = 0;
+ $hasRegistrations = false;
+ $paging = true;
+ $prevStart = false;
+ $nextStart = false;
+ $start = 1;
+ $limit = 20; // Set to the number of listings per page
+ $fromDate = false;
+ $toDate = false;
+ $filterArchived = false;
+ $filterPending = false;
+ $registrations = false;
+ $view = 'events';
+ $registration = false;
+ $haveRegistration = false;
+ $registrationUpdated = false;
+ $registrationUpdateError = false;
+ $registrationAdded = false;
+ $registrationAddError = false;
+ $namesList = false;
+ $numbDisplayed = false;
+ $lastDisplayed = false;
// Load registrations support class
require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/registrationsSupport.php';
$registration = $this->editEntry( $this->registrationID );
//echo '<pre>$registration: ' . print_r( $registration, true ) . '</pre>';
if ( $registration['status'] ) {
- $haveAccount = true;
+ $haveRegistration = true;
}
//echo '<pre>$registration: ' . print_r( $registration, true ) . '</pre>';
// Retrieve the Edit Entry again
$registration = $this->editEntry( $this->registrationID );
if ( $registration['status'] ) {
- $haveAccount = true;
+ $haveRegistration = true;
}
} else {
$registrationUpdateError = true;
break;
case 'delete':
- $oldAccount = $this->deleteEntry( $this->registrationID, true );
+ $oldRegistration = $this->deleteEntry( $this->registrationID, true );
$view = 'registration';
// Check registration and update holds
break;
}
-// echo "<pre>". print_r($registrations, true) . "</pre>";
+ //echo "<pre>". print_r($registration, true) . "</pre>";
+
// Compile template data
$templateData = array(
- 'haveRegistrations' => $haveRegistrations,
- 'registrations' => $registrations,
- 'haveRegistration' => $haveRegistration,
- 'errorMsg' => $errorMsg,
- 'option' => $option
+ 'hasRegistrations' => $hasRegistrations,
+ 'numRegistrations' => ($registrations) ? count($registrations) : 0,
+ 'registrations' => $registrations,
+ 'registration' => $registration,
+ 'limit' => $limit,
+ 'prevStart' => $prevStart,
+ 'nextStart' => $nextStart,
+ 'paging' => $paging,
+ 'fromDate' => $fromDate,
+ 'toDate' => $toDate,
+ 'filterArchived' => $filterArchived,
+ 'filterPending' => $filterPending,
+ 'registrationID' => $this->registrationID,
+ 'haveRegistration' => $haveRegistration,
+ 'registrationUpdated' => $registrationUpdated,
+ 'registrationUpdateError' => $registrationUpdateError,
+ 'option' => $option,
+ 'registrationAdded' => $registrationAdded,
+ 'registrationAddError' => $registrationAddError,
+ 'namesList' => $namesList,
+ 'numbDisplayed' => $numbDisplayed,
+ 'lastDisplayed' => $lastDisplayed,
);
/////////////////////////////////////
{if $option == 'edit' || $option == 'update'}
*** Edit or Update ***<!--
- <a id="deleteAccountButton" class="button button-secondary glm-button glm-right">Delete this Account</a>
- <div id="deleteAccountDialog" class="glm-dialog-box" title="Delete Account">
+ <a id="deleteRegistrationButton" class="button button-secondary glm-button glm-right">Delete this Registration</a>
+ <div id="deleteRegistrationDialog" class="glm-dialog-box" title="Delete Registration">
<center>
- <p><a id="deleteAccountCancel" class="button button-primary">Cancel</a></p>
- <p><input id="deleteAccountSubmit" type="submit" value="Delete this contact"></p>
+ <p><a id="deleteRegistrationCancel" class="button button-primary">Cancel</a></p>
+ <p><input id="deleteRegistrationSubmit" type="submit" value="Delete this contact"></p>
</center>
<div class="glm-item-container">
<p><center><span class="glm-error">WARNING:</span></center></p>
<p>
- <span class="glm-warning">Clicking the "Delete this Account" button above will
+ <span class="glm-warning">Clicking the "Delete this Registration" button above will
delete all of the data and images associated with this contact.
</span>
</p>
</p>
</div>
</div>
- <h2>Edit Account
+ <h2>Edit Registration
-->
+ <h2>Edit an event registration
{else}
*** Add new one***
+ <h2>Add a new event registration
+ {/if}
+
+ {if $registrationUpdated}<span class="glm-notice glm-flash-updated">Registration Updated</span>{/if}
+ {if $registrationUpdateError}<span class="glm-error glm-flash-updated">Registration Update Error</span>{/if}
+ {if $registrationAdded}<span class="glm-notice glm-flash-updated">Registration Added</span>{/if}
+ {if $registrationAddError}<span class="glm-error glm-flash-updated">Registration Add Error</span>{/if}
+ </h2>
+
+
+ <form action="{$thisUrl}?page={$thisPage}" method="post" id="searchForm">
+ <input type="hidden" name="glm_action" value="registrations">
+ {if $haveRegistration}
+ <input type="hidden" name="option" value="update">
+ <input type="hidden" name="registration" value="{$registrationID}">
+ {else}
+ <input type="hidden" name="option" value="insert">
+ {/if}
+ <input type="hidden" name="contact_id" value="0">
+ <table id="glm-table-registration" class="glm-admin-table glm-registration-table">
+
+
+ <tr>
+ <th {if $registration.fieldRequired.event_name} class="glm-required"}{/if}>Event Name</th>
+ <td {if $registration.fieldFail.event_name}class="glm-form-bad-input" data-tabid="glm-event_name"{/if}>
+ <input type="text" name="fname" value="{$registration.fieldData.event_name}" class="glm-form-text-input-medium">
+ {if $registration.fieldFail.event_name}<p>{$registration.fieldFail.event_name}</p>{/if}<br>
+ </td>
+ </tr>
+
+ </table>
+ </form>
+
<!-- {$req = $cart.request}
<table class="glm-admin-table">
<tr>
<td>
- <table class="glm-admin-table glm-account-table glm-admin-table-close-spaced">
+ <table class="glm-admin-table glm-registration-table glm-admin-table-close-spaced">
<tr><th>Request ID: </th><td>{$req.id}</td></tr>
<tr><th>Date Submitted: </th><td>{$req.date_submitted.datetime}</td></tr>
<tr><th>Status: </th><td>{$req.status.name}</td></tr>
</table>
</td>
<td>
- <table id="glm-table-account" class="glm-admin-table glm-account-table glm-admin-table-border glm-admin-table-close-spaced">
+ <table id="glm-table-registration" class="glm-admin-table glm-registration-table glm-admin-table-border glm-admin-table-close-spaced">
<tr><th><center>Billing Information</center></th></tr>
<tr>
<td>
{if $req.notes}
<td>
- <table class="glm-admin-table glm-account-table glm-admin-table-border glm-admin-table-close-spaced">
+ <table class="glm-admin-table glm-registration-table glm-admin-table-border glm-admin-table-close-spaced">
<tr><th><center>Notes</center></th></tr>
<tr><td>{$req.notes}</td></tr>
</table>
</td>
{/if}
</tr>
- <table class="glm-admin-table glm-account-table glm-admin-table-border glm-admin-table-close-spaced">
+ <table class="glm-admin-table glm-registration-table glm-admin-table-border glm-admin-table-close-spaced">
<tr><th><center>Registrations Selected</center></th></tr>
<tr>
<td>
</tr>
</table>
-->
- {/if}
{include file='admin/footer.html'}