Render <legend> only if there is a legend

Fieldset legends are rendered even if there is no legend.
This extra `{%if %}` fixes this