summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorArnaudVOTA <arnaud.vota@gmail.com>2016-02-03 12:05:04 +0100
committerArnaudVOTA <arnaud.vota@gmail.com>2016-02-03 12:05:04 +0100
commit0ea58c5684abc21c341b5a93befdd7cee4ac37e1 (patch)
tree1c8fc4705fea9cecf7cc40c4d6e2af6f12b43d27 /client
parent49109b657a3ae88d0df21d501647e71a2c955dcb (diff)
Ajout d'une requete pour l'identification. Non testé. Modification des champs de l'overlay.
Diffstat (limited to 'client')
-rw-r--r--client/js/requests/identity.js37
-rw-r--r--client/partials/nav.html21
-rw-r--r--client/partials/overlays.html21
3 files changed, 57 insertions, 22 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 = {} ;
+mainApp.controller('identityCtrl', function($scope, $http) {
-// Fetch Status
-identity.fetchStatus = function(){
-
- // TODO
+ $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;
+ }
+ });
+ };
+
+
+
+});
- 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 @@
</div>
<div class="modal-body">
+
+ <div class="form-group">
+ <label label-default="" for="inputUser">User</label>
+ <input class="form-control" id="inputUser"
+ placeholder="Enter email" type="text" ng-model="identityFormData.user">
+ </div>
<div class="form-group">
- <label label-default="" for="exampleInputEmail1">Email address</label>
- <input class="form-control" id="exampleInputEmail1"
- placeholder="Enter email" type="email">
+ <label label-default="" for="inputProject">Project</label>
+ <input class="form-control" id="inputProject"
+ placeholder="Password" type="password" ng-model="identityFormData.project">
</div>
<div class="form-group">
- <label label-default="" for="exampleInputPassword1">Password</label>
- <input class="form-control" id="exampleInputPassword1"
- placeholder="Password" type="password">
+ <label label-default="" for="inputPassword">Password</label>
+ <input class="form-control" id="inputPassword"
+ placeholder="Password" type="password" ng-model="identityFormData.password">
</div>
+
<p class="text-right"><a href="#">Forgot password?</a>
</p>
</div>
<div class="modal-footer"> <a href="#" data-dismiss="modal" class="btn btn-default">Close</a>
- <a href="#" class="btn btn-primary">Login</a>
+ <a href="#" class="btn btn-primary" ng-click="processForm()">Login</a>
</div>
</div>
</div>
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 @@
</div>
<div class="modal-body">
+
+ <div class="form-group">
+ <label label-default="" for="inputUser">User</label>
+ <input class="form-control" id="inputUser"
+ placeholder="Enter email" type="text" ng-model="identityFormData.user">
+ </div>
<div class="form-group">
- <label label-default="" for="exampleInputEmail1">Email address</label>
- <input class="form-control" id="exampleInputEmail1"
- placeholder="Enter email" type="email">
+ <label label-default="" for="inputProject">Project</label>
+ <input class="form-control" id="inputProject"
+ placeholder="Password" type="password" ng-model="identityFormData.project">
</div>
<div class="form-group">
- <label label-default="" for="exampleInputPassword1">Password</label>
- <input class="form-control" id="exampleInputPassword1"
- placeholder="Password" type="password">
+ <label label-default="" for="inputPassword">Password</label>
+ <input class="form-control" id="inputPassword"
+ placeholder="Password" type="password" ng-model="identityFormData.password">
</div>
+
<p class="text-right"><a href="#">Forgot password?</a>
</p>
</div>
<div class="modal-footer"> <a href="#" data-dismiss="modal" class="btn btn-default">Close</a>
- <a href="#" class="btn btn-primary">Login</a>
+ <a href="#" class="btn btn-primary" ng-click="processForm()">Login</a>
</div>
</div>
</div>