does not work well with uc_addresses

catorghans - May 28, 2009 - 15:27
Project:Ubercart VAT Number
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

module uc_addresses has an option for a prefilled default address per user.

If uc_vat_number is active the billing address zone stays empty if that option is activated.

That is because uc_vat_number adds the following line to the page:
drupal_add_js('$(document).ready(function() { $("#edit-panes-billing-billing-country").change(); });', 'inline');

That triggers the "change" event of the billing country field (#edit-panes-billing-billing-country), which gets all zones for that "changed" country, even without the country field being changed.

The problem is: the zone already had a value, the country is not changed at all, but the change event is triggered and that resets the "zone" field to "empty".

Why is this code needed? I removed it and uc_vat_number still seems to work and it keeps uc_addresses intact.

 
 

Drupal is a registered trademark of Dries Buytaert.