From 7154ff86041f9b623c435f7e3d3f3c6f3db430c0 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Mon, 7 Apr 2025 19:27:21 +0500 Subject: [PATCH] maintenanceMod fix --- .../websiteFunctions/websiteFunctions.js | 21 +++++++++++++++++++ .../websiteFunctions/listWebsites.html | 12 ++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/websiteFunctions/static/websiteFunctions/websiteFunctions.js b/websiteFunctions/static/websiteFunctions/websiteFunctions.js index 311e5cd17..7ff89acad 100755 --- a/websiteFunctions/static/websiteFunctions/websiteFunctions.js +++ b/websiteFunctions/static/websiteFunctions/websiteFunctions.js @@ -2716,6 +2716,13 @@ app.controller('listWebsites', function ($scope, $http, $window) { text: 'Setting updated successfully.', type: 'success' }); + if (setting === 'password-protection' && wp[settingMap[setting]] === 1) { + // Show password protection modal if enabling + wp.PPUsername = ""; + wp.PPPassword = ""; + $scope.currentWP = wp; + $('#passwordProtectionModal').modal('show'); + } } else { // Revert the change if update failed wp[settingMap[setting]] = wp[settingMap[setting]] === 1 ? 0 : 1; @@ -6282,6 +6289,13 @@ app.controller('listWebsites', function ($scope, $http, $window) { text: 'Setting updated successfully.', type: 'success' }); + if (setting === 'password-protection' && wp[settingMap[setting]] === 1) { + // Show password protection modal if enabling + wp.PPUsername = ""; + wp.PPPassword = ""; + $scope.currentWP = wp; + $('#passwordProtectionModal').modal('show'); + } } else { // Revert the change if update failed wp[settingMap[setting]] = wp[settingMap[setting]] === 1 ? 0 : 1; @@ -10197,6 +10211,13 @@ app.controller('manageAliasController', function ($scope, $http, $timeout, $wind text: 'Setting updated successfully.', type: 'success' }); + if (setting === 'password-protection' && wp[settingMap[setting]] === 1) { + // Show password protection modal if enabling + wp.PPUsername = ""; + wp.PPPassword = ""; + $scope.currentWP = wp; + $('#passwordProtectionModal').modal('show'); + } } else { // Revert the change if update failed wp[settingMap[setting]] = wp[settingMap[setting]] === 1 ? 0 : 1; diff --git a/websiteFunctions/templates/websiteFunctions/listWebsites.html b/websiteFunctions/templates/websiteFunctions/listWebsites.html index 2ec0a353d..9bf7f009e 100755 --- a/websiteFunctions/templates/websiteFunctions/listWebsites.html +++ b/websiteFunctions/templates/websiteFunctions/listWebsites.html @@ -220,7 +220,9 @@
@@ -228,13 +230,17 @@