You are here

function commerce_avatax_exemptions_pane_settings_form in Drupal Commerce Connector for AvaTax 7.4

Implements base_settings_form().

File

modules/commerce_avatax_exemptions/includes/commerce_avatax_exemptions.checkout_pane.inc, line 11
Commerce AvaTax Exemptions checkout panes.

Code

function commerce_avatax_exemptions_pane_settings_form($checkout_pane) {
  $form = array();
  $states = $states = array(
    'AL' => t('Alabama'),
    'AK' => t('Alaska'),
    'AZ' => t('Arizona'),
    'AR' => t('Arkansas'),
    'CA' => t('California'),
    'CO' => t('Colorado'),
    'CT' => t('Connecticut'),
    'DE' => t('Delaware'),
    'DC' => t('District Of Columbia'),
    'FL' => t('Florida'),
    'GA' => t('Georgia'),
    'HI' => t('Hawaii'),
    'ID' => t('Idaho'),
    'IL' => t('Illinois'),
    'IN' => t('Indiana'),
    'IA' => t('Iowa'),
    'KS' => t('Kansas'),
    'KY' => t('Kentucky'),
    'LA' => t('Louisiana'),
    'ME' => t('Maine'),
    'MD' => t('Maryland'),
    'MA' => t('Massachusetts'),
    'MI' => t('Michigan'),
    'MN' => t('Minnesota'),
    'MS' => t('Mississippi'),
    'MO' => t('Missouri'),
    'MT' => t('Montana'),
    'NE' => t('Nebraska'),
    'NV' => t('Nevada'),
    'NH' => t('New Hampshire'),
    'NJ' => t('New Jersey'),
    'NM' => t('New Mexico'),
    'NY' => t('New York'),
    'NC' => t('North Carolina'),
    'ND' => t('North Dakota'),
    'OH' => t('Ohio'),
    'OK' => t('Oklahoma'),
    'OR' => t('Oregon'),
    'PA' => t('Pennsylvania'),
    'RI' => t('Rhode Island'),
    'SC' => t('South Carolina'),
    'SD' => t('South Dakota'),
    'TN' => t('Tennessee'),
    'TX' => t('Texas'),
    'UT' => t('Utah'),
    'VT' => t('Vermont'),
    'VA' => t('Virginia'),
    'WA' => t('Washington'),
    'WV' => t('West Virginia'),
    'WI' => t('Wisconsin'),
    'WY' => t('Wyoming'),
    'AA' => t('Armed Forces (Americas)'),
    'AE' => t('Armed Forces (Europe, Canada, Middle East, Africa)'),
    'AP' => t('Armed Forces (Pacific)'),
    'AS' => t('American Samoa'),
    'FM' => t('Federated States of Micronesia'),
    'GU' => t('Guam'),
    'MH' => t('Marshall Islands'),
    'MP' => t('Northern Mariana Islands'),
    'PW' => t('Palau'),
    'PR' => t('Puerto Rico'),
    'VI' => t('Virgin Islands'),
  );
  $form['commerce_avatax_exemptions_states'] = array(
    '#title' => t('States to show exemption pane'),
    '#type' => 'select',
    '#multiple' => TRUE,
    '#options' => $states,
    '#default_value' => variable_get('commerce_avatax_exemptions_states', array_keys($states)),
  );
  $form['commerce_avatax_exemptions_roles'] = array(
    '#title' => t('Select Roles that should be allowed to use exemption'),
    '#type' => 'select',
    '#multiple' => TRUE,
    '#options' => user_roles(),
    '#default_value' => variable_get('commerce_avatax_exemptions_roles', array(
      1,
    )),
  );
  $form['commerce_avatax_exemptions_description'] = array(
    '#title' => t('Description text to show on the exemption pane'),
    '#type' => 'textarea',
    '#default_value' => variable_get('commerce_avatax_exemptions_description'),
  );
  return $form;
}