OnBeforeDocFormSave to also pass $parent and $template.
Omitted in earlier commits due to an oversight.