You are here

function qtip_delete_instance_submit in qTip (Stylish jQuery Tooltips) 7.2

Submit handler for qtip_delete_instance.

1 call to qtip_delete_instance_submit()
qtip_revert_instance_submit in includes/forms/qtip.admin.inc
Submit handler for qtip_revert_instance.

File

includes/forms/qtip.admin.inc, line 455
Administrative functions for the qTip module.

Code

function qtip_delete_instance_submit($form, &$form_state) {
  qtip_delete($form_state['values']['machine_name']);
  if ($form_state['values']['form_id'] == 'qtip_revert_instance') {
    drupal_set_message(t('The qTip instance %name has been reverted.', array(
      '%name' => $form_state['values']['name'],
    )));
  }
  else {
    drupal_set_message(t('The qTip instance %name has been removed.', array(
      '%name' => $form_state['values']['name'],
    )));
  }
  cache_clear_all();
  $form_state['redirect'] = 'admin/config/user-interface/qtip';
}