Show subscription setup for domain adding
This commit is contained in:
@@ -11,6 +11,10 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
$scope.domains = [];
|
||||
$scope.ready = false;
|
||||
|
||||
$scope.openSubscriptionSetup = function () {
|
||||
Client.openSubscriptionSetup($scope.$parent.subscription);
|
||||
};
|
||||
|
||||
// currently, validation of wildcard with various provider is done server side
|
||||
$scope.tlsProvider = [
|
||||
{ name: 'Let\'s Encrypt Prod', value: 'letsencrypt-prod' },
|
||||
@@ -101,6 +105,17 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
});
|
||||
}
|
||||
|
||||
$scope.domainAdd = {
|
||||
show: function () {
|
||||
if ($scope.config.features.domainMaxCount && $scope.config.features.domainMaxCount <= $scope.domains.length) {
|
||||
$('#subscriptionRequiredModal').modal('show');
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.domainConfigure.show();
|
||||
}
|
||||
};
|
||||
|
||||
// We reused configure also for adding domains to avoid much code duplication
|
||||
$scope.domainConfigure = {
|
||||
adding: false,
|
||||
|
||||
Reference in New Issue
Block a user