You are here

function merci_ahah_output in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6.2

3 calls to merci_ahah_output()
merci_choice_js in includes/menu.inc
Menu callback for AHAH additions.
merci_staff_update_name in modules/merci_staff/merci_staff.module
Menu callback for AHAH additions.
merci_taxonomy_json in includes/menu.inc
@todo Please document this function.

File

./merci.module, line 1191
MERCI - Managed Equipment Reservation Checkout and Inventory

Code

function merci_ahah_output($selected_portion, $show_status = FALSE) {
  if ($show_status) {
    $output .= theme('status_messages');
  }

  // To avoid doubling-up the wrapper, we have to remove it here.
  if (is_array($selected_portion)) {
    unset($selected_portion['#prefix'], $selected_portion['#suffix']);

    //$output = theme('status_messages') . drupal_render($selected_portion);

    // BAD HACK to not show validation error messages for the date combo.  Not sure how to turn validation off for that.
    $output .= drupal_render($selected_portion);
  }
  else {
    if (is_string($selected_portion)) {
      $output .= $selected_portion;
    }
  }

  // Final rendering callback.
  drupal_json(array(
    'status' => TRUE,
    'data' => $output,
  ));
}