You are here

function uc_coupon_handler_field_all_orders_total::options_form in Ubercart Discount Coupons 7.3

Same name and namespace in other branches
  1. 7.2 views/uc_coupon_handler_field_all_orders_total.inc \uc_coupon_handler_field_all_orders_total::options_form()

Add option for order status.

Overrides uc_product_handler_field_price::options_form

File

views/uc_coupon_handler_field_all_orders_total.inc, line 29
Coupon order total field handler

Class

uc_coupon_handler_field_all_orders_total
@file Coupon order total field handler

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $statuses = array();
  foreach (uc_order_status_list() as $status) {
    $statuses[$status['id']] = $status['title'];
  }
  $form['statuses'] = array(
    '#title' => t('Order statuses'),
    '#type' => 'select',
    '#description' => t('Only orders with selected statuses will be counted.
          If you do not select any statuses, then all orders will be counted.') . '<br />' . t('Hold Ctrl + click to select multiple statuses.'),
    '#options' => $statuses,
    '#default_value' => $this->options['statuses'],
    '#multiple' => TRUE,
    '#size' => 8,
  );
}