You are here

function fancy_login_ahah in Fancy Login 6.2

Callback function for the path 'fancy_login/ahah'. This callback tells the node creation page to add an extra image upload element

1 string reference to 'fancy_login_ahah'
fancy_login_menu in ./fancy_login.module
Implementation of hook_menu()

File

includes/fancy_login.pages.inc, line 225

Code

function fancy_login_ahah($callback) {
  $form = fancy_login_ahah_render();
  $changed_elements = $callback($form);
  unset($changed_elements['#prefix'], $changed_elements['#suffix']);
  $output = drupal_render($changed_elements) . theme('status_messages');
  $javascript = drupal_add_js(NULL, NULL);
  if (isset($javascript['setting'])) {
    $output .= '<script type="text/javascript">jQuery.extend(Drupal.settings, ' . drupal_to_js(call_user_func_array('array_merge_recursive', $javascript['setting'])) . ');</script>';
  }
  die(drupal_to_js(array(
    'data' => $output,
    'status' => true,
  )));
}