You are here

function ds_fieldgroup_delete_form in Display Suite 6.2

Same name and namespace in other branches
  1. 6.3 includes/ds.groups.inc \ds_fieldgroup_delete_form()
  2. 6 includes/ds.groups.inc \ds_fieldgroup_delete_form()

Fieldgroup delete form.

1 string reference to 'ds_fieldgroup_delete_form'
ds_fieldgroups in includes/ds.groups.inc
Fieldgroups overview.

File

includes/ds.groups.inc, line 213
Manage fieldgroups.

Code

function ds_fieldgroup_delete_form($form_state, $module, $fieldgroup) {
  $form = array();
  $fields = variable_get($module . '_fields', array());
  $field_title = $fields[$fieldgroup]['title'];
  $form['question'] = array(
    '#type' => 'markup',
    '#value' => '<p>' . t('Are you sure you want to delete the fieldgroup %fieldgroup ?', array(
      '%fieldgroup' => $field_title,
    )) . '</p>',
  );
  $form['fieldgroup'] = array(
    '#type' => 'value',
    '#value' => $fieldgroup,
  );
  $form['button']['submit'] = array(
    '#prefix' => '<div>',
    '#type' => 'submit',
    '#value' => t('Delete'),
  );
  $form['buttons']['cancel'] = array(
    '#suffix' => '</div>',
    '#type' => 'markup',
    '#value' => l('cancel', DS_PATH_MODULES . '/' . $module . '/fieldgroups'),
  );
  $form['#module'] = $module;
  return $form;
}