You are here

function entityqueue_subqueue_ajax_callback in Entityqueue 7

Ajax form callback.

1 string reference to 'entityqueue_subqueue_ajax_callback'
entityqueue_subqueue_edit_form in includes/entityqueue.admin.inc
Form callback; Displays the subqueue edit form.

File

./entityqueue.module, line 1226
Allows users to collect entities in arbitrarily ordered lists.

Code

function entityqueue_subqueue_ajax_callback($form, $form_state) {
  $settings = array(
    drupal_clean_css_identifier('entityqueue-dragtable-' . $form_state['field_name']) => TRUE,
  );
  drupal_add_js(array(
    'entityqueue_changed' => $settings,
  ), 'setting');
  $markup = drupal_render($form);
  $commands[] = ajax_command_replace('#' . $form_state['form_wrapper_id'], $markup);
  return array(
    '#type' => 'ajax',
    '#commands' => $commands,
  );
}