abuse_admin_edit_reason

Definition

abuse_admin_edit_reason($form_state, $arid)
abuse/abuse.admin.inc, line 201

Code

<?php
function abuse_admin_edit_reason($form_state, $arid) {
  $reason = db_fetch_object(db_query("SELECT * FROM {abuse_reasons} WHERE arid=%d", $arid));
  if (!$reason->arid) {
    drupal_not_found();
  }
  $form = array();
  $form['arid'] = array(
    '#type' => 'value',
    '#value' => $reason->arid,
  );
  $form['short_form'] = array(
    '#type' => 'textfield',
    '#title' => t('Reason'),
    '#description' => t('Provide a short form of what the reason is'),
    '#default_value' => $reason->reason,
    '#size' => 35,
    '#maxlength' => 35,
  );
  $form['description'] = array(
    '#type' => 'textarea',
    '#title' => t('Description'),
    '#description' => t('A more details description of what the reason is'),
    '#default_value' => $reason->description,
    '#rows' => 5,
    '#cols' => 50,
  );
  $form['email_notice'] = array(
    '#type' => 'textarea',
    '#title' => t('Email Notice addition'),
    '#description' => t('Text that should automatically be included in the warning email.'),
    '#default_value' => $reason->argumentation,
    '#rows' => 5,
    '#cols' => 50,
  );
  $form['save'] = array(
    '#type' => 'submit',
    '#value' => t('Save')
  );
  $form['cancel'] = array(
    '#type' => 'submit',
    '#value' => t('Cancel')
  );

  return $form;
}
?>