add header for modules configuration page
parent
44e74e7e05
commit
997096b9bc
|
@ -2,7 +2,9 @@ dev
|
||||||
- [ ] add global config for file size limit
|
- [ ] add global config for file size limit
|
||||||
- [ ] add module to check deprecated PHP function
|
- [ ] add module to check deprecated PHP function
|
||||||
- [ ] add module to check directory structure
|
- [ ] add module to check directory structure
|
||||||
|
- [ ] add module to create full README file
|
||||||
- [ ] write documentation of php class
|
- [ ] write documentation of php class
|
||||||
|
- add header for modules configuration
|
||||||
|
|
||||||
0.5 - 2021.11.05
|
0.5 - 2021.11.05
|
||||||
- add settings to disable (hide) modules
|
- add settings to disable (hide) modules
|
||||||
|
|
|
@ -200,6 +200,16 @@ abstract class ImproveAction
|
||||||
*/
|
*/
|
||||||
abstract public function isConfigured(): bool;
|
abstract public function isConfigured(): bool;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get action configuration page header
|
||||||
|
*
|
||||||
|
* @return string Headers
|
||||||
|
*/
|
||||||
|
public function header(): ?string
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get configuraton gui
|
* Get configuraton gui
|
||||||
*
|
*
|
||||||
|
|
|
@ -101,16 +101,22 @@ if (!empty($_POST['fix'])) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$action = null;
|
||||||
|
$header = '';
|
||||||
$breadcrumb = [];
|
$breadcrumb = [];
|
||||||
if (!empty($_REQUEST['config'])) {
|
if (!empty($_REQUEST['config'])) {
|
||||||
$breadcrumb = [
|
$breadcrumb = [
|
||||||
__('Configure module') => ''
|
__('Configure module') => ''
|
||||||
];
|
];
|
||||||
|
if (null !== ($action = $improve->module($_REQUEST['config']))) {
|
||||||
|
$header = $action->header();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# display header
|
# display header
|
||||||
echo '<html><head><title>' . __('improve') . '</title>' .
|
echo '<html><head><title>' . __('improve') . '</title>' .
|
||||||
dcPage::jsLoad(dcPage::getPF('improve/js/index.js')) .
|
dcPage::jsLoad(dcPage::getPF('improve/js/index.js')) .
|
||||||
|
$header .
|
||||||
'</head><body>' .
|
'</head><body>' .
|
||||||
dcPage::breadcrumb(array_merge([
|
dcPage::breadcrumb(array_merge([
|
||||||
__('Plugins') => '',
|
__('Plugins') => '',
|
||||||
|
@ -132,7 +138,7 @@ if (empty($_REQUEST['config'])) {
|
||||||
if (!empty($_REQUEST['config'])) {
|
if (!empty($_REQUEST['config'])) {
|
||||||
$back_url = $_REQUEST['redir'] ?? $core->adminurl->get('admin.plugin.improve', ['type' => $type]);
|
$back_url = $_REQUEST['redir'] ?? $core->adminurl->get('admin.plugin.improve', ['type' => $type]);
|
||||||
|
|
||||||
if (null !== ($action = $improve->module($_REQUEST['config']))) {
|
if (null !== $action) {
|
||||||
$redir = $_REQUEST['redir'] ?? $core->adminurl->get('admin.plugin.improve', ['type' => $type, 'config' => $action->id]);
|
$redir = $_REQUEST['redir'] ?? $core->adminurl->get('admin.plugin.improve', ['type' => $type, 'config' => $action->id]);
|
||||||
$res = $action->configure($redir);
|
$res = $action->configure($redir);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue