You are here

function clients_delete_form in Web Service Clients 6

1 string reference to 'clients_delete_form'
clients_delete in ./clients.module

File

./clients.module, line 180
Clients module - handles keys and service connections and provides an API for clients @author Django Beatty - adub

Code

function clients_delete_form(&$form_state, $arg, $type) {
  if ($type == 'connections') {
    $service = clients_connection_load((int) $arg);
  }
  elseif ($type == 'resources') {
    $service = clients_resource_load((int) $arg);
  }
  else {

    /**
     * @todo error
     */
    $service = array();
  }
  $form = array();
  $form['type'] = array(
    '#type' => 'value',
    '#value' => $type,
  );
  $form['cid'] = array(
    '#type' => 'value',
    '#value' => $arg,
  );
  $form['name'] = array(
    '#type' => 'value',
    '#value' => $service->name,
  );
  $form['check'] = array(
    '#value' => t('<p>Really delete @service?</p>', array(
      '@service' => $service->name,
    )),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Delete'),
  );
  return $form;
}