1 layout.admin.inc layout_ajax_condition_cancel_dialog($form, $form_state)

AJAX handler that cancels the condition edit dialog.

File

core/modules/layout/layout.admin.inc, line 2175
Admin page callbacks for the Layout module.

Code

function layout_ajax_condition_cancel_dialog($form, $form_state) {
  $commands = array();
  $commands[] = ajax_command_close_modal_dialog();

  // Reload the block configure dialog if editing block conditions.
  if (!empty($form_state['redirect'])) {
    $dialog_ajax = layout_ajax_form_open_dialog($form, $form_state);
    $commands = array_merge($commands, $dialog_ajax['#commands']);
  }

  return array(
    '#type' => 'ajax',
    '#commands' => $commands,
  );
}