You are here

function client_delete_confirm in Web Service Clients 7.2

Same name and namespace in other branches
  1. 6.2 clients.module \client_delete_confirm()
  2. 7 clients.module \client_delete_confirm()

Form builder for confirmation of deletion of a connection.

1 string reference to 'client_delete_confirm'
clients_menu in ./clients.module
Implements hook_menu()

File

./clients.connection.admin.inc, line 321
clients.connection.admin.inc Page callbacks relating to client connection admin.

Code

function client_delete_confirm($form, &$form_state, $type, $service) {

  // Store values for the submit handler.
  $form['type'] = array(
    '#type' => 'value',
    '#value' => $type,
  );
  $form['cid'] = array(
    '#type' => 'value',
    '#value' => $service->cid,
  );
  $form['name'] = array(
    '#type' => 'value',
    '#value' => $service->name,
  );
  return confirm_form($form, t('Are you sure you want to delete !type %title?', array(
    '!type' => $type,
    '%title' => $service->name,
  )), isset($_GET['destination']) ? $_GET['destination'] : "admin/structure/clients/{$type}s/{$service->cid}", t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}