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:
Michal Kváček
2016-04-01 17:00:10 +02:00
parent 509ef1752e
commit 0c1162589c
+3 -3
View File
@@ -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();