add wp loader

This commit is contained in:
usmannasir
2025-04-07 15:19:54 +05:00
parent 9a0cda2fbb
commit 171947c6c4
2 changed files with 13 additions and 6 deletions

View File

@@ -662,7 +662,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
$scope.wordpresshomeloading = false; $scope.wordpresshomeloading = false;
$('#wordpresshomeloading').show(); $('#wordpresshomeloading').show();
var url = "/websites/UpdateWPSettings"; var url = "/websites/UpdateWPSettings";
if (setting === "PasswordProtection") { if (setting === "PasswordProtection") {
@@ -673,7 +672,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
PPUsername: $scope.PPUsername, PPUsername: $scope.PPUsername,
PPPassword: $scope.PPPassword, PPPassword: $scope.PPPassword,
} }
} else { } else {
var data = { var data = {
WPid: $('#WPid').html(), WPid: $('#WPid').html(),
@@ -681,9 +679,13 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
PPUsername: '', PPUsername: '',
PPPassword: '', PPPassword: '',
} }
} }
} else if (setting === 'search-indexing') {
var data = {
WPid: $('#WPid').html(),
setting: setting,
settingValue: $scope.searchIndexEnabled ? 1 : 0
}
} else { } else {
var settingValue = 0; var settingValue = 0;
if ($('#' + setting).is(":checked")) { if ($('#' + setting).is(":checked")) {
@@ -696,7 +698,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
} }
var config = { var config = {
headers: { headers: {
'X-CSRFToken': getCookie('csrftoken') 'X-CSRFToken': getCookie('csrftoken')
@@ -4284,6 +4285,12 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
} }
} else if (setting === 'search-indexing') {
var data = {
WPid: $('#WPid').html(),
setting: setting,
settingValue: $scope.searchIndexEnabled ? 1 : 0
}
} else { } else {
var settingValue = 0; var settingValue = 0;
if ($('#' + setting).is(":checked")) { if ($('#' + setting).is(":checked")) {

View File

@@ -241,7 +241,7 @@
<div class="col-md-3"> <div class="col-md-3">
<h6 style="font-weight: bold">Search Engine Indexing</h6> <h6 style="font-weight: bold">Search Engine Indexing</h6>
<div class="custom-control custom-switch"> <div class="custom-control custom-switch">
<input ng-click="UpdateWPSettings('searchIndex')" <input ng-click="UpdateWPSettings('search-indexing')"
type="checkbox" type="checkbox"
class="custom-control-input" class="custom-control-input"
id="searchIndex" id="searchIndex"