From 90ce74cd788412db9ffa76bc7012d2ad98b31246 Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Mon, 28 May 2012 20:14:38 -0300 Subject: [PATCH] start of object propertes submit function --- includes/object_properties.inc | 47 +++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/includes/object_properties.inc b/includes/object_properties.inc index 8897ff3b..34a7b67e 100644 --- a/includes/object_properties.inc +++ b/includes/object_properties.inc @@ -1,5 +1,50 @@ owner){ + $params['ownerId'] = check_plain($owner); + $submit = TRUE; + } + if(isset($state) && $state != $islandora_object->state){ + $params['state'] = check_plain($state); + $submit = TRUE; + } + if(isset($label) && $label != $islandora_object->label){ + $params['label'] = check_plain($label); + $submit = TRUE; + } + if($submit){ + $islandora_object->modifyObject($params); + } +} + +/** + * + * @param array $form + * @param array $form_state + * @param string $object_id + * an object id + * @return array + */ function islandora_edit_properties_form ($form, &$form_state, $object_id){ $form = array(); $islandora_object = islandora_get_object($object_id); @@ -29,7 +74,7 @@ function islandora_edit_properties_form ($form, &$form_state, $object_id){ '#title' => t('State'), '#default_value' => $islandora_object->state, '#required' => TRUE, - '#description' => t('The items state, either active, inactive or deleted'), + '#description' => t('The items state one of active, inactive or deleted'), '#type' => 'select', '#options' => array ('A' => 'Active', 'I' => 'Inactive', 'D'=>'Deleted'), );