mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
RS needs to submit the form using angular.
This commit is contained in:
parent
ce68f61292
commit
81aaf663c6
3 changed files with 30 additions and 9 deletions
|
@ -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);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue