preserveSecs is now just a checkbox

This commit is contained in:
Johannes Zellner
2022-04-07 15:31:41 +02:00
parent b2aae4f7b3
commit 940872e5a5
2 changed files with 11 additions and 5 deletions
+3 -3
View File
@@ -374,12 +374,12 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
backup: null,
label: '',
preserveSecs: 0,
persist: false,
show: function (backup) {
$scope.editBackup.backup = backup;
$scope.editBackup.label = backup.label;
$scope.editBackup.preserveSecs = backup.preserveSecs || 0;
$scope.editBackup.persist = backup.preserveSecs === -1;
$scope.editBackup.error = null;
$scope.editBackup.busy = false;
@@ -390,7 +390,7 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
$scope.editBackup.error = null;
$scope.editBackup.busy = true;
Client.editBackup($scope.editBackup.backup.id, $scope.editBackup.label, $scope.editBackup.preserveSecs, function (error) {
Client.editBackup($scope.editBackup.backup.id, $scope.editBackup.label, $scope.editBackup.persist ? -1 : 0, function (error) {
$scope.editBackup.busy = false;
if (error) return $scope.editBackup.error = error.message;