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