You are here

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

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

File

./asaf.module, line 51

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;
    }
  }
}