From 0ea58c5684abc21c341b5a93befdd7cee4ac37e1 Mon Sep 17 00:00:00 2001 From: ArnaudVOTA Date: Wed, 3 Feb 2016 12:05:04 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20d'une=20requete=20pour=20l'identificati?= =?UTF-8?q?on.=20Non=20test=C3=A9.=20Modification=20des=20champs=20de=20l'?= =?UTF-8?q?overlay.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/js/requests/identity.js | 41 +++++++++++++++++++++++++--------- client/partials/nav.html | 21 +++++++++++------ client/partials/overlays.html | 21 +++++++++++------ 3 files changed, 59 insertions(+), 24 deletions(-) diff --git a/client/js/requests/identity.js b/client/js/requests/identity.js index d008abf..aca435f 100644 --- a/client/js/requests/identity.js +++ b/client/js/requests/identity.js @@ -1,15 +1,36 @@ -// Make Namespace -var identity = {} ; - - -// Fetch Status -identity.fetchStatus = function(){ + +mainApp.controller('identityCtrl', function($scope, $http) { + + $scope.identityFormData = {}; + + $scope.processForm = function() { + + $http({ + method : 'POST', + url : 'http://148.60.11.31/', + data : $.param($scope.identityFormData), + headers : { 'Content-Type': 'application/x-www-form-urlencoded' } + }) + .success(function(data) { + console.log(data); + + if (!data.success) { + // if not successful, bind errors to error variables + //$scope.errorName = data.errors.name; + //$scope.errorSuperhero = data.errors.superheroAlias; + } else { + // if successful, bind success message to message + //$scope.message = data.message; + } + }); + }; + + + +}); - // TODO - - return new Array("0", "user1", "25/02/2016"); + -} \ No newline at end of file diff --git a/client/partials/nav.html b/client/partials/nav.html index 869d4e2..e785eeb 100644 --- a/client/partials/nav.html +++ b/client/partials/nav.html @@ -52,21 +52,28 @@ diff --git a/client/partials/overlays.html b/client/partials/overlays.html index b913f7a..8bbce52 100644 --- a/client/partials/overlays.html +++ b/client/partials/overlays.html @@ -10,21 +10,28 @@