function uc_coupon_handler_field_codes::options_form in Ubercart Discount Coupons 7.3
Same name and namespace in other branches
- 6 views/uc_coupon_handler_field_codes.inc \uc_coupon_handler_field_codes::options_form()
- 7.2 views/uc_coupon_handler_field_codes.inc \uc_coupon_handler_field_codes::options_form()
Provide options to limit number of codes, and to limit to coupons which still have uses remaining (or which don't)
Overrides views_handler_field_prerender_list::options_form
File
- views/
uc_coupon_handler_field_codes.inc, line 27 - Views handler for a list of bulk codes based on a coupon
Class
- uc_coupon_handler_field_codes
- Generate a list of the codes associated with this coupon
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['max_num'] = array(
'#title' => t('Maximum number of codes to list (or 0 for unlimited)'),
'#type' => 'textfield',
'#default_value' => $this->options['max_num'],
);
$form['scope'] = array(
'#type' => 'radios',
'#title' => t('Codes to display'),
'#options' => array(
'all' => t('All'),
'avail' => t('Available codes'),
'used' => t('Unavailable codes'),
),
'#default_value' => $this->options['scope'],
);
}