You are here

function scald_atom_delete_confirm_ajax in Scald: Media Management made easy 7

Handles the deletion of an existing atom in ctools modal.

1 string reference to 'scald_atom_delete_confirm_ajax'
scald_menu in ./scald.module
Implements hook_menu().

File

includes/scald.pages.inc, line 460
This file contains the various callbacks related to Scald defined pages.

Code

function scald_atom_delete_confirm_ajax($js, $atom) {
  $form = drupal_get_form('scald_atom_delete_confirm', $atom);
  if ($js) {
    ctools_include('modal');
    ctools_include('ajax');
    $form_state = array();
    $form['actions']['cancel']['#attributes']['class'][] = 'ctools-close-modal';
    $commands = ctools_modal_form_render($form_state, $form);
    print ajax_render($commands);
    exit;
  }
  else {
    return $form;
  }
}