Support hyphenatedSubdomains property in domains view

This commit is contained in:
Johannes Zellner
2018-08-22 11:54:37 +02:00
parent fe23551b04
commit 53a34d9352
2 changed files with 18 additions and 2 deletions

View File

@@ -103,6 +103,7 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
nameComUsername: '',
provider: 'route53',
zoneName: '',
hyphenatedSubdomains: false,
tlsConfig: {
provider: 'letsencrypt-prod'
@@ -148,6 +149,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
$scope.domainConfigure.tlsConfig.provider = domain.tlsConfig.provider;
$scope.domainConfigure.zoneName = domain.zoneName;
$scope.domainConfigure.hyphenatedSubdomains = !!domain.config.hyphenatedSubdomains;
} else {
$scope.domainConfigure.adding = true;
}
@@ -161,8 +164,7 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
var provider = $scope.domainConfigure.provider;
var data = {
};
var data = {};
// special case the wildcard provider
if (provider === 'wildcard') {
@@ -205,6 +207,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
data.username = $scope.domainConfigure.nameComUsername;
}
data.hyphenatedSubdomains = $scope.domainConfigure.hyphenatedSubdomains;
var fallbackCertificate = null;
if ($scope.domainConfigure.fallbackCert.certificateFile && $scope.domainConfigure.fallbackCert.keyFile) {
fallbackCertificate = {
@@ -262,6 +266,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
$scope.domainConfigure.tlsConfig.provider = 'letsencrypt-prod';
$scope.domainConfigure.zoneName = '';
$scope.domainConfigure.hyphenatedSubdomains = false;
$scope.domainConfigureForm.$setPristine();
$scope.domainConfigureForm.$setUntouched();
}