agence-adeliom / easy-media-bundle

A Symfony Media manager bundle for EasyAdmin
MIT License
27 stars 18 forks source link

When loading EasyFields/form/choice_mask_widget.html.twig the panels are not displayed anymore #24

Closed jdadeliom closed 1 year ago

jdadeliom commented 1 year ago
public function configureCrud(): Crud
    {
        return Crud::new()
            ->addFormTheme('@EasyCommon/crud/custom_panel.html.twig')
            ->addFormTheme('@EasyFields/form/choice_mask_widget.html.twig')
        ;
    }

when using custom_panel with choice_mask_widget, the panels don't work anymore

jdadeliom commented 1 year ago

When not using choice_mask_widget

Capture d’écran 2023-08-03 à 14 06 53

When using it

Capture d’écran 2023-08-03 à 14 07 19

arnaud-ritti commented 1 year ago

You have to switch them because choice_mask_widget need to change fields row attrs

public function configureCrud(): Crud
{
    return Crud::new()
        ->addFormTheme('@EasyCommon/crud/custom_panel.html.twig')
        ->addFormTheme('@EasyFields/form/choice_mask_widget.html.twig')
    ;
}

this is working

arnaud-ritti commented 1 year ago

But custom panel will be removed because it is not following EasyAdmin UI, feel free to add a custom css class and add your own css styles if needed