FEATURE: json_decode widget settings before calling handler
This commit is contained in:
@@ -19,6 +19,7 @@ class EditWidget extends Controller
|
||||
public function getEdit($id)
|
||||
{
|
||||
$widget = Widget::findOrFail($id);
|
||||
$widget->settings = json_decode($widget->settings);
|
||||
|
||||
$presenter = call_user_func([$widget->widget_type_handler, 'getPresenter']);
|
||||
|
||||
@@ -40,11 +41,9 @@ class EditWidget extends Controller
|
||||
|
||||
// update name
|
||||
$widget->name = $request->name;
|
||||
|
||||
// save description if available
|
||||
if (isset($request->description)) {
|
||||
$widget->description = $request->description;
|
||||
}
|
||||
$widget->container_class = $request->containerClass;
|
||||
$widget->container_id = $request->containerId;
|
||||
$widget->description = $request->description;
|
||||
|
||||
// try to save this widget
|
||||
try {
|
||||
@@ -76,7 +75,8 @@ class EditWidget extends Controller
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function deleteWidget($id) {
|
||||
public function deleteWidget($id)
|
||||
{
|
||||
// create new widget
|
||||
$widget = Widget::findOrFail($id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user