Skip to content

Commit

Permalink
Refs #41821,Enhance location form to fill city and postal code on Aja…
Browse files Browse the repository at this point in the history
…x trigger.
  • Loading branch information
Chang Shu-Huai committed Nov 27, 2024
1 parent bc1ad74 commit 0d64a78
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions templates/CRM/Event/Form/ManageEvent/Location.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ cj(document).ready(function() {
cj('#'+i).val(data[i]);
}
}
if (typeof jQuery === 'function' && typeof jQuery.prototype.twzipcode === 'function') {
let $ = jQuery;
let city = $('#address_1_city').val();
let zipcode = $('#address_1_postal_code').val();
$('#address_1_state_province_id').trigger('change');
$('[name="_address[1][city]"]').val(city).trigger('change');
$('#address_1_postal_code').val(zipcode);
}
}
});
return false;
Expand Down

0 comments on commit 0d64a78

Please sign in to comment.