From 81aaf663c63aabda00734b4b8b573342a9044fa4 Mon Sep 17 00:00:00 2001 From: Stefan Midjich Date: Sat, 17 Dec 2016 23:50:55 +0100 Subject: [PATCH] RS needs to submit the form using angular. --- portal_local.cfg | 2 ++ static/rs/js/rsapp.js | 17 ++++++++++++++++- views/rs.tpl | 20 ++++++++++++-------- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/portal_local.cfg b/portal_local.cfg index 5d66514..46eda66 100644 --- a/portal_local.cfg +++ b/portal_local.cfg @@ -1,3 +1,5 @@ [portal] plugin_ttl=20 index_page=rs + +redis_host=db01.swehack.local diff --git a/static/rs/js/rsapp.js b/static/rs/js/rsapp.js index 7494b74..2698417 100644 --- a/static/rs/js/rsapp.js +++ b/static/rs/js/rsapp.js @@ -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); + }); + } + }; }); diff --git a/views/rs.tpl b/views/rs.tpl index 433afe8..c221ee4 100644 --- a/views/rs.tpl +++ b/views/rs.tpl @@ -57,10 +57,14 @@ @@ -96,10 +100,6 @@

Villkor för tjänsten

@@ -124,16 +124,16 @@ följa regler ex. förbudskyltar som gäller användning av enheter i närheten Medicinteknisk utrustning, då denna kan störas.

-
+
- +
@@ -250,10 +250,14 @@ + - +