You are here

function dc_ajax_add_cart_cart_teaser_settings_form in Commerce Ajax Add to Cart 7.2

Same name and namespace in other branches
  1. 7 dc_ajax_add_cart.admin.inc \dc_ajax_add_cart_cart_teaser_settings_form()

Commerce AJAX Add to Cart teaser settings.

1 string reference to 'dc_ajax_add_cart_cart_teaser_settings_form'
dc_ajax_add_cart_menu in ./dc_ajax_add_cart.module
Implements hook_menu().

File

./dc_ajax_add_cart.admin.inc, line 94
Ajax add to cart administration UI.

Code

function dc_ajax_add_cart_cart_teaser_settings_form($form, &$form_state) {
  $form['dc_ajax_add_cart_empty_cart_teaser_message'] = array(
    '#type' => 'textfield',
    '#title' => t('Empty cart message'),
    '#default_value' => variable_get(DC_AJAX_ADD_CART_EMPTY_CART_TEASER_MESSAGE, t('Empty')),
    '#description' => t('Message that will be displayed on cart teaser if cart is empty.'),
  );
  $form['dc_ajax_add_cart_item_suffix_text_singular'] = array(
    '#type' => 'textfield',
    '#title' => t('Item suffix text (singular)'),
    '#default_value' => variable_get(DC_AJAX_ADD_CART_ITEM_SUFFIX_TEXT_SINGULAR, t('item')),
    '#description' => t('Suffix text that will be displayed after the number of items in cart teaser. Note that this is the singular form of the text.'),
  );
  $form['dc_ajax_add_cart_item_suffix_text_plural'] = array(
    '#type' => 'textfield',
    '#title' => t('Item suffix text (plural)'),
    '#default_value' => variable_get(DC_AJAX_ADD_CART_ITEM_SUFFIX_TEXT_PLURAL, t('items')),
    '#description' => t('Suffix text that will be displayed after the number of items in cart teaser. Note that this is the plural form of the text.'),
  );
  $form['#submit'][] = 'dc_ajax_add_cart_cart_teaser_settings_form_submit';
  return system_settings_form($form);
}