RS needs to submit the form using angular.

This commit is contained in:
Stefan Midjich 2016-12-17 23:50:55 +01:00
parent ce68f61292
commit 81aaf663c6
3 changed files with 30 additions and 9 deletions

View file

@ -14,7 +14,22 @@ app.config(function($routeProvider) {
.otherwise({redirectTo: '/Swedish'});
});
app.controller('RSMainCtrl', function($scope) {
app.controller('RSMainCtrl', function($scope, $http) {
$scope.approved = {};
$scope.submit = function() {
if ($scope.approved.answer == true) {
$http({
method: 'POST',
url: '/approve',
}).then(function success(response) {
poll_jobs(response.data);
}, function error(response) {
// Failure
console.log(response);
});
}
};
});