From 758cd8bfbd91bbe3a3399eeceb70056699ec3a61 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Tue, 8 Apr 2025 05:34:54 +0500 Subject: [PATCH] fix password protection in list wp sites --- .../templates/websiteFunctions/WPsitesList.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 @@ +