Use toplevel cert renewal api for all domains

This commit is contained in:
Johannes Zellner
2018-12-11 12:41:42 +01:00
parent 5cd696792b
commit 1670f15732
3 changed files with 56 additions and 59 deletions
+12 -17
View File
@@ -352,39 +352,34 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
}
};
$scope.domainRenewCerts = {
$scope.renewCerts = {
busy: false,
error: null,
domain: null,
show: function (domain) {
$scope.domainRenewCerts.reset();
$scope.domainRenewCerts.domain = domain;
$('#domainRenewCertsModal').modal('show');
show: function () {
$scope.renewCerts.reset();
$('#renewCertsModal').modal('show');
},
submit: function () {
$scope.domainRenewCerts.busy = true;
$scope.domainRenewCerts.error = null;
$scope.renewCerts.busy = true;
$scope.renewCerts.error = null;
Client.renewCerts($scope.domainRenewCerts.domain.domain, function (error) {
Client.renewCerts(null /* all domains */, function (error) {
if (error) {
Client.error(error);
} else {
$('#domainRenewCertsModal').modal('hide');
$scope.domainRenewCerts.reset();
$('#renewCertsModal').modal('hide');
$scope.renewCerts.reset();
}
$scope.domainRenewCerts.busy = false;
$scope.renewCerts.busy = false;
});
},
reset: function () {
$scope.domainRenewCerts.busy = false;
$scope.domainRenewCerts.error = null;
$scope.domainRenewCerts.domain = null;
$scope.renewCerts.busy = false;
$scope.renewCerts.error = null;
}
};