Handle inline buttons in controls template

Improved the render phase to be able to remove completely the buttonsTpl from the dom