function uc_cart_links_settings_form in Ubercart 7.3
Same name and namespace in other branches
- 5 uc_cart_links/uc_cart_links.module \uc_cart_links_settings_form()
- 6.2 uc_cart_links/uc_cart_links.admin.inc \uc_cart_links_settings_form()
Defines a form to configure the Cart Links settings.
See also
uc_cart_links_settings_form_validate()
1 string reference to 'uc_cart_links_settings_form'
- uc_cart_links_menu in uc_cart_links/
uc_cart_links.module - Implements hook_menu().
File
- uc_cart_links/
uc_cart_links.admin.inc, line 14 - Cart Links administration menu items.
Code
function uc_cart_links_settings_form($form, &$form_state) {
$form['uc_cart_links_add_show'] = array(
'#type' => 'checkbox',
'#title' => t('Display the cart link product action when you add a product to your cart.'),
'#default_value' => variable_get('uc_cart_links_add_show', FALSE),
);
$form['uc_cart_links_track'] = array(
'#type' => 'checkbox',
'#title' => t('Track clicks through Cart Links that specify tracking IDs.'),
'#default_value' => variable_get('uc_cart_links_track', TRUE),
);
$form['uc_cart_links_empty'] = array(
'#type' => 'checkbox',
'#title' => t('Allow Cart Links to empty customer carts.'),
'#default_value' => variable_get('uc_cart_links_empty', TRUE),
);
$form['uc_cart_links_messages'] = array(
'#type' => 'textarea',
'#title' => t('Cart Links messages'),
'#description' => t('Enter messages available to the Cart Links API for display through a link. Separate messages with a line break. Each message should have a numeric key and text value, separated by "|". For example: 1337|Message text.'),
'#default_value' => variable_get('uc_cart_links_messages', ''),
);
$form['uc_cart_links_restrictions'] = array(
'#type' => 'textarea',
'#title' => t('Cart Links restrictions'),
'#description' => t('To restrict what Cart Links may be used on your site, enter all valid Cart Links in this textbox. Separate links with a line break. Leave blank to permit any cart link.'),
'#default_value' => variable_get('uc_cart_links_restrictions', ''),
);
$form['uc_cart_links_invalid_page'] = array(
'#type' => 'textfield',
'#title' => t('Invalid link redirect page'),
'#description' => t('Enter the URL to redirect to when an invalid cart link is used.'),
'#default_value' => variable_get('uc_cart_links_invalid_page', ''),
'#size' => 32,
'#field_prefix' => url(NULL, array(
'absolute' => TRUE,
)) . (variable_get('clean_url', 0) ? '' : '?q='),
);
return system_settings_form($form);
}