public function ImportForm()
    {
        $form = parent::ImportForm();
        if (!$form) {
            return;
        }

        $form->unsetAllActions();
        $newActionList = new FieldList(array(
            new FormAction('import', _t('AdvancedWorkflowAdmin.IMPORT', 'Import workflow'))
        ));
        $form->Fields()->fieldByName('_CsvFile')->getValidator()->setAllowedExtensions(array('yml', 'yaml'));
        $form->Fields()->removeByName('EmptyBeforeImport');
        $form->setActions($newActionList);

        return $form;
    }
public function ImportForm()
    {
        $form = parent::ImportForm();
        if (!$form) {
            return;
        }

        $form->unsetAllActions();
        $newActionList = new FieldList(array(
            new FormAction('import', _t('AdvancedWorkflowAdmin.IMPORT', 'Import workflow'))
        ));
        $form->Fields()->fieldByName('_CsvFile')->getValidator()->setAllowedExtensions(array('yml', 'yaml'));
        $form->Fields()->removeByName('EmptyBeforeImport');
        $form->setActions($newActionList);

        return $form;
    }
public function ImportForm ( ) { $ form = parent :: ImportForm ( ) ; if ( ! $ form ) { return ; } $ form -> unsetAllActions ( ) ; $ newActionList = new FieldList ( array ( new FormAction ( 'import' , _t ( 'AdvancedWorkflowAdmin.IMPORT' , 'Import workflow' ) ) ) ) ; $ form -> Fields ( ) -> fieldByName ( '_CsvFile' ) -> getValidator ( ) -> setAllowedExtensions ( array ( 'yml' , 'yaml' ) ) ; $ form -> Fields ( ) -> removeByName ( 'EmptyBeforeImport' ) ; $ form -> setActions ( $ newActionList ) ; return $ form ; }
Required so we can simply change the visible label of the "Import" button and lose some redundant form-fields.

@return Form
Required so we can simply change the visible label of the Import button and lose some redundant form - fields .