Redo registration form. Update on add me button
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 13 Nov 2017 20:51:30 +0000 (15:51 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 13 Nov 2017 20:51:30 +0000 (15:51 -0500)
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
js/frontRegApp.js
js/models/front/regClass.js
js/views/front/regClass.js
js/views/front/regTime.js
views/front/registrations/register.html
views/front/registrations/registration.html

index 6043a8c..aff53f4 100644 (file)
@@ -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;
 }
index c2cc602..262d514 100644 (file)
@@ -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 ){
index 8574212..a45cb02 100644 (file)
@@ -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;
+    //     }
+    // },
 
 });
index c617384..d5e4545 100644 (file)
@@ -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(){
index a97baaa..7f4e5fb 100644 (file)
@@ -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 ){
index eb662e5..91455c4 100644 (file)
@@ -4,36 +4,60 @@
     <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 class="glm-row">
+            <div class="glm-columns glm-small-12 glm-large-12">
+                <h3>Register New Account</h3>
+                <div class="glm-row">
+                    <div class="glm-columns glm-large-6 glm-small-12"><label style="color:red;">Email Address</label>
+                        {if $emailError} <span class="glm-error">{$emailError}</span> {/if}
+                    </div>
+                    <div class="glm-columns glm-large-6 glm-small-12"><input name="email" value="" required>
+                    </div>
+                </div>
+                <div class="glm-row">
+                    <div class="glm-columns glm-large-6 glm-small-12"><label style="color:red;">Password</label>
+                        {if $passwordError} <span class="glm-error">{$passwordError}</span> {/if}
+                    </div>
+                    <div class="glm-columns glm-large-6 glm-small-12"><input name="password" value="" required></div>
+                </div>
+                <div class="glm-row">
+                    <div class="glm-columns glm-large-6 glm-small-12"><label style="color:red;">First Name</label></div>
+                    <div class="glm-columns glm-large-6 glm-small-12"><input name="fname" value="{$reg.fname}" required></div>
+                </div>
+                <div class="glm-row">
+                    <div class="glm-columns glm-large-6 glm-small-12"><label style="color:red;">Last Name</label></div>
+                    <div class="glm-columns glm-large-6 glm-small-12"><input name="lname" value="{$reg.lname}" required></div>
+                </div>
+                <div class="glm-row">
+                    <div class="glm-columns glm-large-6 glm-small-12"><label style="color:red;">Address 1</label></div>
+                    <div class="glm-columns glm-large-6 glm-small-12"><input name="addr1" value="{$reg.addr1}" required></div>
+                </div>
+                <div class="glm-row">
+                    <div class="glm-columns glm-large-6 glm-small-12"><label>Address 2</label></div>
+                    <div class="glm-columns glm-large-6 glm-small-12"><input name="addr2" value="{$reg.addr2}"></div>
+                </div>
+                <div class="glm-row">
+                    <div class="glm-columns glm-large-6 glm-small-12"><label style="color:red;">City</label></div>
+                    <div class="glm-columns glm-large-6 glm-small-12"><input name="city" value="{$reg.city}" required></div>
+                </div>
+                <div class="glm-row">
+                    <div class="glm-columns glm-large-6 glm-small-12"><label style="color:red;">State</label></div>
+                    <div class="glm-columns glm-large-6 glm-small-12"><input name="state" value="{$reg.state}" required></div>
+                </div>
+                <div class="glm-row">
+                    <div class="glm-columns glm-large-6 glm-small-12"><label style="color:red;">Zip/Postal Code</label></div>
+                    <div class="glm-columns glm-large-6 glm-small-12"><input name="zip" value="{$reg.zip}" required></div>
+                </div>
+                <div class="glm-row">
+                    <div class="glm-columns glm-large-6 glm-small-12"><label>Country</label></div>
+                    <div class="glm-columns glm-large-6 glm-small-12"><input name="country" value="{$reg.country}"></div>
+                </div>
+                <div class="glm-row">
+                    <div class="glm-columns glm-small-12"><input type="submit" id="accountRegister" value="Register"></div>
+                </div>
 
+            </div>
+        </div>
     </div>
+
 </form>
index 3c9b562..dca1bf5 100644 (file)
         <div class="glm-columns glm-small-12">
             <div class="glm-row">
                 <span class="glm-reg-level-title"><%= name %></span>
-                <span class="reg-class-count"><%= reg_count %>
-                    <% if ( reg_count == 1 ) { %>
-                        {/literal}{$terms.reg_term_attendee_cap}{literal}
-                    <% } else { %>
-                        {/literal}{$terms.reg_term_attendee_plur_cap}{literal}
-                    <% } %>
-                </span>
                 <div class="glm-columns glm-small-12">
                     <%- descr %>
                 </div>
@@ -75,9 +68,6 @@
         <div class="glm-columns glm-small-12 glm-large-6">
             <div class="reg-class-detail">
                 &nbsp;
-                <% if ( loggedIn ) { %>
-                    <button class="glm-add-account tiny">Add Me</button>
-                <% } %>
                 <div class="reg-class-times"> </div>
             </div>
         </div>