You are here

function responsive_preview_device_delete_form in Responsive Theme Preview 7

Form constructor for the device deletion form.

Parameters

$form: An associative array containing the structure of the form.

$form_state: An associative array containing the current state of the form.

$name: (Optional) A string that identifies a device by its unique name.

$device: The device object.

Return value

An array representing the form definition.

See also

responsive_preview_device_delete_form_submit()

1 string reference to 'responsive_preview_device_delete_form'
responsive_preview_menu in ./responsive_preview.module
Implements hook_menu().

File

./responsive_preview.admin.inc, line 274
Administrative page callbacks for the responsive_preview module.

Code

function responsive_preview_device_delete_form($form, &$form_state, $name) {
  $devices = responsive_preview_get_device_definition($name);
  $device = $devices[$name];
  $form['name'] = array(
    '#type' => 'hidden',
    '#value' => $device['name'],
  );
  return confirm_form($form, t('Are you sure you want to delete the device %label?', array(
    '%label' => $device['label'],
  )), 'admin/config/content/responsive-preview', '', t('Delete'), t('Cancel'));
}