You are here

function uc_taxes_form_alter in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_taxes/uc_taxes.module \uc_taxes_form_alter()

File

uc_taxes/uc_taxes.module, line 79

Code

function uc_taxes_form_alter($form_id, &$form) {
  if ($form_id == 'uc_cart_checkout_form') {
    if (isset($form['panes']['payment'])) {
      uc_add_js('var tax_weight = ' . variable_get('uc_li_tax_weight', 9), 'inline');
      uc_add_js(drupal_get_path('module', 'uc_taxes') . '/uc_taxes.js');
    }
  }
  else {
    if ($form_id == 'uc_order_edit_form') {
      if (isset($form['quotes'])) {
        uc_add_js(drupal_get_path('module', 'uc_taxes') . '/uc_taxes.js');
      }
    }
  }
}