Block System Fixes
This commit is contained in:
parent
e70ca58ec2
commit
11a7c66be5
|
@ -26,12 +26,9 @@ class LinkTypeViewController extends Controller
|
||||||
$data['button_id'] = $link->button_id;
|
$data['button_id'] = $link->button_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if type_params is not empty and is a valid JSON string
|
|
||||||
if (!empty($link->type_params) && is_string($link->type_params)) {
|
if (!empty($link->type_params) && is_string($link->type_params)) {
|
||||||
// Decode the JSON string into an associative array
|
|
||||||
$typeParams = json_decode($link->type_params, true);
|
$typeParams = json_decode($link->type_params, true);
|
||||||
if (is_array($typeParams)) {
|
if (is_array($typeParams)) {
|
||||||
// Merge the associative array into $data
|
|
||||||
$data = array_merge($data, $typeParams);
|
$data = array_merge($data, $typeParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,9 +43,11 @@ class LinkTypeViewController extends Controller
|
||||||
'selected' => ($linkId && isset($link) && $link->button_id == $btn->id),
|
'selected' => ($linkId && isset($link) && $link->button_id == $btn->id),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
return view('components.pageitems.predefined-form', $data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the block asset context before returning the view
|
||||||
|
setBlockAssetContext($typename);
|
||||||
|
|
||||||
return view($typename . '.form', $data);
|
return view($typename . '.form', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
|
@push('sidebar-stylesheets')
|
||||||
|
<script src="{{ asset('assets/external-dependencies/fontawesome.js') }}" crossorigin="anonymous"></script>
|
||||||
|
@endpush
|
||||||
|
|
||||||
<div class="conatiner-fluid content-inner mt-n5 py-0">
|
<div class="conatiner-fluid content-inner mt-n5 py-0">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue