diff --git a/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js b/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js index c6b63f024..63a1c374c 100644 --- a/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js +++ b/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js @@ -49,6 +49,27 @@ backupApp.controller('EditBackupController', function ($rootScope, $scope, $rout $scope.$watch('Options["passphrase"]', computePassPhraseStrength); $scope.$watch('RepeatPasshrase', computePassPhraseStrength); + $scope.checkGpgAsymmetric = function() { + + if (!this.Options) { + return false; + } + + if (!('encryption-module' in this.Options)) { + return false; + } + + if (!this.Options['encryption-module']) { + return false; + } + + if (this.Options['encryption-module'].indexOf('gpg') < 0) { + return false; + } + + return this.ExtendedOptions.includes('--gpg-encryption-command=--encrypt'); + } + $scope.generatePassphrase = function() { this.Options["passphrase"] = this.RepeatPasshrase = AppUtils.generatePassphrase(); this.ShowPassphrase = true; @@ -221,15 +242,7 @@ backupApp.controller('EditBackupController', function ($rootScope, $scope, $rout return; } - function checkGpgAsymmetric() { - if ($scope.Options['encryption-module'].indexOf('gpg') < 0) { - return false; - } - - return $scope.ExtendedOptions.includes('--gpg-encryption-command=--encrypt'); - } - - if (encryptionEnabled && !checkGpgAsymmetric()) { + if (encryptionEnabled && !$scope.checkGpgAsymmetric()) { if ($scope.PassphraseScore === '') { DialogService.dialog(gettextCatalog.getString('Missing passphrase'), gettextCatalog.getString('You must enter a passphrase or disable encryption')); $scope.CurrentStep = 0; diff --git a/Duplicati/Server/webroot/ngax/templates/addoredit.html b/Duplicati/Server/webroot/ngax/templates/addoredit.html index 2f7f76b5d..8852be95a 100755 --- a/Duplicati/Server/webroot/ngax/templates/addoredit.html +++ b/Duplicati/Server/webroot/ngax/templates/addoredit.html @@ -19,7 +19,7 @@ - +
  1. General
  2. Destination
  3. @@ -50,15 +50,15 @@ -
    +

    We recommend that you encrypt all backups stored outside your system

    -
    +
    -
    +
    @@ -116,7 +116,7 @@
    - +
    @@ -199,7 +199,7 @@
    - + X @@ -249,7 +249,7 @@
    - +

    Schedule

    @@ -288,7 +288,7 @@ ng-click="toggleAllowedDays(day.value)" /> -
    +
    @@ -299,7 +299,7 @@ - +

    General options

    @@ -343,7 +343,7 @@
    -
    Once there are more backups than the specified number, the oldest backups are deleted.
    +
    Once there are more backups than the specified number, the oldest backups are deleted.
    @@ -364,7 +364,7 @@

    {{module.DisplayName}}

    - +