Widget template updated to handle the case where {{form.media}} is rendered after its associated form