Browse Source

Moving backwards though the form now brings the user to the expected step.

There was a mistake where a step was reverting its global changes before it was
actually selected as the previous step. Innocuous enough but it had strange
side effects on the global storage, since the step list would be rebuild with
this information, steps could insert themselves as previous steps even if they
weren't used by the user.
pull/334/head
Nigel Banks 12 years ago
parent
commit
7f8e9ff0a3
  1. 4
      includes/ingest.form.inc

4
includes/ingest.form.inc

@ -534,7 +534,7 @@ function islandora_ingest_form_previous_button(array &$form_state) {
$prev_form_step = islandora_ingest_form_get_previous_form_step($form_state); $prev_form_step = islandora_ingest_form_get_previous_form_step($form_state);
$form_id = $prev_form_step['form_id']; $form_id = $prev_form_step['form_id'];
$submit_callback = $form_id . '_undo_submit'; $submit_callback = $form_id . '_undo_submit';
$submit = function_exists($submit_callback) ? array($submit_callback, 'islandora_ingest_form_previous_submit') : array('islandora_ingest_form_previous_submit'); $submit = function_exists($submit_callback) ? array('islandora_ingest_form_previous_submit', $submit_callback) : array('islandora_ingest_form_previous_submit');
return array( return array(
'#type' => 'submit', '#type' => 'submit',
'#value' => t('Previous'), '#value' => t('Previous'),
@ -731,7 +731,7 @@ function &islandora_ingest_form_get_objects(array &$form_state) {
*/ */
function islandora_ingest_form_get_object(array &$form_state) { function islandora_ingest_form_get_object(array &$form_state) {
$objects = &islandora_ingest_form_get_objects($form_state); $objects = &islandora_ingest_form_get_objects($form_state);
return current($objects); return reset($objects);
} }
/** /**

Loading…
Cancel
Save