added working javascript to delete photos in nested forms properly