craue / CraueFormFlowBundle

Multi-step forms for your Symfony project.
MIT License
736 stars 118 forks source link

Change button order and add icons #285

Closed Robouste closed 7 years ago

Robouste commented 7 years ago

Hi,

I would like to know if we can change button order ? The next button is before the previous button, which is not intuitive.

Plus, I would like to add font icons inside the button but when I do : craue_formflow_button_label_back: '<i class="material-icons left">navigate_before</i>Previous'

I get the raw html inside de button.

I'm doing this as a workaround but it's not clean :

    var icons = {
        prev : '<i class="material-icons left">navigate_before</i>',
        next : '<i class="material-icons left">navigate_next</i>',
        reset : '<i class="material-icons left">refresh</i>',
        finish : '<i class="material-icons left">save</i>'
    };

    $(".step-next").prepend(icons.next);
    $(".step-prev").prepend(icons.prev);
    $(".step-reset").prepend(icons.reset);
    $(".step-finish").prepend(icons.finish);
craue commented 7 years ago

It's always possible to just override the template to make it fit your special needs. :smirk:

Robouste commented 7 years ago

Yep, I'll give it a try but I'm new to all the symfony stuff.

If I may give my opinion, "next" button should be after "previous" :)

craue commented 7 years ago

Take a look at the docs. There's a note about CSS for the correct button order.

Robouste commented 7 years ago

Applying a class with float:left; to the previousbutton did the trick, thanks :)