X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=sdnr%2Fwireless-transport%2Fcode-Carbon-SR1%2Fapps%2Fdlux%2Fdlux-web%2Fsrc%2Fcommon%2Flogin%2Flogin.controller.js;fp=sdnr%2Fwireless-transport%2Fcode-Carbon-SR1%2Fapps%2Fdlux%2Fdlux-web%2Fsrc%2Fcommon%2Flogin%2Flogin.controller.js;h=0000000000000000000000000000000000000000;hb=1c1e7f98416875f3ee78af9103865c32f95a82a0;hp=750340d184b4faedb0b87a8e176837aa7238889a;hpb=6a893bb0ae984d15076394d9225d4873ad953791;p=ccsdk%2Fapps.git diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.controller.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.controller.js deleted file mode 100644 index 750340d1..00000000 --- a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.controller.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2014 Inocybe Technologies, and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -define(['common/login/login.module', 'common/authentification/auth.services'], function(login) { - - login.controller('LoginCtrl', function ($scope, $http, $window, Auth, $location) { - // default values - $scope.login = {}; - $scope.login.username = ""; - $scope.login.password = ""; - $scope.login.remember = false; - $scope.rememberme = true; - - $scope.sendLogin = function () { - Auth.login($scope.login.username, $scope.login.password, $scope.success, $scope.errorDisplay); - }; - - $scope.success = function(response) { - $window.location.href = 'index.html'; - }; - $scope.errorDisplay = function (error) { - $scope.error = "Unable to login"; - - }; - }); - - login.controller('forgotPasswordCtrl', function ($scope, $http) { - $scope.recover = {}; - $scope.recover.email = ""; - $scope.sendForgotPassword = function () { - $http.post('/recover', $scope.recover).success(function (data) { - if (data.recover) { - console.log("email sent"); - } - else { - console.log("email not sent"); - } - }); - - }; - }); - - login.controller('registerCtrl', function ($scope, $http) { - $scope.register = {}; - $scope.register.email = ""; - $scope.register.username = ""; - $scope.register.password = ""; - $scope.register.repeatPassword = ""; - $scope.register.userAgreement = false; - - $scope.sendRegister = function () { - $http.post('/register', $scope.register).success(function (data) { - if (data.register) { - console.log("registration is successful"); - } - else { - console.log("registration failed"); - } - }); - }; - }); -});