'use Strict';

/**
 * TODO
 */
angular.module('PODB')
    .controller('RegistrationController', ['$scope', '$http', 'apiBaseUrl', function($scope, $http, apiBaseUrl) {
        $scope.processingRegistration = false;
        $scope.registrationData = {};

        $scope.register = function () {
            $scope.processingRegistration = true;
            $http.post(apiBaseUrl + '/user/register', $scope.registrationData)
                .success(function (data) {
                    $scope.processingRegistration = false;
                })
                .error(function (data, status) {
                    $scope.processingRegistration = false;
                });
        };
    }]);
@@ -245,16 +245,48 @@
 ta = %7B%7D;
+%0A        $scope.success = false;
 %0A%0A      
@@ -542,32 +542,125 @@
 ration = false;%0A
+                    $scope.success = true;%0A                    $scope.registrationData = %7B%7D;%0A
                 

Reset registration fields