You are here

function comment_deploy_operations_add_form in Deploy - Content Staging 6

Display comment "add to plan" form.

Parameters

$form_state: FAPI form state

$cids: The cids of the comments we're attempting to deploy.

Return value

FAPI array

See also

comment_deploy_operations_add_form_submit()

1 string reference to 'comment_deploy_operations_add_form'
comment_deploy_menu in modules/comment_deploy/comment_deploy.module
Implementation of hook_menu().

File

modules/comment_deploy/comment_deploy.pages.inc, line 22
Deployment API which enables modules to deploy items between servers.

Code

function comment_deploy_operations_add_form($form_state, $cids) {

  // If no comments selected then bail.
  if (!$cids) {
    drupal_set_message('No comments selected for deployment.');
    drupal_goto('admin/content/comment');
  }
  $form['pid'] = array(
    '#title' => t('Deployment Plan'),
    '#type' => 'select',
    '#options' => deploy_get_plan_options(),
    '#required' => TRUE,
    '#description' => t('The deployment plan to add these comments to.'),
  );
  $form['cids'] = array(
    '#type' => 'hidden',
    '#default_value' => $cids,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  return $form;
}