You are here

function patch_manager_form in Patch manager 6

Same name and namespace in other branches
  1. 7 patch_manager.module \patch_manager_form()

Implementation of hook_form().

File

./patch_manager.module, line 88
patch_manager.module Patch manager provides developers with tools for managing patches.

Code

function patch_manager_form(&$node) {
  $type = node_get_types('type', $node);
  $form['title'] = array(
    '#type' => 'textfield',
    '#description' => t('Short description of the patch.'),
    '#title' => check_plain($type->title_label),
    '#required' => TRUE,
    '#size' => 50,
    '#weight' => -6,
    '#attributes' => array(
      'style' => 'width: auto',
    ),
    '#default_value' => !empty($node->title) ? $node->title : NULL,
  );
  $form['body'] = array(
    '#type' => 'textarea',
    '#title' => check_plain($type->body_label),
    '#description' => t('Optional notes for this patch, why is this patch necessary for this site? When can be removed?'),
    '#required' => FALSE,
    '#rows' => 3,
    '#weight' => -2,
    '#default_value' => !empty($node->body) ? $node->body : NULL,
  );
  return $form;
}