You are here

function field_group_delete_form in Field Group 7.2

Same name and namespace in other branches
  1. 7 field_group.field_ui.inc \field_group_delete_form()

Menu callback; present a form for removing a group.

1 string reference to 'field_group_delete_form'
field_group_menu in ./field_group.module
Implements hook_menu().

File

./field_group.field_ui.inc, line 683
Field_group.field_ui.inc is a file that contains most functions needed on the Fields UI Manage forms (display and fields).

Code

function field_group_delete_form($form, &$form_state, $group, $view_mode = 'form') {
  $form['#group'] = $group;
  $admin_path = _field_ui_bundle_admin_path($group->entity_type, $group->bundle);
  if ($view_mode == 'form') {
    $admin_path .= '/fields';
  }
  else {
    $admin_path .= '/display/' . $view_mode;
  }
  $form['#redirect'] = array(
    $admin_path,
  );
  $output = confirm_form($form, t('Are you sure you want to delete the group %group?', array(
    '%group' => t($group->label),
  )), $admin_path, t('This action cannot be undone.'), t('Delete'), t('Cancel'), 'confirm');
  return $output;
}