$registrationCart = false;
$option = 'list';
$errorMsg = false;
+ $view = "events";
// Load registrations support class
require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/registrationsSupport.php';
// Perform selected option
switch ($option) {
+ case 'add':
+ $registration = $this->newEntry();
+ $view = "editEvent";
+ break;
+
+ case 'insert':
+ $registration = $this->insertEntry();
+ if ( $registration['status'] ) {
+ $registrationAdded = true;
+ } else {
+ $registrationAddError = true;
+ }
+ break;
+
+ case 'edit':
+ $registration = $this->editEntry( $this->registrationID );
+ //echo '<pre>$registration: ' . print_r( $registration, true ) . '</pre>';
+ if ( $registration['status'] ) {
+ $haveAccount = true;
+ }
+ //echo '<pre>$registration: ' . print_r( $registration, true ) . '</pre>';
+
+ $view = "editEvent";
+ break;
+
+
+ case 'update':
+ $registration = $this->updateEntry( $this->registrationID );
+
+ if ( $registration['status'] ) {
+ //echo '<pre>$registration: ' . print_r( $registration, true ) . '</pre>';
+ $registrationUpdated = true;
+ // Retrieve the Edit Entry again
+ $registration = $this->editEntry( $this->registrationID );
+ if ( $registration['status'] ) {
+ $haveAccount = true;
+ }
+ } else {
+ $registrationUpdateError = true;
+ }
+
+ break;
+
+ case 'delete':
+ $oldAccount = $this->deleteEntry( $this->registrationID, true );
+ $view = 'registration';
// Check registration and update holds
case 'check':
+ break;
+
+// case 'add':
+//
+//
+// break;
+
+
// $registrationCart = $regSupport->checkRegistrationRegistration($registrationId);
// Display/Edit a registration registration
- case 'edit':
+// case 'edit':
+//
+// break;
// If a registration ID has been supplied
// if ($registrationId) {
return array(
'status' => true,
'modelRedirect' => false,
- 'view' => 'admin/registrations/events.html',
+ 'view' => "admin/registrations/$view.html",
'data' => $templateData
);
--- /dev/null
+
+{include file='admin/registrations/header.html'}
+
+ <div class="glm-right">
+<!-- <p><a href="{$thisUrl}?page={$thisPage}&glm_action=events&option=check&requestID={$cart.request.id}" class="button button-secondary glm-button">Check Reguest & Update Holds</a></p>-->
+ </div>
+
+Here
+
+ {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">
+ <center>
+ <p><a id="deleteAccountCancel" class="button button-primary">Cancel</a></p>
+ <p><input id="deleteAccountSubmit" 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
+ delete all of the data and images associated with this contact.
+ </span>
+ </p>
+ <p>
+ <span class="glm-error">Once deleted, this information will no longer be available and cannot be retrieved!</span>
+ </p>
+ </div>
+ </div>
+ <h2>Edit Account
+-->
+ {else}
+ *** Add new one***
+<!-- {$req = $cart.request}
+
+ <table class="glm-admin-table">
+ <tr>
+ <td>
+ <table class="glm-admin-table glm-account-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">
+ <tr><th><center>Billing Information</center></th></tr>
+ <tr>
+ <td>
+ <table>
+ <tr><th>Name: </th><td>{$req.bill_fname} {$req.bill_lname}{if $req.bill_title}, {$req.bill_title}{/if}</td></tr>
+ {if $req.bill_org}
+ <tr><th>Organization: </th><td>{$req.bill_org}</td></tr>
+ {/if}
+ <tr><th>Address: </th><td>{$req.bill_addr1}</td></tr>
+ {if $req.bill_addr2}
+ <tr><th></th><td>{$req.bill_addr2}</td></tr>
+ {/if}
+ <tr><th></th><td>{$req.bill_city}, {$req.bill_state} {$req.bill_zip} {$req.bill_country}</td></tr>
+ <tr><th>Payment Method: </th><td>{$req.pay_method.name}</td></tr>
+ {if $req.status == 'CC_PAID'}
+ <tr><th>Card Type: </th><td>{$req.cc_type.value}</td></tr>
+ <tr><th>Card Number: </th><td>{$req.cc_numb}</td></tr>
+ <tr><th>Confirmation: </th><td>{$req.cc_conf}</td></tr>
+ {/if}
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ {if $req.notes}
+
+ <td>
+ <table class="glm-admin-table glm-account-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">
+ <tr><th><center>Registrations Selected</center></th></tr>
+ <tr>
+ <td>
+ <table>
+ <tr><th>Event</th><th>Start Date/Time</th><th>Class</th><th>Rate</th><th>Credits<th>Registrants</th><th>Charge</th></tr>
+ {foreach $cart.events as $event}
+ <tr>
+ <td>{$event.event_name}</td><td>{$event.event_datetime.daetime}</td>
+ </tr>
+ {foreach $event.classes as $class}
+ <tr>
+ <td colspan="2"> </td><td>{$class.class_name}</td>
+ </tr>
+ {foreach $class.rates as $rate}
+ <tr>
+ <td colspan="3"> </td><td>{$rate.rate_name}</td><td>{$rate.registrant_credits}</td><td> </td><td align="right">{$rate.base_rate}</td>
+ </tr>
+ {foreach $rate.registrants as $registrant}
+ <tr>
+ <td colspan="5"> </td><td>{$registrant.fname} {$registrant.lname}</td><td align="right">{$rate.per_registrant}</td>
+ </tr>
+ {/foreach}
+ {/foreach}
+ {/foreach}
+ </tr>
+ {/foreach}
+ </table>
+ </td>
+ </tr>
+ </table>
+ -->
+ {/if}
+
+{include file='admin/footer.html'}