function uc_cart_links_settings_form in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_cart_links/uc_cart_links.admin.inc \uc_cart_links_settings_form()
- 7.3 uc_cart_links/uc_cart_links.admin.inc \uc_cart_links_settings_form()
1 string reference to 'uc_cart_links_settings_form'
- uc_cart_links_menu in uc_cart_links/
uc_cart_links.module - Implementation of hook_menu().
File
- uc_cart_links/
uc_cart_links.module, line 90 - Allows store owners to create links to add products to carts and send customers on to checkout.
Code
function uc_cart_links_settings_form() {
$form['instructions'] = array(
'#value' => '<div>' . t('<a href="!url">View the help page</a> to learn how to create cart links.', array(
'!url' => url('admin/store/help/cart_links'),
)) . '</div>',
);
$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', TRUE),
);
$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_messages'] = array(
'#type' => 'textarea',
'#title' => t('Cart links messages'),
'#description' => t('Enter in messages available to the cart links API for display through a link. Separate messages with a line break.<br />Messages should have a numeric key and text value. 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 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, NULL, NULL, TRUE) . (variable_get('clean_url', 0) ? '' : '?q='),
);
return system_settings_form($form);
}