@@ -29,15 +29,15 @@ class maintenanceMode extends \ls\pluginmanager\PluginBase {
'dateTime'=>array(
'type'=>'date',
'label'=>'Date / time for maintenance mode.',
'help'=>'Leave empty disable maintenance mode.',
'help'=>'Empty disable maintenance mode.',
'default'=>'',
),
'timeForDelay'=>array(
'type'=>'string',
'label'=>'Delay for warning.',
'help'=>'In minutes',//@todo : relative format : ' or using <a href="//php.net/manual/datetime.formats.relative.php">Relative Formats</a>.',
'default'=>'',
),
//~ 'warningDelay' => array(
//~ 'type' => 'string',
//~ 'label' => 'Delay to show the warning.',
//~ 'help' => 'Leaving empty to disable warning. Linute if is numeric, can use <a href="https://secure.php.net/manual/datetime.formats.relative.php">Relative Formats</a>',
//~ 'default'=> '',
//~ ),
'superAdminOnly'=>array(
'type'=>'boolean',
'label'=>'Allow only super administrator.',
...
...
@@ -64,6 +64,15 @@ class maintenanceMode extends \ls\pluginmanager\PluginBase {
'help'=>'Not needed if you use redirect',
'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'=>'{DATEFORMATTED} was replaced by date (in user language format) and minutes by number of minutes before maintenance.',//@todo : allow EM with DATE/DATEFORMATTED AND MINUTES
'default'=>'',
),
'disableMailSend'=>array(
'type'=>'boolean',
'label'=>'Disable token emailing during maintenance',
...
...
@@ -110,24 +119,13 @@ class maintenanceMode extends \ls\pluginmanager\PluginBase {
$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)."));
return$pluginSettings;
}
...
...
@@ -193,7 +196,22 @@ class maintenanceMode extends \ls\pluginmanager\PluginBase {
$message=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)."));