You are here

function asaf_batch_alter in Asaf (ajax submit for any form) 8

Same name and namespace in other branches
  1. 7 asaf.module \asaf_batch_alter()

File

./asaf.module, line 54
Main module file.

Code

function asaf_batch_alter(&$batch) {
  if (asaf_is_asaf()) {
    list($form, $form_state) = _asaf_get_form_details_from_stacktrace();
    if (isset($form_state['asaf']['form_path']) && $form_state['asaf']['form_path']) {
      $batch['source_url'] = $form_state['asaf']['form_path'];
    }
    if (isset($batch['form_state']['no_redirect'])) {
      $batch['form_state']['no_redirect'] = FALSE;
    }
  }
}