function ajax_form_entity_entity_cancel_callback in Ajax form entity 7.x
Same name and namespace in other branches
- 7 ajax_form_entity.module \ajax_form_entity_entity_cancel_callback()
Ajax callback for closing / cancelling action and reloading the entity.
1 string reference to 'ajax_form_entity_entity_cancel_callback'
- ajax_form_entity_menu in ./
ajax_form_entity.module - Implements hook_menu().
File
- ./
ajax_form_entity.module, line 471 - Ajaxify entity forms.
Code
function ajax_form_entity_entity_cancel_callback($type = 'ajax') {
// TODO : use hook_menu page argument.
$special_id = arg(2);
$commands[] = ajax_command_css('#ajax-entity-form-' . $special_id, array(
'display' => 'block',
));
$commands[] = ajax_command_replace('#ajax-entity-form-wrapper-' . $special_id, '<div id="ajax-entity-form-wrapper-' . $special_id . '"></div>');
$page = array(
'#type' => 'ajax',
'#commands' => $commands,
);
ajax_deliver($page);
}