Browse Source

refactored ingest form context title.

pull/656/head
MorganDawe 9 years ago
parent
commit
968485f148
  1. 26
      includes/ingest.form.inc

26
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' => "<h3>$label</h3>",
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' => "<h3>$cmodel_label</h3></br>",
'#weight' => -1000,
);
}

Loading…
Cancel
Save