function uc_coupon_handler_field_all_orders_count::options_form in Ubercart Discount Coupons 7.3
Same name and namespace in other branches
- 7.2 views/uc_coupon_handler_field_all_orders_count.inc \uc_coupon_handler_field_all_orders_count::options_form()
Create order status option.
Overrides views_handler_field_numeric::options_form
File
- views/
uc_coupon_handler_field_all_orders_count.inc, line 30 - Coupon order total field handler
Class
- uc_coupon_handler_field_all_orders_count
- @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' => 5,
);
}