Fix JS error in bootstrap_tab form template

We deleted the Prev/Next buttons in a previous PR (since we use tabs and
not Prev/Next) but form.js was erroring when it could not find those
elements.

This fix checks for the existence of the elements before using them.