track current config separately
This commit is contained in:
@@ -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();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user