admin: Auto change default value for unlockedChallengeDepth
This commit is contained in:
parent
15c85c8f59
commit
b1315a9eeb
|
@ -507,6 +507,13 @@ angular.module("FICApp")
|
|||
$scope.configro = ROSettings.get();
|
||||
$scope.duration = 360;
|
||||
|
||||
$scope.exerciceDependChange = function() {
|
||||
if ($scope.config.enableExerciceDepend)
|
||||
$scope.config.unlockedChallengeDepth = 0;
|
||||
else
|
||||
$scope.config.unlockedChallengeDepth = -1;
|
||||
};
|
||||
|
||||
var needRefreshSyncReportWhenReady = false;
|
||||
var refreshSyncReport = function() {
|
||||
needRefreshSyncReportWhenReady = false;
|
||||
|
|
|
@ -184,9 +184,9 @@
|
|||
|
||||
<div class="form-check">
|
||||
<label class="custom-control custom-checkbox">
|
||||
<input class="custom-control-input" type="checkbox" ng-model="config.enableExerciceDepend">
|
||||
<input class="custom-control-input" type="checkbox" ng-model="config.enableExerciceDepend" ng-change="exerciceDependChange()">
|
||||
<span class="custom-control-label">Activer les dépendances des exercices</span>
|
||||
<input type="text" class="form-control form-control-sm" id="duration" ng-model="config.unlockedChallengeDepth" ng-disabled="!config.enableExerciceDepend" title="-1 : Désactivé ; 0: activé ; 1,2,3 : débloque 1,2,3,... exercices supplémentaires après un challenge validé" integer>
|
||||
<input type="number" class="form-control form-control-sm" id="duration" ng-model="config.unlockedChallengeDepth" ng-disabled="!config.enableExerciceDepend" title="-1 : Désactivé ; 0: activé ; 1,2,3 : débloque 1,2,3,... exercices supplémentaires après un challenge validé" min="0" integer>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user