This is as simple as getting rid of
protected function alterForm( HTMLForm $form ) { $form->setDisplayFormat( 'div' ); $form->setWrapperLegend( false ); }
and replacing it with:
protected function getDisplayFormat() { return 'ooui'; }
...unfortunately hide-if doesn't currently work in ooui (T141558), so the source field shows up even when there's no content import selected.