diff --git a/includes/ingest.form.inc b/includes/ingest.form.inc index c9f070e2..e14fd4e9 100644 --- a/includes/ingest.form.inc +++ b/includes/ingest.form.inc @@ -925,27 +925,11 @@ function islandora_ingest_form_get_steps(array &$form_state) { * Implements hook_form_alter(). */ function islandora_form_islandora_ingest_form_alter(&$form, &$form_state) { - // Check if multiple content models are available to select from. - if (count($form_state['islandora']['step_storage']['islandora_basic_collection_select_content_model']['models']) > 1) { - if (!isset($form_state['islandora']['step_storage']['active_cmodel']) && - isset($form_state['islandora']['step_storage']['islandora_basic_collection_select_content_model']['values'])) { - $model = $form_state['islandora']['step_storage']['islandora_basic_collection_select_content_model']['values']['models']; - $form_state['islandora']['step_storage']['active_cmodel'] = islandora_object_load($model); - } - } - else { - // Keep a reference to the only available cmodel, if it does not - // already exist. - if (!isset($form_state['islandora']['step_storage']['active_cmodel'])) { - $model = $form_state['islandora']['step_storage']['islandora_basic_collection_select_content_model']['models'][0]; - $form_state['islandora']['step_storage']['active_cmodel'] = islandora_object_load($model); - } - } - - if (isset($form_state['islandora']['step_storage']['active_cmodel'])) { - $label = $form_state['islandora']['step_storage']['active_cmodel']->{'label'}; - $form['contact_information'] = array( - '#markup' => "

$label

", + foreach ($form_state['islandora']['shared_storage']['models'] as $key => $cmodel) { + $fedora_cmodel = islandora_object_load($cmodel); + $cmodel_label = $fedora_cmodel->{'label'}; + $form["contact_information_$key"] = array( + '#markup' => "

$cmodel_label


", '#weight' => -1000, ); }