You are here

function deploy_plan_form in Deploy - Content Staging 5

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

add/edit deployment plan form

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

File

./deploy.module, line 213

Code

function deploy_plan_form($pid = NULL) {
  $plan = NULL;
  if (!is_null($pid)) {
    $plan = deploy_get_plan($pid);
    $form['pid'] = array(
      '#type' => 'hidden',
      '#default_value' => $pid,
    );
  }
  $form['plan_name'] = array(
    '#title' => t('Name'),
    '#type' => 'textfield',
    '#size' => 30,
    '#maxlength' => 50,
    '#required' => TRUE,
    '#default_value' => $plan['name'],
    '#description' => t('A unique name for this deployment plan.'),
  );
  $form['plan_description'] = array(
    '#title' => t('Description'),
    '#type' => 'textarea',
    '#default_value' => $plan['description'],
    '#description' => t('Information about this deployment plan, and the items being deployed.'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  return $form;
}