diff --git a/websiteFunctions/static/websiteFunctions/websiteFunctions.js b/websiteFunctions/static/websiteFunctions/websiteFunctions.js index ec97c4d02..e5829e3f3 100755 --- a/websiteFunctions/static/websiteFunctions/websiteFunctions.js +++ b/websiteFunctions/static/websiteFunctions/websiteFunctions.js @@ -662,7 +662,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo $scope.wordpresshomeloading = false; $('#wordpresshomeloading').show(); - var url = "/websites/UpdateWPSettings"; if (setting === "PasswordProtection") { @@ -673,7 +672,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo PPUsername: $scope.PPUsername, PPPassword: $scope.PPPassword, } - } else { var data = { WPid: $('#WPid').html(), @@ -681,9 +679,13 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo PPUsername: '', PPPassword: '', } - } - + } else if (setting === 'search-indexing') { + var data = { + WPid: $('#WPid').html(), + setting: setting, + settingValue: $scope.searchIndexEnabled ? 1 : 0 + } } else { var settingValue = 0; if ($('#' + setting).is(":checked")) { @@ -696,7 +698,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo } } - var config = { headers: { '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 { var settingValue = 0; if ($('#' + setting).is(":checked")) { diff --git a/websiteFunctions/templates/websiteFunctions/WPsiteHome.html b/websiteFunctions/templates/websiteFunctions/WPsiteHome.html index 81ca0fedc..34261b536 100644 --- a/websiteFunctions/templates/websiteFunctions/WPsiteHome.html +++ b/websiteFunctions/templates/websiteFunctions/WPsiteHome.html @@ -241,7 +241,7 @@