Merge pull request #343 from lakshya-webkul/gli-maintenance-feature-improvement

Added a feature the employee can access the site in maintenance mode
This commit is contained in:
Rohit Jain
2022-12-12 15:34:22 +05:30
committed by GitHub
8 changed files with 485 additions and 95 deletions

View File

@@ -48,6 +48,14 @@ class AdminMaintenanceControllerCore extends AdminController
'cast' => 'intval',
'type' => 'bool'
),
'PS_ALLOW_EMP' => array(
'title' => $this->l('Allow Employees'),
'desc' => $this->l('Allow the employees to access the site using email and password.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool',
'class' => "hello"
),
'PS_MAINTENANCE_IP' => array(
'title' => $this->l('Maintenance IP'),
'hint' => $this->l('IP addresses allowed to access the front office even if the site is disabled. Please use a comma to separate them (e.g. 42.24.4.2,127.0.0.1,99.98.97.96)'),
@@ -60,4 +68,10 @@ class AdminMaintenanceControllerCore extends AdminController
),
);
}
public function setMedia()
{
parent::setMedia();
$this->addJS(_PS_JS_DIR_.'maintenance.js');
}
}