diff --git a/websiteFunctions/templates/websiteFunctions/WPsitesList.html b/websiteFunctions/templates/websiteFunctions/WPsitesList.html index 4179dcf06..2a61ff85f 100644 --- a/websiteFunctions/templates/websiteFunctions/WPsitesList.html +++ b/websiteFunctions/templates/websiteFunctions/WPsitesList.html @@ -24,6 +24,7 @@ $scope.currentPage = 1; $scope.recordsToShow = 10; $scope.expandedSites = {}; // Track which sites are expanded + $scope.currentWP = null; // Store current WordPress site for password protection // Function to toggle site expansion $scope.toggleSite = function(site) { @@ -218,9 +219,10 @@ } else { // Disable password protection var data = { - siteId: site.id, - setting: 'password-protection', - value: 0 + WPid: site.id, + setting: 'PasswordProtection', + PPUsername: '', + PPPassword: '' }; GLobalAjaxCall($http, "{% url 'UpdateWPSettings' %}", data, @@ -272,9 +274,8 @@ } var data = { - siteId: $scope.currentWP.id, - setting: 'password-protection', - value: 1, + WPid: $scope.currentWP.id, + setting: 'PasswordProtection', PPUsername: $scope.currentWP.PPUsername, PPPassword: $scope.currentWP.PPPassword }; @@ -493,6 +494,7 @@ +