phiamo/MopaBootstrapBundle — pull request #791 by rdohms (2014-02-07 14:54:42+00:00)
Title: Form Actions Support

This allows you to add buttons in a collection that prints them all together.

The syntax used on the form objects is:
```
->add('buttons', 'form_actions', [
'buttons' => [
'save' => ['type' => 'submit', 'options' => ['label' => 'button.save']],
'cancel' => ['type' => 'button', 'options' => ['label' => 'button.cancel']],
]
]);
```

The offset button extension may need some adjustments to work here.

*Caveat:*
Bootstrap relies on the presence of whitespace between buttons to show them with proper spacing. Since most of the form stuff in symfony is encapsulated by `spaceless` at one point or another, the only way to ensure space between buttons is by using a ` `. Which i did in the template.
Another possible solution is to add a custom style that adds the margin, but this breaks the "don't touch bootstrap" way of things and adds custom CSS, probably not a good idea.