/**
 * Called after the check that all required registry values
 * have been set correctly has run.
 *
 * @return void
 * /
     public function afterRegistry()
     {
    parent::afterRegistry();
     }
 
     /**
 * Creates the model
 *
 * @return \MUtil_Model_ModelAbstract
 */
 protected function createModel()
 {
     if (!$this->importModel instanceof \MUtil_Model_ModelAbstract) {
         $surveyId = $this->request->getParam(\MUtil_Model::REQUEST_ID);
         if ($surveyId) {
             $this->formData['survey'] = $surveyId;
             $this->_survey = $this->loader->getTracker()->getSurvey($surveyId);
             $surveys[$surveyId] = $this->_survey->getName();
             $elementClass = 'Exhibitor';
             $tracks = $this->util->getTranslated()->getEmptyDropdownArray() + $this->util->getTrackData()->getTracksBySurvey($surveyId);
         } else {
             $empty = $this->util->getTranslated()->getEmptyDropdownArray();
             $trackData = $this->util->getTrackData();
             $surveys = $empty + $trackData->getActiveSurveys();
             $tracks = $empty + $trackData->getAllTracks();
             $elementClass = 'Select';
         }
         parent::createModel();
         $order = $this->importModel->getOrder('trans') - 5;
         $this->importModel->set('survey', 'label', $this->_('Survey'), 'elementClass', $elementClass, 'multiOptions', $surveys, 'onchange', 'this.form.submit();', 'order', $order, 'required', true);
         $this->importModel->set('track', 'label', $this->_('Track'), 'description', $this->_('Optionally assign answers only within a single track'), 'multiOptions', $tracks);
         $this->importModel->set('skipUnknownPatients', 'label', $this->_('Skip unknowns'), 'default', 0, 'description', $this->_('What to do when the respondent does not exist'), 'elementClass', 'Checkbox', 'multiOptions', $this->util->getTranslated()->getYesNo());
         $tokenCompleted = array(\Gems_Model_Translator_AnswerTranslatorAbstract::TOKEN_OVERWRITE => $this->_('Delete old token and create new'), \Gems_Model_Translator_AnswerTranslatorAbstract::TOKEN_DOUBLE => $this->_('Create new extra set of answers'), \Gems_Model_Translator_AnswerTranslatorAbstract::TOKEN_ERROR => $this->_('Abort the import'), \Gems_Model_Translator_AnswerTranslatorAbstract::TOKEN_SKIP => $this->_('Skip the token'));
         $this->importModel->set('tokenCompleted', 'label', $this->_('When token completed'), 'default', \Gems_Model_Translator_AnswerTranslatorAbstract::TOKEN_ERROR, 'description', $this->_('What to do when an imported token has already been completed'), 'elementClass', 'Radio', 'multiOptions', $tokenCompleted);
         $tokenTreatments = array(\Gems_Model_Translator_AnswerTranslatorAbstract::TOKEN_ERROR => $this->_('Abort the import'), \Gems_Model_Translator_AnswerTranslatorAbstract::TOKEN_SKIP => $this->_('Skip the token'));
         $this->importModel->set('noToken', 'label', $this->_('Token does not exist'), 'default', \Gems_Model_Translator_AnswerTranslatorAbstract::TOKEN_ERROR, 'description', $this->_('What to do when no token exist to import to'), 'elementClass', 'Radio', 'multiOptions', $tokenTreatments);
         if (\MUtil_Bootstrap::enabled()) {
             $this->importModel->set('tokenCompleted', 'separator', '');
         } else {
             $this->importModel->set('trans', 'separator', '<br/>');
         }
     }
     return $this->importModel;
 }