You are here

function ajax_create_playlist_dialog_close_callback in Brightcove Video Connect 7.3

Same name and namespace in other branches
  1. 7.4 brightcove_field/brightcove_field.module \ajax_create_playlist_dialog_close_callback()
  2. 7.5 brightcove_field/brightcove_field.module \ajax_create_playlist_dialog_close_callback()
1 string reference to 'ajax_create_playlist_dialog_close_callback'
brightcove_field_create_form in brightcove_field/brightcove_field.module
Create form. Will return a form for one playlist item.

File

brightcove_field/brightcove_field.module, line 253
Brightcove field module provides a Content Construction Kit module to developers, allowing them to browse videos in their Brightcove Studio and upload them.

Code

function ajax_create_playlist_dialog_close_callback($form, $form_state) {
  $id = _brightcove_create_form_callback($form, $form_state);
  $selector = '#create-dialog';
  $data_title = check_plain($form_state['values']['name']);
  $data_id = check_plain($id);
  $data = $id ? "{$data_title} [id:{$data_id}]" : '';
  $dialog_type = 'create';
  $commands = array();
  $commands[] = ajax_command_close_dialog($selector, $data, NULL, $dialog_type);
  return array(
    '#type' => 'ajax',
    '#commands' => $commands,
  );
}