You are here

function spam_admin_feedback_form in Spam 5.3

Same name and namespace in other branches
  1. 6 spam.module \spam_admin_feedback_form()

Spam feedback details.

1 string reference to 'spam_admin_feedback_form'
spam_menu in ./spam.module
Drupal _menu() hook.

File

./spam.module, line 1032

Code

function spam_admin_feedback_form($bid) {
  $form = array();
  $feedback = db_fetch_object(db_query('SELECT * FROM {spam_filters_errors} WHERE bid = %d', $bid));
  $form = spam_invoke_module($feedback->content_type, 'feedback_form', unserialize($feedback->content));
  if (!is_array($form)) {
    $form = array();
  }
  $form['feedback'] = array(
    '#type' => 'textarea',
    '#title' => t('Feedback'),
    '#value' => $feedback->feedback,
    '#disabled' => TRUE,
  );
  $form['publish'] = array(
    '#type' => 'submit',
    '#value' => t('Publish content'),
  );
  $form['delete'] = array(
    '#type' => 'submit',
    '#value' => t('Delete feedback'),
  );
  $form['cancel'] = array(
    '#value' => l(t('Cancel'), 'admin/content/spam/feedback'),
  );
  $form['content'] = array(
    '#type' => 'hidden',
    '#value' => $feedback->content,
  );
  $form['spam_form'] = array(
    '#type' => 'hidden',
    '#value' => $feedback->form,
  );
  $form['bid'] = array(
    '#type' => 'hidden',
    '#value' => $feedback->bid,
  );
  $form['type'] = array(
    '#type' => 'hidden',
    '#value' => $feedback->content_type,
  );
  $form['id'] = array(
    '#type' => 'hidden',
    '#value' => $feedback->content_id,
  );
  return $form;
}