Move login register and forgot into separate pages.
+/* Event Registration Edit Page */
.glm-reg-event-list {
width: 100%;
padding: 0;
label.registrant-label {
width: 80%;
}
-div.glm-reg-login {
- background-color: white;
- border: solid 1px black;
- padding: 2rem;
- width: 30rem;
- position: absolute;
- top: 10vh;
- left: 10vw;
-}
-div.glm-reg-login h4 {
- color: black;
-}
-div.glm-reg-register {
- background-color: white;
- border: solid 1px black;
- padding: 2rem;
- width: 30rem;
- position: absolute;
- top: 10vh;
- left: 10vw;
- z-index: 999;
-}
-div.glm-reg-register div {
- clear: both;
-}
-div.glm-reg-register input {
- width: 48% !important;
- margin-right: 5px;
- float: left;
-}
-div.glm-reg-register input.error {
- border: 2px solid red !important;
-}
+
.reg-class-detail {
/* display: none; */
}
.glm-registrant-edit {
cursor: pointer;
}
+
+/* Login Page */
+div.glm-reg-login {
+ background-color: white;
+ border: solid 1px black;
+ padding: 2rem;
+ width: 30rem;
+}
+div.glm-reg-login h4 {
+ color: black;
+}
+.accountLogin {
+ padding: .5rem 1rem;
+}
+.forgotLogin {
+ float: right;
+}
+div.glm-reg-forgot {
+ background-color: white;
+ border: solid 1px black;
+ padding: 2rem;
+ width: 30rem;
+}
+div.glm-reg-forgot h4 {
+ color: black;
+}
+/* New register account form */
+div.glm-reg-register {
+ background-color: white;
+ border: solid 1px black;
+ padding: 2rem;
+ width: 30rem;
+}
+div.glm-reg-register div {
+ clear: both;
+}
+div.glm-reg-register input {
+ width: 48% !important;
+ margin-right: 5px;
+ float: left;
+}
+div.glm-reg-register input.error {
+ border: 2px solid red !important;
+}
+div.glm-reg-register div {
+ position: relative;
+}
+span.glm-error {
+ position: absolute;
+ bottom: -56px;
+ left: 0px;
+ color: red;
+ font-size: 10px;
+}
render: function(){
// Check to see if there's a login
if ( loginAccount ) {
- jQuery('#appLogin').hide();
+ // jQuery('#appLogin').hide();
jQuery('#register').hide();
- this.accountView = new app.Views.Front.Account({ model: loginAccount });
- this.$el.append( this.accountView.render().el );
+ // this.accountView = new app.Views.Front.Account({ model: loginAccount });
+ // this.$el.append( this.accountView.render().el );
}
this.$el.append( this.event.render().el );
return this;
},
events: {
- 'click #appLogin': 'login',
+ // 'click #appLogin': 'login',
'click #glm-reg-cart-continue': 'continue',
- 'click #accountLogin': 'loginToAccount',
- 'click #accountRegister': 'registerNewAccount',
- 'click #accountLogout': 'logout',
- 'click #register': 'register',
+ // 'click #accountLogin': 'loginToAccount',
+ // 'click #accountRegister': 'registerNewAccount',
+ // 'click #accountLogout': 'logout',
+ // 'click #register': 'register',
},
continue: function(){
// Need to update the cart
},
- logout: function(){
- // Send data to Logout
- jQuery.ajax({
- context: this,
- url: appAccountUrl,
- dataType: 'json',
- data: 'option=logout'
- })
- .done(function( msg ){
- // Here we can update.
- loginAccount = '';
- this.accountView.remove();
- this.render();
- this.event.model.classes.map(function(item){
- item.set({ loggedIn: false });
- });
- jQuery('#appLogin').show();
- // Need to reload the page now
- window.location.href = thisPageUrl;
- })
- .fail(function(msg){
- console.log('Fail:');
- console.log( msg );
- });
- },
+ // logout: function(){
+ // // Send data to Logout
+ // jQuery.ajax({
+ // context: this,
+ // url: appAccountUrl,
+ // dataType: 'json',
+ // data: 'option=logout'
+ // })
+ // .done(function( msg ){
+ // // Here we can update.
+ // loginAccount = '';
+ // this.accountView.remove();
+ // this.render();
+ // this.event.model.classes.map(function(item){
+ // item.set({ loggedIn: false });
+ // });
+ // jQuery('#appLogin').show();
+ // // Need to reload the page now
+ // window.location.href = thisPageUrl;
+ // })
+ // .fail(function(msg){
+ // console.log('Fail:');
+ // console.log( msg );
+ // });
+ // },
loginToAccount: function(){
this.$userInput = jQuery('.login');
});
},
- login: function(){
- this.loginModel = new app.Models.Front.Login();
- this.loginView = new app.Views.Front.Login({ model: this.loginModel });
- this.$el.append( this.loginView.render().el );
- jQuery('#accountHeader').hide();
- },
+ // login: function(){
+ // this.loginModel = new app.Models.Front.Login();
+ // this.loginView = new app.Views.Front.Login({ model: this.loginModel });
+ // this.$el.append( this.loginView.render().el );
+ // jQuery('#accountHeader').hide();
+ // },
- register: function(){
- this.registerModel = new app.Models.Front.Register();
- this.registerView = new app.Views.Front.Register({ model: this.registerModel });
- this.$el.append( this.registerView.render().el );
- jQuery('#accountHeader').hide();
- },
+ // register: function(){
+ // this.registerModel = new app.Models.Front.Register();
+ // this.registerView = new app.Views.Front.Register({ model: this.registerModel });
+ // this.$el.append( this.registerView.render().el );
+ // jQuery('#accountHeader').hide();
+ // },
});
// If the model is already there then don't add
var findById = this.model.registrants.where({account: accountId});
if ( findById.length === 0 ) {
- this.model.registrants.create({
- option: 'add',
+ console.log( findById.length );
+ // create the regRequestRegistrant for the account
+ registrant = new app.Models.Front.RegRequestRegistrant({
account: accountId,
reg_request: regRequest.id,
reg_event: this.model.get( 'reg_event' ),
fname: loginAccount.get('fname'),
lname: loginAccount.get('lname')
});
+ // this.newRegAccount = new app.Models.Front.RegRequestRegistrant();
+ this.newRegAccountView = new app.Views.Front.RegistrantForm({model: registrant});
+ this.$el.append( this.newRegAccountView.render().el );
+ if ( app.timeSpecific ) {
+ app.calendar = app.initFullCalendar( true, false );
+ // console.log('called app.initFullCalendar()');
+ }
}
}
}
render: function(){
// Check to see if there's a login
if ( loginAccount ) {
- jQuery('#appLogin').hide();
+ // jQuery('#appLogin').hide();
jQuery('#register').hide();
- this.accountView = new app.Views.Front.Account({ model: loginAccount });
- this.$el.append( this.accountView.render().el );
+ // this.accountView = new app.Views.Front.Account({ model: loginAccount });
+ // this.$el.append( this.accountView.render().el );
}
this.$el.append( this.event.render().el );
return this;
},
events: {
- 'click #appLogin': 'login',
+ // 'click #appLogin': 'login',
'click #glm-reg-cart-continue': 'continue',
- 'click #accountLogin': 'loginToAccount',
- 'click #accountRegister': 'registerNewAccount',
- 'click #accountLogout': 'logout',
- 'click #register': 'register',
+ // 'click #accountLogin': 'loginToAccount',
+ // 'click #accountRegister': 'registerNewAccount',
+ // 'click #accountLogout': 'logout',
+ // 'click #register': 'register',
},
continue: function(){
// Need to update the cart
},
- logout: function(){
- // Send data to Logout
- jQuery.ajax({
- context: this,
- url: appAccountUrl,
- dataType: 'json',
- data: 'option=logout'
- })
- .done(function( msg ){
- // Here we can update.
- loginAccount = '';
- this.accountView.remove();
- this.render();
- this.event.model.classes.map(function(item){
- item.set({ loggedIn: false });
- });
- jQuery('#appLogin').show();
- // Need to reload the page now
- window.location.href = thisPageUrl;
- })
- .fail(function(msg){
- console.log('Fail:');
- console.log( msg );
- });
- },
+ // logout: function(){
+ // // Send data to Logout
+ // jQuery.ajax({
+ // context: this,
+ // url: appAccountUrl,
+ // dataType: 'json',
+ // data: 'option=logout'
+ // })
+ // .done(function( msg ){
+ // // Here we can update.
+ // loginAccount = '';
+ // this.accountView.remove();
+ // this.render();
+ // this.event.model.classes.map(function(item){
+ // item.set({ loggedIn: false });
+ // });
+ // jQuery('#appLogin').show();
+ // // Need to reload the page now
+ // window.location.href = thisPageUrl;
+ // })
+ // .fail(function(msg){
+ // console.log('Fail:');
+ // console.log( msg );
+ // });
+ // },
loginToAccount: function(){
this.$userInput = jQuery('.login');
});
},
- login: function(){
- this.loginModel = new app.Models.Front.Login();
- this.loginView = new app.Views.Front.Login({ model: this.loginModel });
- this.$el.append( this.loginView.render().el );
- jQuery('#accountHeader').hide();
- },
+ // login: function(){
+ // this.loginModel = new app.Models.Front.Login();
+ // this.loginView = new app.Views.Front.Login({ model: this.loginModel });
+ // this.$el.append( this.loginView.render().el );
+ // jQuery('#accountHeader').hide();
+ // },
- register: function(){
- this.registerModel = new app.Models.Front.Register();
- this.registerView = new app.Views.Front.Register({ model: this.registerModel });
- this.$el.append( this.registerView.render().el );
- jQuery('#accountHeader').hide();
- },
+ // register: function(){
+ // this.registerModel = new app.Models.Front.Register();
+ // this.registerView = new app.Views.Front.Register({ model: this.registerModel });
+ // this.$el.append( this.registerView.render().el );
+ // jQuery('#accountHeader').hide();
+ // },
});
// If the model is already there then don't add
var findById = this.model.registrants.where({account: accountId});
if ( findById.length === 0 ) {
- this.model.registrants.create({
- option: 'add',
+ console.log( findById.length );
+ // create the regRequestRegistrant for the account
+ registrant = new app.Models.Front.RegRequestRegistrant({
account: accountId,
reg_request: regRequest.id,
reg_event: this.model.get( 'reg_event' ),
fname: loginAccount.get('fname'),
lname: loginAccount.get('lname')
});
+ // this.newRegAccount = new app.Models.Front.RegRequestRegistrant();
+ this.newRegAccountView = new app.Views.Front.RegistrantForm({model: registrant});
+ this.$el.append( this.newRegAccountView.render().el );
+ if ( app.timeSpecific ) {
+ app.calendar = app.initFullCalendar( true, false );
+ // console.log('called app.initFullCalendar()');
+ }
}
}
}
}
break;
+
case 'logout':
unset(
$_SESSION['LoginAccount'],
);
$return = array( 'valid' => false );
break;
+
case 'login':
$username = filter_var( $_REQUEST['username'], FILTER_SANITIZE_STRING );
$password = filter_var( $_REQUEST['password'], FILTER_SANITIZE_STRING );
'cartId' => $cartId,
'haveCart' => $haveCart,
'cart' => $this->cart,
- 'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/'
+ 'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/',
+ 'loggedIn' => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false,
);
//echo "<pre>".print_r($templateData,1)."</pre>";
--- /dev/null
+<?php
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegEvent.php';
+
+ class GlmMembersFront_registrations_forgot
+{
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+
+ 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)
+ {
+ $view = 'forgot';
+ $message = '';
+
+ // Check for $option
+ $option = ( isset( $_REQUEST['option'] ) ) ? filter_var( $_REQUEST['option'], FILTER_SANITIZE_STRING) : null;
+ switch ( $option ) {
+ case 'submit':
+ echo '<pre>$_REQUEST: ' . print_r( $_REQUEST, true ) . '</pre>';
+ break;
+ default:
+ break;
+ }
+
+ // Compile template data
+ $templateData = array(
+ 'message' => $message,
+ 'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/',
+ 'loggedIn' => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false,
+ );
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'front/registrations/' . $view . '.html',
+ 'data' => $templateData
+ );
+
+ }
+ }
}
// Make sure the specified page is valid or default to "list"
- if (!in_array($page, array('list', 'registration', 'cart', 'checkout', 'summary', 'login', 'account'))) {
+ if (!in_array($page, array(
+ 'list',
+ 'registration',
+ 'cart',
+ 'checkout',
+ 'summary',
+ 'login',
+ 'account',
+ 'forgot',
+ 'register',
+ ))) {
$page = 'list';
}
'nextStart' => $nextStart,
'start' => $start,
'limit' => $limit,
+ 'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/',
+ 'loggedIn' => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false,
);
+
// Return status, any suggested view, and any data to controller
return array(
'status' => true,
--- /dev/null
+<?php
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegEvent.php';
+
+ class GlmMembersFront_registrations_login
+{
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+
+ 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)
+ {
+ $view = 'login';
+ $message = '';
+
+ // Check for $option
+ $option = ( isset( $_REQUEST['option'] ) ) ? filter_var( $_REQUEST['option'], FILTER_SANITIZE_STRING) : null;
+ switch ( $option ) {
+ case 'logout':
+ unset(
+ $_SESSION['LoginAccount'],
+ $_SESSION['glm_reg_cart_id']
+ );
+ wp_redirect( GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/' );
+ break;
+ case 'submit':
+ // check for password and email match
+ $username = filter_var( $_REQUEST['username'], FILTER_SANITIZE_STRING );
+ $password = filter_var( $_REQUEST['password'], FILTER_SANITIZE_STRING );
+ // Check accounts for ones that match
+ $returnData = $this->wpdb->get_row(
+ $this->wpdb->prepare(
+ "SELECT id,password,fname,lname
+ FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account
+ WHERE email = %s
+ AND active = true",
+ $username
+ ),
+ ARRAY_A
+ );
+ $returnPassword = $returnData['password'];
+ $returnId = $returnData['id'];
+ if ( $returnPassword == crypt( $password, $returnPassword ) ) {
+ // Add the user to the php session
+ $_SESSION['LoginAccount'] = array(
+ 'id' => $returnId,
+ 'email' => $username,
+ 'fname' => $returnData['fname'],
+ 'lname' => $returnData['lname'],
+ );
+ wp_redirect( GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/' );
+ } else {
+ $message = 'Login Fail!';
+ }
+ break;
+ default:
+ break;
+ }
+
+ // Compile template data
+ $templateData = array(
+ 'message' => $message,
+ 'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/',
+ 'loggedIn' => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false,
+ );
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'front/registrations/' . $view . '.html',
+ 'data' => $templateData
+ );
+
+ }
+ }
--- /dev/null
+<?php
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegEvent.php';
+
+ class GlmMembersFront_registrations_register
+{
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+
+ 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)
+ {
+ $view = 'register';
+ $emailError = '';
+ // Create dummy reg array
+ $reg = array(
+ 'fname' => '',
+ 'lname' => '',
+ 'addr1' => '',
+ 'addr2' => '',
+ 'city' => '',
+ 'state' => '',
+ 'zip' => '',
+ 'country' => '',
+ );
+
+ // Check for $option
+ $option = ( isset( $_REQUEST['option'] ) ) ? filter_var( $_REQUEST['option'], FILTER_SANITIZE_STRING) : null;
+
+ switch ( $option ) {
+ case 'submit':
+ $email = filter_var( $_REQUEST['email'], FILTER_VALIDATE_EMAIL );
+ $password = filter_var( $_REQUEST['password'], FILTER_SANITIZE_STRING );
+ $fname = filter_var( $_REQUEST['fname'], FILTER_SANITIZE_STRING );
+ $lname = filter_var( $_REQUEST['lname'], FILTER_SANITIZE_STRING );
+ $addr1 = filter_var( $_REQUEST['addr1'], FILTER_SANITIZE_STRING );
+ $addr2 = filter_var( $_REQUEST['addr2'], FILTER_SANITIZE_STRING );
+ $city = filter_var( $_REQUEST['city'], FILTER_SANITIZE_STRING );
+ $state = filter_var( $_REQUEST['state'], FILTER_SANITIZE_STRING );
+ $zip = filter_var( $_REQUEST['zip'], FILTER_SANITIZE_STRING );
+ $country = filter_var( $_REQUEST['country'], FILTER_SANITIZE_STRING );
+ if ( $email ) {
+ $accountId = $this->wpdb->get_var(
+ $this->wpdb->prepare(
+ "SELECT id
+ FROM " . GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . "account
+ WHERE email = %s",
+ $email
+ )
+ );
+ if ( $accountId ) {
+ // Already an account with that email address
+ $emailError = 'Already an account with that email address!';
+ $reg = array(
+ 'fname' => $fname,
+ 'lname' => $lname,
+ 'addr1' => $addr1,
+ 'addr2' => $addr2,
+ 'city' => $city,
+ 'state' => $state,
+ 'zip' => $zip,
+ 'country' => $country,
+ );
+ break;
+ }
+ // If they reach here then create a new account record
+ $this->wpdb->insert(
+ GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_PREFIX . 'account',
+ array(
+ 'date_created' => date('Y-m-d'),
+ 'active' => 1,
+ 'email' => $email,
+ 'password' => crypt( $password ),
+ 'fname' => $fname,
+ 'lname' => $lname,
+ 'addr1' => $addr1,
+ 'addr2' => $addr2,
+ 'city' => $city,
+ 'state' => $state,
+ 'zip' => $zip,
+ 'country' => $country,
+ ),
+ '%s'
+ );
+ $accountId = $this->wpdb->insert_id;
+ // Add the user to the php session
+ $_SESSION['LoginAccount'] = array(
+ 'id' => $accountId,
+ 'email' => $email,
+ 'fname' => $fname,
+ 'lname' => $lname,
+ );
+ wp_redirect( GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/' );
+ }
+ break;
+ default:
+ break;
+ }
+
+ // Compile template data
+ $templateData = array(
+ 'reg' => $reg,
+ 'emailError' => $emailError,
+ 'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/',
+ 'loggedIn' => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false,
+ );
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'front/registrations/' . $view . '.html',
+ 'data' => $templateData
+ );
+
+ }
+ }
// Need to refresh the page
}
+ // echo '<pre>$cart: ' . print_r( $cart, true ) . '</pre>';
// If we have a good cart, convert to JSON for view
if ($haveCart) {
'loginAccount' => $loginAccount,
'termsJSON' => $termsJSON,
'regJSON' => json_encode( $registrants, JSON_NUMERIC_CHECK ),
+ 'regUrl' => GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/',
+ 'loggedIn' => ( isset( $_SESSION['LoginAccount'] ) ) ? $_SESSION['LoginAccount']: false,
);
// Return status, any suggested view, and any data to controller
return array(
--- /dev/null
+{include file='front/registrations/header.html'}
+<form action="{$regUrl}?page=forgot" method="post">
+ <input type="hidden" name="option" value="submit">
+ <input type="hidden" name="page" value="forgot">
+ <div class="glm-reg-forgot">
+ <h4>Forgot Password</h4>
+ {if $message}
+ <span style="color: red;">{$message}</span>
+ {/if}
+ <input class="login" placeholder="Email Address" type="email" name="username" value="">
+ <input type="submit" class="accountLogin" value="Reset Password">
+ </div>
+</form>
+<div id="accountHeader">
+ {if $loggedIn}
+ Logged in as {$loggedIn.fname} {$loggedIn.lname}
+ <a href="{$regUrl}?page=login&option=logout">Logout</a>
+ {else}
+ <a id="appLogin" href="{$regUrl}?page=login">Login</a>
+ <a id="register" href="{$regUrl}?page=register">Register</a>
+ {/if}
+</div>
<div>
<a href="{$regUrl}">Register for Another Event</a> (should be a button)
</div>
+{include file='front/registrations/header.html'}
<div class="glm-reg-event-list">
{foreach $regEvents as $event}
<div class="glm-reg-event-item clearfix">
+{include file='front/registrations/header.html'}
+<form action="{$regUrl}?page=login" method="post">
+ <input type="hidden" name="option" value="submit">
+ <input type="hidden" name="page" value="login">
+ <div class="glm-reg-login">
+ <h4>Login</h4>
+ {if $message}
+ <span style="color: red;">{$message}</span>
+ {/if}
+ <input class="login" placeholder="Email Address" type="email" name="username" value="">
+ <input class="password" placeholder="Password" type="password" name="password" value="">
+ <input type="submit" class="accountLogin" value="Login">
+ <a class="forgotLogin" href="{$regUrl}?page=forgot">Forgot Password</a>
+ </div>
+</form>
--- /dev/null
+{include file='front/registrations/header.html'}
+<form action="{$regUrl}?page=register" method="post">
+ <input type="hidden" name="option" value="submit">
+ <input type="hidden" name="page" value="register">
+ <div class="glm-reg-register">
+
+ <h3>Register New Account</h3>
+ <div>
+ {$terms.reg_term_contact_information}
+ </div>
+ <div>
+ <input type="email" class="account_email" placeholder="*Email Address" name="email" value="" required>
+ {if $emailError}
+ <span class="glm-error">{$emailError}</span>
+ {/if}
+ <input type="password" class="account_password" placeholder="*Password" name="password" value="" required>
+ </div>
+ <div>
+ <input class="account_fname" placeholder="*First Name" name="fname" value="{$reg.fname}" required>
+ <input class="account_lname" placeholder="*Last Name" name="lname" value="{$reg.lname}" required>
+ </div>
+ <div>
+ <input class="account_addr1" placeholder="Address 1" name="addr1" value="{$reg.addr1}" required>
+ <input class="account_addr2" placeholder="Address 2" name="addr2" value="{$reg.addr2}">
+ </div>
+ <div>
+ <input class="account_city" placeholder="City" name="city" value="{$reg.city}" required>
+ <input class="account_state" placeholder="State" name="state" value="{$reg.state}" required>
+ </div>
+ <div>
+ <input class="account_zip" placeholder="Zip/Postal Code" name="zip" value="{$reg.zip}" required>
+ <input class="account_country" placeholder="Country" name="country" value="{$reg.country}">
+ </div>
+ <div>
+ <input type="submit" id="accountRegister" value="Register">
+ </div>
+
+ </div>
+</form>
</div>
<div class="reg-class-detail">
<div><%- descr %></div>
- <div>Current Rate: <%= reg_rate_name %></div>
- <div>Base Price: <%= reg_rate_base_price %></div>
- <div>Per {/literal}{$terms.reg_term_attendee_cap}{literal}: <%= reg_rate_per_reg %></div>
<% if ( loggedIn ) { %>
<button class="glm-add-account tiny">Add Me</button>
<% } %>
{/literal}{$terms.reg_term_contact_information}{literal}
</div>
<div>
- <input class="add_reg_fname" placeholder="First Name">
- <input class="add_reg_lname" placeholder="Last Name">
+ <input class="add_reg_fname" placeholder="First Name" value="<%- fname %>">
+ <input class="add_reg_lname" placeholder="Last Name" value="<%- lname %>">
</div>
<div>
<input class="add_reg_email" placeholder="Email Address" value="<%- email %>">
(Email is optional)
</div>
<div>
- <input class="add_reg_addr1" placeholder="Address 1">
- <input class="add_reg_addr2" placeholder="Address 2">
+ <input class="add_reg_addr1" placeholder="Address 1" value="<%- addr1 %>">
+ <input class="add_reg_addr2" placeholder="Address 2" value="<%- addr2 %>">
</div>
<div>
- <input class="add_reg_city" placeholder="City">
- <input class="add_reg_state" placeholder="State">
+ <input class="add_reg_city" placeholder="City" value="<%- city %>">
+ <input class="add_reg_state" placeholder="State" value="<%- state %>">
</div>
<div>
- <input class="add_reg_zip" placeholder="Zip/Postal Code">
- <input class="add_reg_country" placeholder="Country">
+ <input class="add_reg_zip" placeholder="Zip/Postal Code" value="<%- zip %>">
+ <input class="add_reg_country" placeholder="Country" value="<%- country %>">
</div>
{/literal}{if $regEvent.time_specific.value}
<div>
<input class="reg_lname" placeholder="Last Name" value="<%- lname %>">
</div>
<div>
- <input class="reg_email" placeholder="Email Address" value="<%- email %>" disabled>
+ <input class="reg_email" placeholder="Email Address" value="<%- email %>"<% if ( email ) { %> disabled <% } %>>
(Email is optional)
</div>
<div>
{/literal}
<div class="glm-reg-event-list" id="regApp">
<h1>{$terms.reg_term_registrations_name}</h1>
- <div id="accountHeader">
- <a id="appLogin">Login</a>
- <a id="register">Register</a>
- </div>
+ {include file='front/registrations/header.html'}
</div>
{* Bootstrap the models needed on page load *}
{* Need to have RegEvent model created *}