You are here

function uc_addresses_settings_form in Ubercart Addresses 6

Same name and namespace in other branches
  1. 5.2 uc_addresses.module \uc_addresses_settings_form()
  2. 5 uc_addresses.module \uc_addresses_settings_form()
  3. 6.2 uc_addresses.admin.inc \uc_addresses_settings_form()
  4. 7 uc_addresses.admin.inc \uc_addresses_settings_form()

The settings form of Ubercart Addresses.

Return value

array

1 string reference to 'uc_addresses_settings_form'
uc_addresses_menu in ./uc_addresses.module
Implementation of hook_menu().

File

./uc_addresses.admin.inc, line 23
Admin settings for Ubercart Addresses

Code

function uc_addresses_settings_form() {
  $form['user'] = array(
    '#type' => 'fieldset',
    '#title' => t('User settings'),
    '#summary callback' => 'summarize_form',
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['user']['uc_addresses_default_billing_address'] = array(
    '#type' => 'checkbox',
    '#title' => t('Automatically fill in the billing address with the user\'s default address.'),
    '#default_value' => variable_get('uc_addresses_default_billing_address', TRUE),
    '#summary callback' => 'summarize_checkbox',
    '#summary arguments' => array(
      t('We will automatically fill in the delivery address with the user\'s default address.'),
      t('The customer must enter or choose a delivery address.'),
    ),
  );
  $form['user']['uc_addresses_default_delivery_address'] = array(
    '#type' => 'checkbox',
    '#title' => t('Automatically fill in the delivery address with the user\'s default address.'),
    '#default_value' => variable_get('uc_addresses_default_delivery_address', TRUE),
    '#summary callback' => 'summarize_checkbox',
    '#summary arguments' => array(
      t('We will automatically fill in the billing address with the user\'s default address.'),
      t('The customer must enter or choose a billing address.'),
    ),
  );
  $form['user']['uc_addresses_require_address'] = array(
    '#type' => 'checkbox',
    '#title' => t('Require that an address be entered during registration'),
    '#default_value' => variable_get('uc_addresses_require_address', TRUE),
    '#summary callback' => 'summarize_checkbox',
    '#summary arguments' => array(
      t('The customer must enter an address when registering'),
      t('The customer does not enter an address when registering.'),
    ),
  );
  return system_settings_form($form);
}