You are here

function deploy_server_form in Deploy - Content Staging 5

Same name and namespace in other branches
  1. 6 deploy.servers.admin.inc \deploy_server_form()

add deployment server form

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

File

./deploy.module, line 295

Code

function deploy_server_form($sid = NULL) {
  $server = NULL;
  if (!is_null($sid)) {
    $server = deploy_get_server($sid);
    $form['sid'] = array(
      '#type' => 'hidden',
      '#default_value' => $sid,
    );
  }
  $form['description'] = array(
    '#title' => t('Name'),
    '#type' => 'textfield',
    '#size' => 50,
    '#maxlength' => 100,
    '#default_value' => $server['description'],
    '#description' => t('Description of this server.'),
  );
  $form['url'] = array(
    '#title' => t('URL'),
    '#type' => 'textfield',
    '#size' => 50,
    '#maxlength' => 100,
    '#default_value' => $server['url'],
    '#description' => t('Domain name and path to xmlrpc service.'),
  );
  $form['api_key'] = array(
    '#title' => t('API key'),
    '#type' => 'textfield',
    '#size' => 32,
    '#maxlength' => 32,
    '#default_value' => $server['api_key'],
    '#description' => t('API key (if needed)'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  return $form;
}