function ajax_comments_form_comment_confirm_delete_alter in AJAX Comments 7
Implements hook_form_FORM_ID_alter().
File
- ./
ajax_comments.module, line 243 - AJAX comments module file.
Code
function ajax_comments_form_comment_confirm_delete_alter(&$form, &$form_state, $form_id) {
if (ajax_comments_node_type_active(substr($form['#comment']->node_type, strlen('comment_node_')))) {
$form['actions']['submit']['#ajax'] = array(
'callback' => 'ajax_comments_delete_js',
'wrapper' => $form['#id'],
'method' => 'replace',
);
$form['actions']['cancel']['#attributes']['onclick'][] = 'jQuery(\'#' . $form['#id'] . '\').siblings().show().end().remove(); return false;';
}
}