Merge branch 'v2.3.2-dev' of https://github.com/usmannasir/cyberpanel into v2.3.2-dev

This commit is contained in:
Hassan Hashmi
2022-06-16 14:35:12 +05:00
6 changed files with 138 additions and 28 deletions

View File

@@ -551,20 +551,26 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
$scope.wordpresshomeloading = false;
var settingValue = 0;
if ($('#' + setting).is(":checked")) {
settingValue = 1;
}
var url = "/websites/UpdateWPSettings";
var data = {
WPid: $('#WPid').html(),
setting: setting,
settingValue: settingValue
if (setting === "PasswordProtection") {
var data = {
WPid: $('#WPid').html(),
setting: setting,
PPUsername: $scope.PPUsername,
PPPassword: $scope.PPPassword,
}
} else {
var settingValue = 0;
if ($('#' + setting).is(":checked")) {
settingValue = 1;
}
var data = {
WPid: $('#WPid').html(),
setting: setting,
settingValue: settingValue
}
}
@@ -1595,7 +1601,8 @@ app.controller('RestoreWPBackup', function ($scope, $http, $timeout, $window) {
// if (d == -1 || c == "") {
// alert("Please Select Method of Backup Restore");
// } else {
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
// }