You are here

function deploy_delete_server_form in Deploy - Content Staging 6

Same name and namespace in other branches
  1. 5 deploy.module \deploy_delete_server_form()

Delete a deployment server confirmation form.

Parameters

$form_state: FAPI form state

$sid: Unique identifier of the server we're deleting.

Return value

FAPI form definition

See also

deploy_delete_server_form_submit()

1 string reference to 'deploy_delete_server_form'
deploy_menu in ./deploy.module
Implementation of hook_menu().

File

./deploy.servers.admin.inc, line 136
Page handlers for deploy server admin.

Code

function deploy_delete_server_form($form_state, $sid = NULL) {
  $server = deploy_get_server($sid);
  if (!$server) {
    drupal_goto('admin/build/deploy/servers');
  }
  $form['sid'] = array(
    '#type' => 'value',
    '#value' => $sid,
  );
  $form = confirm_form($form, t('Are you sure you want to delete the server %server_name?', array(
    '%server_name' => $server['description'],
  )), 'admin/build/deploy/servers', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
  return $form;
}