config/module(enable|disable): Perform a HTTP redirect upon success

An HTTP redirect will cause a full reload. If our cache works,
CSS and JS is automatically refreshed.
This commit is contained in:
Johannes Meyer 2021-04-12 16:53:20 +02:00
parent 384d9535a9
commit 95e20d443c
1 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ class ConfigController extends Controller
Icinga::app()->getModuleManager()->enableModule($module);
Notification::success(sprintf($this->translate('Module "%s" enabled'), $module));
$form->onSuccess();
$this->rerenderLayout()->reloadCss()->redirectNow('config/modules');
$this->redirectHttp('config/modules');
});
try {
@ -206,7 +206,7 @@ class ConfigController extends Controller
Icinga::app()->getModuleManager()->disableModule($module);
Notification::success(sprintf($this->translate('Module "%s" disabled'), $module));
$form->onSuccess();
$this->rerenderLayout()->reloadCss()->redirectNow('config/modules');
$this->redirectHttp('config/modules');
});
try {