Make sure we require an encryption password if encryption is set to true for importing app backups
This commit is contained in:
@@ -364,7 +364,7 @@
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': importBackup.error.password }">
|
||||
<label class="control-label" for="inputImportBackupPassword">{{ 'backups.configureBackupStorage.encryptionPassword' | tr }} <sup><a ng-href="https://docs.cloudron.io/backups/#encryption" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
|
||||
<input type="text" class="form-control" ng-model="importBackup.password" id="inputImportBackupPassword" ng-disabled="importBackup.busy" placeholder="Passphrase used to encrypt the backups">
|
||||
<input type="text" class="form-control" ng-model="importBackup.password" id="inputImportBackupPassword" ng-disabled="importBackup.busy" ng-required="importBackup.encrypted" placeholder="Passphrase used to encrypt the backups">
|
||||
</div>
|
||||
|
||||
<input class="ng-hide" type="submit" ng-disabled="importBackupForm.$invalid"/>
|
||||
|
||||
@@ -1249,6 +1249,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
backupId: '',
|
||||
password: '',
|
||||
mountOptions: {},
|
||||
encrypted: false, // helps with ng-required when backupConfig is read from file
|
||||
|
||||
clearForm: function () {
|
||||
// $scope.importBackup.provider = ''; // do not clear since we call this function on provider change
|
||||
|
||||
Reference in New Issue
Block a user