make mail child domain optional

This commit is contained in:
Usman Nasir
2020-02-18 20:15:07 +05:00
parent 951a147675
commit 80eaf741bb
4 changed files with 71 additions and 45 deletions

View File

@@ -45,7 +45,7 @@ app.controller('createWebsite', function ($scope, $http, $timeout, $window) {
$scope.currentStatus = "Starting creation..";
var ssl, dkimCheck, openBasedir;
var ssl, dkimCheck, openBasedir, mailDomain;
if ($scope.sslCheck === true) {
ssl = 1;
@@ -65,6 +65,13 @@ app.controller('createWebsite', function ($scope, $http, $timeout, $window) {
openBasedir = 0
}
if ($scope.mailDomain === true) {
mailDomain = 1;
} else {
mailDomain = 0
}
url = "/websites/submitWebsiteCreation";
var package = $scope.packageForWebsite;
@@ -82,7 +89,8 @@ app.controller('createWebsite', function ($scope, $http, $timeout, $window) {
ssl: ssl,
websiteOwner: websiteOwner,
dkimCheck: dkimCheck,
openBasedir: openBasedir
openBasedir: openBasedir,
mailDomain: mailDomain
};
var config = {

View File

@@ -105,6 +105,15 @@
</label>
</div>
</div>
<label class="col-sm-3 control-label"></label>
<div class="col-sm-9">
<div class="checkbox">
<label>
<input ng-model="mailDomain" type="checkbox" value="">
Create Mail Domain
</label>
</div>
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">

View File

@@ -199,6 +199,8 @@ class WebsiteManager:
except:
externalApp = "".join(re.findall("[a-zA-Z]+", domain))[:7]
try:
counter = 0
while 1:
@@ -215,6 +217,11 @@ class WebsiteManager:
except:
apacheBackend = "0"
try:
mailDomain = str(data['mailDomain'])
except:
mailDomain = "1"
import pwd
counter = 0
while 1:
@@ -232,7 +239,7 @@ class WebsiteManager:
" --administratorEmail " + adminEmail + " --phpVersion '" + phpSelection + \
"' --virtualHostUser " + externalApp + " --ssl " + str(data['ssl']) + " --dkimCheck " \
+ str(data['dkimCheck']) + " --openBasedir " + str(data['openBasedir']) + \
' --websiteOwner ' + websiteOwner + ' --package ' + packageName + ' --tempStatusPath ' + tempStatusPath + " --apache " + apacheBackend
' --websiteOwner ' + websiteOwner + ' --package ' + packageName + ' --tempStatusPath ' + tempStatusPath + " --apache " + apacheBackend + " --mailDomain %s" % (mailDomain)
ProcessUtilities.popenExecutioner(execPath)
time.sleep(2)