mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-03-05 11:50:50 +01:00
maintenanceMod fix
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -220,7 +220,9 @@
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="wp.debugging" ng-change="updateSetting(wp, 'debugging')">
|
||||
<input type="checkbox"
|
||||
ng-click="updateSetting(wp, 'debugging')"
|
||||
ng-checked="wp.debugging == 1">
|
||||
Debugging
|
||||
</label>
|
||||
</div>
|
||||
@@ -228,13 +230,17 @@
|
||||
<div class="col-sm-6">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="wp.passwordProtection" ng-change="togglePasswordProtection(wp)">
|
||||
<input type="checkbox"
|
||||
ng-click="updateSetting(wp, 'password-protection')"
|
||||
ng-checked="wp.passwordProtection == 1">
|
||||
Password protection
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="wp.maintenanceMode" ng-change="updateSetting(wp, 'maintenance-mode')">
|
||||
<input type="checkbox"
|
||||
ng-click="updateSetting(wp, 'maintenance-mode')"
|
||||
ng-checked="wp.maintenanceMode == 1">
|
||||
Maintenance mode
|
||||
</label>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user