Open
Description
Hi everyone,
I have implemented blocks
, which allow me to split op a crud form over multiple cards/columns using e.g. col-md-6
.
The config is similar to tabs
: add 'block'=>'block_name'
to a field. To customize blocks, e.g. styling and title, one can use blockOptions
:
$this->crud->setOperationSetting('blockOptions', [
'general' => [
'wrapper_class' => 'col-md-12 compact-form',
'show_title' => false,
],
'pickUpAddress' => [
'wrapper_class' => 'col-md-6 compact-form',
'title' => __('order.pick_up_address'),
'show_title' => true,
],
'deliveryAddress' => [
'wrapper_class' => 'col-md-6 compact-form',
'title' => __('order.delivery_address'),
'show_title' => true,
],
'goods' => [
'wrapper_class' => 'col-md-12 compact-form',
'title' => __('order.goods'),
'show_title' => true,
],
'goodsRetour' => [
'wrapper_class' => 'col-md-12',
'title' => __('order.goods_retour'),
]
]);
At the moment, I implemented this by overwriting the CrudPanel
class and adding a Blocks
trait. This means that it breaks when these files are updated in Backpack.
Do you know if there is any interest in this functionality? In that case, I could clean up my code, fork Backpack, and make a PR. Or are there any other possibilities to extend CrudPanel
, Fields
, and FieldsProtectedMethods
without editing the backpack core?
Metadata
Metadata
Assignees
Labels
No labels