function uc_coupon_purchase_form_uc_coupon_settings_form_alter in Ubercart Discount Coupons 7.3
Implements hook_form_FORM_ID_alter() for uc_coupon_settings_form.
File
- uc_coupon_purchase/
uc_coupon_purchase.module, line 530
Code
function uc_coupon_purchase_form_uc_coupon_settings_form_alter(&$form, &$form_state) {
$form['uc_coupon_purchase'] = array(
'#type' => 'fieldset',
'#title' => t('Coupon purchase settings'),
);
$form['uc_coupon_purchase']['uc_coupon_purchase_recipient'] = array(
'#type' => 'item',
'#title' => t('Gift coupon recipient field'),
'uc_coupon_purchase_recipient_enabled' => array(
'#type' => 'checkbox',
'#title' => t('Enable the "uc_coupon_purchase_recipient" product attribute.'),
'#description' => t('When checked, a "uc_coupon_purchase_recipient" product attribute wil be created.
When you attach this attribute to a product with the "create coupon" feature, customers will be able
to enter the e-mail address of a recipient. You can then configure a rule to send a customized
e-mail notification to the recipient.'),
'#default_value' => variable_get('uc_coupon_purchase_recipient_enabled', FALSE),
'#access' => module_exists('uc_attribute'),
),
'#description' => module_exists('uc_attribute') ? NULL : t('You must enable the uc_attribute module to activate this feature.'),
);
$form['#submit'][] = 'uc_coupon_purchase_coupon_settings_form_submit';
}