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.
Merge pull request #816 from Sophist-UK/fix_js_error_form_bootstrap_tab

Fix JS error in bootstrap_tab form template