mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-16 21:26:43 +02:00
fix password protection in list wp sites
This commit is contained in:
@@ -284,29 +284,33 @@
|
||||
GLobalAjaxCall($http, "{% url 'UpdateWPSettings' %}", data,
|
||||
function(response) {
|
||||
if (response.data.status === 1) {
|
||||
// Update the site's password protection state
|
||||
$scope.currentWP.passwordProtection = true;
|
||||
new PNotify({
|
||||
title: 'Success!',
|
||||
text: 'Password protection enabled successfully!',
|
||||
type: 'success'
|
||||
});
|
||||
// Refresh the site data
|
||||
fetchSiteData($scope.currentWP);
|
||||
} else {
|
||||
// Revert the checkbox state
|
||||
$scope.currentWP.passwordProtection = false;
|
||||
new PNotify({
|
||||
title: 'Error!',
|
||||
text: response.data.error_message || 'Failed to enable password protection',
|
||||
type: 'error'
|
||||
});
|
||||
// Revert the checkbox state
|
||||
$scope.currentWP.passwordProtection = false;
|
||||
}
|
||||
},
|
||||
function(error) {
|
||||
// Revert the checkbox state
|
||||
$scope.currentWP.passwordProtection = false;
|
||||
new PNotify({
|
||||
title: 'Error!',
|
||||
text: 'Could not connect to server',
|
||||
type: 'error'
|
||||
});
|
||||
// Revert the checkbox state
|
||||
$scope.currentWP.passwordProtection = false;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user