@@ -28,54 +28,34 @@ class maintenanceMode extends \ls\pluginmanager\PluginBase {
protected$settings=array(
'dateTime'=>array(
'type'=>'date',
'label'=>'Date / time for maintenance mode.',
'help'=>'Empty disable maintenance mode.',
'default'=>'',
),
'timeForDelay'=>array(
'type'=>'string',
'label'=>'Show warning message delay.',
'help'=>'In minutes',//@todo : relative format : ' or using <a href="//php.net/manual/datetime.formats.relative.php">Relative Formats</a>.',
'default'=>'60',
),
'superAdminOnly'=>array(
'type'=>'boolean',
'label'=>'Allow only super administrator to admin page.',
'help'=>'Remind : admin login page are always accessible.',
'default'=>0,
),
'disablePublicPart'=>array(
'type'=>'boolean',
'label'=>'Disable public part for administrator users.',
'help'=>'Superadministrator(s) have always all access.',
'default'=>0,
),
'messageToShow'=>array(
'type'=>'text',
'label'=>'Maintenance message',
'htmlOptions'=>array(
'placeholder'=>'This website are on maintenance mode.',
),
'default'=>'',
),
'warningToShow'=>array(
'type'=>'text',
'label'=>'Warning message.',
'htmlOptions'=>array(
'placeholder'=>'<strong>Warning</strong> This website close for maintenance at {DATEFORMATTED} (in {MINUTES} minutes).',
),
'help'=>'You can use Expression manager : {DATEFORMATTED} was replaced by date in user language format, {DATE} by date in <code>Y-m-d H:i</code> format and {MINUTES} by number of minutes before maintenance.',
'default'=>'',
),
'disableMailSend'=>array(
'type'=>'boolean',
'label'=>'Disable token emailing during maintenance',
'default'=>1,
),
'urlRedirect'=>array(
'type'=>'string',
'label'=>'Url to redirect users',
'help'=>'Enter complete url only (with http:// or https://). {LANGUAGE} was replace by user language (ISO format if exist in this installation).',
'default'=>'',
),
);
...
...
@@ -88,6 +68,72 @@ class maintenanceMode extends \ls\pluginmanager\PluginBase {
'help'=>$this->_translate("In minutes"),//@todo : relative format : ' or using <a href="//php.net/manual/datetime.formats.relative.php">Relative Formats</a>.',
),
'superAdminOnly'=>array(
'label'=>$this->_translate("Allow only super administrator to admin page."),
'help'=>$this->_translate("Admin login page are always accessible."),
),
'disablePublicPart'=>array(
'label'=>$this->_translate("Disable public part for administrator users."),
'help'=>$this->_translate("Even for Superadministrator(s)."),
'placeholder'=>$this->_translate("This website are on maintenance mode."),
),
),
'warningToShow'=>array(
'label'=>$this->_translate("Warning message."),
'htmlOptions'=>array(
'placeholder'=>sprintf("<strong class='h4'>%s</strong><p>%s</p>",$this->_translate("Warning"),$this->_translate("This website close for maintenance at {DATEFORMATTED} (in {intval(MINUTES)} minutes).")),
),
'help'=>$this->_translate("You can use Expression manager : {DATEFORMATTED} was replaced by date in user language format, {DATE} by date in <code>Y-m-d H:i</code> format and {MINUTES} by number of minutes before maintenance."),
),
'disableMailSend'=>array(
'label'=>$this->_translate("Disable token emailing during maintenance"),
'default'=>1,
),
'urlRedirect'=>array(
'label'=>$this->_translate("Url to redirect users"),
'help'=>$this->_translate("Enter complete url only (with http:// or https://). {LANGUAGE} was replace by user language (ISO format if exist in this installation)."),
$pluginSettings['messageToShow']['htmlOptions']['placeholder']=$this->_translate("This website are on maintenance mode.");
$pluginSettings['warningToShow']['htmlOptions']['placeholder']=sprintf("<strong class='h4'>%s</strong><p>%s</p>",$this->_translate("Warning"),$this->_translate("This website close for maintenance at {DATEFORMATTED} (in {intval(MINUTES)} minutes)."));