You are here

function support_form in Support Ticketing System 7

Same name and namespace in other branches
  1. 6 support.module \support_form()

Implementation of hook_form().

File

./support.module, line 842
support.module

Code

function support_form($node, &$form_state) {
  $type = node_type_get_type($node);
  $form = node_content_form($node, $form_state);
  _support_status_form_attach($form, $form_state, $node);
  if (isset($node->nid) && $node->nid) {
    $form['ticket'] = array(
      '#type' => 'fieldset',
      '#title' => t('Support ticket'),
      '#collapsible' => TRUE,
      '#collapsed' => TRUE,
      '#access' => user_access('administer support'),
    );
    $form['ticket']['move'] = array(
      '#type' => 'textfield',
      '#title' => t('Move ticket'),
      '#maxlength' => 12,
      '#size' => 8,
      '#description' => t('Optionally specify another ticket id to move this ticket and all of its updates.  When moved, this ticket and all of its updates will become updates to the specified ticket and this ticket will be removed.  This action can not be undone.'),
      '#access' => user_access('administer support') || user_access('move ticket'),
    );
  }
  _support_subscribe_form_attach($form, $form_state, $node);
  return $form;
}