orocrmorocommerce

How can I remove standard operation classes in Oro?


We have so called operations (actions) in Oro - forms and buttons that do some action. The problem is with styling of these buttons. We can add additions classes to them through yml, but we can't remove existing classes (like .operation-button class). Maybe there is actually a way to delete this standard classes?

operations:
    my_operation:
        button_options:
            class: btn btn--action-important

Solution

  • The operation-button class is define in the OroActionBundle:Operation:button.html.twig template.

    It is recommended to update styles for the operation-button class to comply with your needs.

    Or, you can define own template for the operation button:

        operations:
            my_operation:
                button_options:
                    class: btn btn--action-important
                    template: MyActionBundle:Operation:button.html.twig
    

    If you need to apply changes to all operation buttons you can override base template. See Back-Office Customization Templates (Twig) in Developer Guide.