You are here

function modr8_response_form in modr8 5

Same name and namespace in other branches
  1. 6 modr8_admin.inc \modr8_response_form()
  2. 7 modr8_admin.inc \modr8_response_form()

The moderation response form.

1 string reference to 'modr8_response_form'
modr8_response_page in ./modr8.module
Menu callback; the moderation response page.

File

./modr8_admin.inc, line 414

Code

function modr8_response_form($node) {
  $form = array();
  $form['title'] = array(
    '#type' => 'textfield',
    '#title' => t('Response title'),
    '#required' => TRUE,
    '#maxlength' => 80,
    '#weight' => -5,
  );
  $form['body'] = array(
    '#type' => 'textarea',
    '#title' => t('Message to the moderator'),
    '#description' => t('Please respond to the moderation messsage you received and provide additional information as appropriate to help the moderator.'),
    '#rows' => 20,
    '#required' => TRUE,
  );
  $form['buttons']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
    '#weight' => 5,
  );

  // This flag can be used by modr8, or other modules to change the teaser specifically
  // for when it's being shown in the moderation list.
  $node->modr8_form_teaser = TRUE;
  $teaser = node_view($node, TRUE, FALSE, FALSE);
  $form['preview'] = array(
    '#type' => 'value',
    '#value' => $teaser,
  );
  $form['author_uid'] = array(
    '#type' => 'value',
    '#value' => $node->uid,
  );
  $form['nid'] = array(
    '#type' => 'value',
    '#value' => $node->nid,
  );
  return $form;
}