You are here

function uc_order_action_add_comment_form in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_order/uc_order_workflow.inc \uc_order_action_add_comment_form()

See also

uc_order_action_add_comment()

File

uc_order/uc_order.ca.inc, line 1173
This file contains the Conditional Actions hooks and functions necessary to make the order related entity, conditions, events, and actions work.

Code

function uc_order_action_add_comment_form($form_state, $settings = array()) {
  $form['comment_type'] = array(
    '#type' => 'radios',
    '#title' => t('Select an order comment type'),
    '#options' => array(
      'admin' => t('Enter this as an admin comment.'),
      'order' => t('Enter this as a customer order comment.'),
      'notified' => t('Enter this as a customer order comment with a notified icon.'),
    ),
    '#default_value' => isset($settings['comment_type']) ? $settings['comment_type'] : 'admin',
  );
  $form['comment'] = array(
    '#type' => 'textarea',
    '#title' => t('Comment'),
    '#description' => t('Enter the comment message. Uses <a href="!url">order and global tokens</a>.', array(
      '!url' => url('admin/store/help/tokens'),
    )),
    '#default_value' => isset($settings['comment']) ? $settings['comment'] : '',
    '#wysiwyg' => FALSE,
  );
  return $form;
}