FIX: fix content edit
Content edit was strongly limited only on static pages. This limit was removed in this commit.
This commit is contained in:
@@ -41,11 +41,11 @@ class EditContent extends Controller
|
|||||||
$statuses = ContentStatuses::getWithTranslations();
|
$statuses = ContentStatuses::getWithTranslations();
|
||||||
|
|
||||||
// try to find requested page
|
// try to find requested page
|
||||||
$page = Content::where('module_handler', config('staticpages.handler'))
|
$page = Content::findOrFail($id);
|
||||||
->findOrFail($id);
|
$page->module_settings = json_decode($page->module_settings);
|
||||||
|
|
||||||
$allModules = ModulesHandlerToId::getWithTranslations();
|
$allModules = ModulesHandlerToId::getWithTranslations();
|
||||||
$moduleId = $allModules[config('staticpages.handler')];
|
$moduleId = $allModules[$page->module_handler];
|
||||||
$templates = Template::where('module_id', $moduleId)
|
$templates = Template::where('module_id', $moduleId)
|
||||||
->select(['template_name', 'name', 'description'])
|
->select(['template_name', 'name', 'description'])
|
||||||
->get();
|
->get();
|
||||||
|
|||||||
Reference in New Issue
Block a user