Change Signup Form

Issue #201 resolved
udemi repo owner created an issue

As discussed in Emails:

We now have the final design (attached)

Comments (16)

  1. David Marrs

    Hi @andrefsp I've created two new accounts to test the new signup form, and I'm getting 500 errors in response to the following requests:

    #!
    
    GET /v1/users/me/?_=1458926173613 HTTP/1.1
    Host: api-dev.udemi.org
    Connection: keep-alive
    Accept: application/json, text/javascript, */*; q=0.01
    Origin: http://localhost:8000
    User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
    Authorization: Bearer bR1GdIa4EsdXaRNm2Lewt5nazo10Bb
    Content-Type: application/json
    Referer: http://localhost:8000/welcome
    Accept-Encoding: gzip, deflate, sdch
    Accept-Language: en,en-US;q=0.8
    

    (which was for an account with email address dwmarrs+newsignup@googlemail.com)

    #!
    
    GET /v1/users/me/?_=1458926306064 HTTP/1.1
    Host: api-dev.udemi.org
    Connection: keep-alive
    Accept: application/json, text/javascript, */*; q=0.01
    Origin: http://localhost:8000
    User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
    Authorization: Bearer u4vTCmPTp7zuX3qqNmsJLHOsVcUL0o
    Content-Type: application/json
    Referer: http://localhost:8000/welcome
    Accept-Encoding: gzip, deflate, sdch
    Accept-Language: en,en-US;q=0.8
    

    (which was for an account with email address dwmarrs+newsignup2@googlemail.com)

    My guess is that something is going wrong because it is trying to retrieve a NULL value which didn't use to be NULL (when more data was sent to the server when the signup form was bigger: perhaps the field for subscribing to the newsletter/send me updates). Can you look into that please?

    Thanks,

    Dave

  2. David Marrs

    @andrefsp getting 500 errors from other GETs, like for the maps. Maybe the problem above is not related to a missing newsletter field?

  3. David Marrs

    @enricosoft Having looked at https://developers.facebook.com/docs/facebook-login/web#logindialog I think that to use Mario's facebook graphic, I would need a method in our angular controller signupCtrl like the below

    $scope.fb.login = function() {
        FB.login(function(response) {
            if ($scope.fbSignupForm.$valid) {
                $scope.fb.loading = true;
    
                Udemi.auth.FB.CONNECT('subscribe',
                { username: $scope.fb.username },
                function () {
                    $scope.$apply(function () {
                        $scope.fb.loading = false;
                    });
    
                    closeModal("#signupModal");
                },
                function (errorMsg) {
                    $scope.$apply(function () {
                        $scope.errorMsg = errorMsg;
                        $scope.fb.loading = false;
                    });
                });
            } else {
                if (!$scope.fb.TC) {
                    $scope.errorMsg = 'You need to accept Terms & Conditions before continuing';
                }
            }
        }, {scope: 'public_profile,email'});
    }
    

    with an ng-click="fb.login" attribute on a <button> tag styled up as Mario wants. Does that affect what's happening in udemi-fb.js? Should I just leave that file as is until we need to change the login modal too?

  4. David Marrs

    Note to self: maybe i should leave the contents of the function(response){} callback as a seperate $scope.fb.onlogin method in case we do end up back on a button generated by facebook (saves me moving the code back again)

  5. Enrico Piccini

    @dwmarrs I think you simply need to change the graphic style and not the javascript source code... the only thing you need to change in the source code is related to the "privacy" checkbox... you need to set it to "true" in $scope

  6. David Marrs
    • changed status to open

    Actually, let's keep this open until the pull request is merged in and we know it's working ok

  7. Log in to comment