You are here

function mobile_tools_device_group_delete_confirm in Mobile Tools 7.3

Shows the confirmation form for the deletion of device groups

Parameters

$form:

&$form_state:

$name:

2 string references to 'mobile_tools_device_group_delete_confirm'
MobileToolsUserRolesTestCase::testAdminUserAccess in ./mobile_tools.test
Tests that the admin user can access the Mobile Tools pages.
mobile_tools_menu in ./mobile_tools.module
Implements hook_menu().

File

./mobile_tools.admin.inc, line 407
Adminstrative pages for Mobile Tools

Code

function mobile_tools_device_group_delete_confirm($form, &$form_state, $device_group) {
  $form['dgid'] = array(
    '#type' => 'value',
    '#value' => $device_group->dgid,
  );

  // Deleting an export in code will revert it.
  $op = $device_group->export_type & EXPORT_IN_CODE ? 'Revert' : 'Delete';
  $message = t("Are you sure you want to @action the device group %title?", array(
    '@action' => t(drupal_strtolower($op)),
    '%title' => $device_group->title,
  ));
  $caption = '<p>' . t('This action cannot be undone.') . '</p>';
  return confirm_form($form, $message, 'admin/config/system/mobile-tools', $caption, t($op));
}