You are here

function fieldgroup_remove_group in Content Construction Kit (CCK) 5

Same name and namespace in other branches
  1. 6.3 modules/fieldgroup/fieldgroup.module \fieldgroup_remove_group()
  2. 6 modules/fieldgroup/fieldgroup.module \fieldgroup_remove_group()
  3. 6.2 modules/fieldgroup/fieldgroup.module \fieldgroup_remove_group()
1 string reference to 'fieldgroup_remove_group'
fieldgroup_menu in ./fieldgroup.module
@file Create field groups for CCK fields.

File

./fieldgroup.module, line 200
Create field groups for CCK fields.

Code

function fieldgroup_remove_group($content_type, $group_name) {
  $groups = fieldgroup_groups($content_type['type']);
  $group = $groups[$group_name];
  if (!$group) {
    drupal_not_found();
    exit;
  }
  $form['#submit'] = array(
    fieldgroup_remove_group_submit => array(
      $content_type,
      $group_name,
    ),
  );
  return confirm_form($form, t('Are you sure you want to remove the group %label?', array(
    '%label' => t($group['label']),
  )), 'admin/content/types/' . $content_type['url_str'] . '/fields', t('This action cannot be undone.'), t('Remove'), t('Cancel'));
}