domain remove does not require password

This commit is contained in:
Girish Ramakrishnan
2019-05-20 18:41:08 -07:00
parent a80c21d77f
commit 23b72620a1
3 changed files with 6 additions and 29 deletions

View File

@@ -378,7 +378,6 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
busy: false,
error: null,
domain: null,
password: '',
show: function (domain) {
$scope.domainRemove.reset();
@@ -392,12 +391,9 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
$scope.domainRemove.busy = true;
$scope.domainRemove.error = null;
Client.removeDomain($scope.domainRemove.domain.domain, $scope.domainRemove.password, function (error) {
Client.removeDomain($scope.domainRemove.domain.domain, function (error) {
if (error && (error.statusCode === 403 || error.statusCode === 409)) {
$scope.domainRemove.password = '';
$scope.domainRemove.error = error.message;
$scope.domainRemoveForm.password.$setPristine();
$('#domainRemovePasswordInput').focus();
} else if (error) {
Client.error(error);
} else {
@@ -415,10 +411,6 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
$scope.domainRemove.busy = false;
$scope.domainRemove.error = null;
$scope.domainRemove.domain = null;
$scope.domainRemove.password = '';
$scope.domainRemoveForm.$setPristine();
$scope.domainRemoveForm.$setUntouched();
}
};