diff --git a/src/views/settings.html b/src/views/settings.html
index a77e35a6f..4808c02dd 100644
--- a/src/views/settings.html
+++ b/src/views/settings.html
@@ -117,13 +117,13 @@
-
-
+
+
-
+
@@ -326,7 +326,7 @@
Server address
- {{ registryConfig.serverAddress || 'Not set' }}
+ {{ registryConfig.currentConfig.serverAddress || 'Not set' }}
@@ -334,7 +334,7 @@
Username
- {{ registryConfig.username || registryConfig.email || 'Not set' }}
+ {{ registryConfig.currentConfig.username || registryConfig.currentConfig.email || 'Not set' }}
diff --git a/src/views/settings.js b/src/views/settings.js
index 6c2c351fd..12ce42ded 100644
--- a/src/views/settings.js
+++ b/src/views/settings.js
@@ -312,10 +312,10 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
Client.getRegistryConfig(function (error, result) {
if (error) return console.error(error);
- $scope.registryConfig.serverAddress = result.serverAddress;
- $scope.registryConfig.username = result.username || '';
- $scope.registryConfig.email = result.email || '';
- $scope.registryConfig.password = result.password;
+ $scope.registryConfig.currentConfig.serverAddress = result.serverAddress;
+ $scope.registryConfig.currentConfig.username = result.username || '';
+ $scope.registryConfig.currentConfig.email = result.email || '';
+ $scope.registryConfig.currentConfig.password = result.password;
});
}
@@ -371,11 +371,17 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
username: '',
password: '',
email: '',
+ currentConfig: {},
reset: function () {
$scope.cloudronNameChange.busy = false;
$scope.registryConfig.error = null;
+ $scope.registryConfig.serverAddress = $scope.registryConfig.currentConfig.serverAddress;
+ $scope.registryConfig.username = $scope.registryConfig.currentConfig.username;
+ $scope.registryConfig.email = $scope.registryConfig.currentConfig.email;
+ $scope.registryConfig.password = $scope.registryConfig.currentConfig.password;
+
$scope.registryConfigForm.$setUntouched();
$scope.registryConfigForm.$setPristine();
},