From 3d9d6d738db2eed600727d7fe3360e0b349ea620 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 13 Nov 2017 15:51:30 -0500 Subject: [PATCH] Redo registration form. Update on add me button Removing the add me button. Have to re-think about that one now. Redid the registration form for the glm grid. Need to deal with password errors if they don't get format of password correct. --- css/front.css | 8 +- js/frontRegApp.js | 61 +++++++-------- js/models/front/regClass.js | 27 +++---- js/views/front/regClass.js | 20 ++--- js/views/front/regTime.js | 14 ++-- views/front/registrations/register.html | 84 +++++++++++++-------- views/front/registrations/registration.html | 10 --- 7 files changed, 120 insertions(+), 104 deletions(-) diff --git a/css/front.css b/css/front.css index 6043a8c..aff53f4 100644 --- a/css/front.css +++ b/css/front.css @@ -208,7 +208,7 @@ div.glm-reg-register div { clear: both; } div.glm-reg-register input { - width: 48% !important; + /* width: 48% !important; */ margin-right: 5px; float: left; } @@ -221,9 +221,9 @@ div.glm-reg-register div { /*{{{ Errors */ span.glm-error { - position: absolute; - bottom: -56px; - left: 0px; + /* position: absolute; */ + top-margin: -56px; + /* left: 0px; */ color: red; font-size: 10px; } diff --git a/js/frontRegApp.js b/js/frontRegApp.js index c2cc602..262d514 100644 --- a/js/frontRegApp.js +++ b/js/frontRegApp.js @@ -114,19 +114,20 @@ app.Models.Front.RegClass = Backbone.Model.extend({ // }, // Check to see if the current login user in the list of registrants - hasMe: function() { - if ( loginAccount ) { - var foundMe = this.registrants.findWhere({ account: loginAccount.get( 'id' ) }); - if ( foundMe ) { - return true; - } else { - return false; - } - return true; - } else { - return false; - } - }, + // hasMe: function() { + // return false; + // if ( loginAccount ) { + // var foundMe = this.registrants.findWhere({ account: loginAccount.get( 'id' ) }); + // if ( foundMe ) { + // return true; + // } else { + // return false; + // } + // return true; + // } else { + // return false; + // } + // }, }); @@ -552,9 +553,9 @@ app.Views.Front.RegClass = Backbone.View.extend({ if ( loginAccount === '' ) { this.$('.glm-add-account').hide(); } - if ( loginAccount != '' && this.model.hasMe() ) { - this.$('.glm-add-account').hide(); - } + // if ( loginAccount != '' && this.model.hasMe() ) { + // this.$('.glm-add-account').hide(); + // } if ( !app.timeSpecific ) { this.$('.glm-add-new-account').show(); } else { @@ -741,13 +742,13 @@ app.Views.Front.RegClass = Backbone.View.extend({ // this.newRegAccount.destroy(); this.newRegAccountView.remove(); // app.calendar = false; - if ( loginAccount != '' && this.model.hasMe() ) { - this.$('.glm-add-account').hide(); - // console.log('hiding'); - } else if ( loginAccount != '' ) { - this.$('.glm-add-account').show(); - // console.log('showing'); - } + // if ( loginAccount != '' && this.model.hasMe() ) { + // this.$('.glm-add-account').hide(); + // // console.log('hiding'); + // } else if ( loginAccount != '' ) { + // this.$('.glm-add-account').show(); + // // console.log('showing'); + // } }, addNewAccount: function(){ @@ -1117,13 +1118,13 @@ app.Views.Front.RegTime = Backbone.View.extend({ // this.newRegAccount.destroy(); this.newRegAccountView.remove(); // app.calendar = false; - if ( loginAccount != '' && this.model.hasMe() ) { - this.$('.glm-add-account').hide(); - // console.log('hiding'); - } else if ( loginAccount != '' ) { - this.$('.glm-add-account').show(); - // console.log('showing'); - } + // if ( loginAccount != '' && this.model.hasMe() ) { + // this.$('.glm-add-account').hide(); + // // console.log('hiding'); + // } else if ( loginAccount != '' ) { + // this.$('.glm-add-account').show(); + // // console.log('showing'); + // } }, addOne: function( item ){ diff --git a/js/models/front/regClass.js b/js/models/front/regClass.js index 8574212..a45cb02 100644 --- a/js/models/front/regClass.js +++ b/js/models/front/regClass.js @@ -29,18 +29,19 @@ app.Models.Front.RegClass = Backbone.Model.extend({ // }, // Check to see if the current login user in the list of registrants - hasMe: function() { - if ( loginAccount ) { - var foundMe = this.registrants.findWhere({ account: loginAccount.get( 'id' ) }); - if ( foundMe ) { - return true; - } else { - return false; - } - return true; - } else { - return false; - } - }, + // hasMe: function() { + // return false; + // if ( loginAccount ) { + // var foundMe = this.registrants.findWhere({ account: loginAccount.get( 'id' ) }); + // if ( foundMe ) { + // return true; + // } else { + // return false; + // } + // return true; + // } else { + // return false; + // } + // }, }); diff --git a/js/views/front/regClass.js b/js/views/front/regClass.js index c617384..d5e4545 100644 --- a/js/views/front/regClass.js +++ b/js/views/front/regClass.js @@ -84,9 +84,9 @@ app.Views.Front.RegClass = Backbone.View.extend({ if ( loginAccount === '' ) { this.$('.glm-add-account').hide(); } - if ( loginAccount != '' && this.model.hasMe() ) { - this.$('.glm-add-account').hide(); - } + // if ( loginAccount != '' && this.model.hasMe() ) { + // this.$('.glm-add-account').hide(); + // } if ( !app.timeSpecific ) { this.$('.glm-add-new-account').show(); } else { @@ -273,13 +273,13 @@ app.Views.Front.RegClass = Backbone.View.extend({ // this.newRegAccount.destroy(); this.newRegAccountView.remove(); // app.calendar = false; - if ( loginAccount != '' && this.model.hasMe() ) { - this.$('.glm-add-account').hide(); - // console.log('hiding'); - } else if ( loginAccount != '' ) { - this.$('.glm-add-account').show(); - // console.log('showing'); - } + // if ( loginAccount != '' && this.model.hasMe() ) { + // this.$('.glm-add-account').hide(); + // // console.log('hiding'); + // } else if ( loginAccount != '' ) { + // this.$('.glm-add-account').show(); + // // console.log('showing'); + // } }, addNewAccount: function(){ diff --git a/js/views/front/regTime.js b/js/views/front/regTime.js index a97baaa..7f4e5fb 100644 --- a/js/views/front/regTime.js +++ b/js/views/front/regTime.js @@ -117,13 +117,13 @@ app.Views.Front.RegTime = Backbone.View.extend({ // this.newRegAccount.destroy(); this.newRegAccountView.remove(); // app.calendar = false; - if ( loginAccount != '' && this.model.hasMe() ) { - this.$('.glm-add-account').hide(); - // console.log('hiding'); - } else if ( loginAccount != '' ) { - this.$('.glm-add-account').show(); - // console.log('showing'); - } + // if ( loginAccount != '' && this.model.hasMe() ) { + // this.$('.glm-add-account').hide(); + // // console.log('hiding'); + // } else if ( loginAccount != '' ) { + // this.$('.glm-add-account').show(); + // // console.log('showing'); + // } }, addOne: function( item ){ diff --git a/views/front/registrations/register.html b/views/front/registrations/register.html index eb662e5..91455c4 100644 --- a/views/front/registrations/register.html +++ b/views/front/registrations/register.html @@ -4,36 +4,60 @@
-

Register New Account

-
- {$terms.reg_term_contact_information} -
-
- - {if $emailError} - {$emailError} - {/if} - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
+
+
+

Register New Account

+
+
+ {if $emailError} {$emailError} {/if} +
+
+
+
+
+
+ {if $passwordError} {$passwordError} {/if} +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/views/front/registrations/registration.html b/views/front/registrations/registration.html index 3c9b562..dca1bf5 100644 --- a/views/front/registrations/registration.html +++ b/views/front/registrations/registration.html @@ -47,13 +47,6 @@
<%= name %> - <%= reg_count %> - <% if ( reg_count == 1 ) { %> - {/literal}{$terms.reg_term_attendee_cap}{literal} - <% } else { %> - {/literal}{$terms.reg_term_attendee_plur_cap}{literal} - <% } %> -
<%- descr %>
@@ -75,9 +68,6 @@
  - <% if ( loggedIn ) { %> - - <% } %>
-- 2.17.1