Browse Source

ISLANDORA-171 Don't show Add tab if the add object form is empty.

pull/105/head
Alexander O'Neill 14 years ago
parent
commit
767699a07b
  1. 5
      CollectionClass.inc
  2. 6
      formClass.inc

5
CollectionClass.inc

@ -436,12 +436,11 @@ class CollectionClass {
$tabset['add_tab'] = array( $tabset['add_tab'] = array(
// #type and #title are the minimum requirements. // #type and #title are the minimum requirements.
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('Add / Edit'), '#title' => t('Add'),
'#selected' => $show_ingest_tab, '#selected' => $show_ingest_tab,
// This will be the content of the tab. // This will be the content of the tab.
'#content' => $add_to_collection, '#content' => $add_to_collection,
); );
return $tabset; return $tabset;
} }
@ -464,7 +463,7 @@ class CollectionClass {
} }
} }
else { else {
$ingestObject = ' '; $ingestObject = '';
} }
return $ingestObject; return $ingestObject;

6
formClass.inc

@ -707,8 +707,10 @@ class formClass {
'#default_value' => variable_get('feed_item_length', 'teaser'), '#default_value' => variable_get('feed_item_length', 'teaser'),
'#weight' => '-1', '#weight' => '-1',
'#description' => t('Datastream IDs defined by the content model.'), '#description' => t('Datastream IDs defined by the content model.'),
); );
$form['stream_id']['#options'] = array_combine($unused_dsids, $unused_dsids);
$form['stream_id']['#options'] = array_combine($unused_dsids, $unused_dsids);
} }
else { else {
$form['stream_id'] = array( $form['stream_id'] = array(

Loading…
Cancel
Save