diff --git a/admin/static/js/app.js b/admin/static/js/app.js index 6c0cbe11..fc06d574 100644 --- a/admin/static/js/app.js +++ b/admin/static/js/app.js @@ -512,8 +512,10 @@ angular.module("FICApp") .controller("SettingsController", function($scope, $rootScope, Settings, SettingsChallenge, $location, $http, $interval) { $scope.displayDangerousActions = false; - $scope.config = Settings.get(); + $scope.config = Settings.get(); + $scope.dist_config = {}; $scope.config.$promise.then(function(response) { + $scope.dist_config = Object.assign({}, response); response.enableExerciceDepend = response.unlockedChallengeDepth >= 0; $rootScope.settings.start = new Date(response.start); $rootScope.settings.end = new Date(response.end); @@ -551,6 +553,7 @@ angular.module("FICApp") var state = this.config.enableExerciceDepend; this.config.unlockedChallengeDepth = (this.config.enableExerciceDepend?this.config.unlockedChallengeDepth:-1) this.config.$update(function(response) { + $scope.dist_config = Object.assign({}, response); $scope.addToast('success', msg); response.enableExerciceDepend = response.unlockedChallengeDepth >= 0; $rootScope.settings.start = new Date(nStart); diff --git a/admin/static/views/settings.html b/admin/static/views/settings.html index 5c6bdfe3..7fda4224 100644 --- a/admin/static/views/settings.html +++ b/admin/static/views/settings.html @@ -3,6 +3,29 @@