Browse Source

first draft fix for #93

7.x-2.x
Jason Peak 9 years ago
parent
commit
9f9a441d6d
  1. 5
      islandora_basic_image/islandora_basic_image.module

5
islandora_basic_image/islandora_basic_image.module

@ -33,6 +33,7 @@ function islandora_basic_image_form($node, array &$form_state) {
* Implements hook_form_FORM_ID_alter().
*/
function islandora_basic_image_form_islandora_basic_image_node_form_alter(&$form, array &$form_state, $form_id) {
dpm($form);
$form['title']['#weight'] = -6;
$form['obj'] = array(
'#type' => 'file',
@ -81,8 +82,8 @@ function islandora_basic_image_form_islandora_basic_image_node_form_alter(&$form
function islandora_basic_image_add_parent_uuid(array $form, array &$form_state) {
$node = $form_state['node'];
$node->parent_collection = "";
if (isset($form_state['parent_collection']['#value'])) {
$node->parent_collection = $form_state['parent_collection']['#value'];
if (isset($form_state['values']['parent_collection'])) {
$form_state['values']['field_fedora_has_parent']['und'][0]['value'] = $form_state['values']['parent_collection'];
}
}

Loading…
Cancel
Save