Subversion Repositories SmartDukaan

Rev

Rev 2110 | Rev 4453 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

$(function(){
        $('#frmRegister #email').change(function(){
                $('#communicationEmail').val($(this).val());
                $('#communicationEmailInstruction').show();
        });
        
        $('#frmRegister').submit(function(){
                trackEventWithGA('Account', 'New User Register', $('#frmRegister #email').val());
                trackPageWithGA("/register"); // For registration goal.
        });
        
        $("#datepicker").datepicker({
                changeMonth: true,
                changeYear: true,
                yearRange: '1940:2000'
        });
        
        $('#frmLogin').validate({
                loginEmail: {
                        required: true,
                        email: true
                },
                loginPassword: {
                        required: true,
                        minlength: 6,
                        maxlength: 20
                }
        });
        
        $("#frmRegister").validate({
                rules: {
                        nameOfUser: "required",
                        email: {
                                required: true,
                                email: true
                        },
                        txtPassword: {
                                required: true,
                                minlength: 6,
                                maxlength: 20
                        },
                        confirmPassword: {
                                required: true,
                                minlength: 6,
                                maxlength: 20,
                                equalTo: "#txtPassword"
                        },
                        communicationEmail: {
                                required: true,
                                email: true
                        },
                        mobileNumber: {
                                required: false,
                                digits: true,
                                minlength: 10,
                                maxlength: 10
                        },
                        conditions: {
                                required: true
                        }
                }
        });
});