Display Phone number Country Codes

This commit is contained in:
johnnyq
2026-08-26 14:19:32 -04:00
parent 422f88c25e
commit 806732c8f5
7 changed files with 32 additions and 12 deletions

View File

@@ -14,7 +14,7 @@ $vendor_description = escapeHtml($row['vendor_template_description']);
$vendor_account_number = escapeHtml($row['vendor_template_account_number']);
$vendor_contact_name = escapeHtml($row['vendor_template_contact_name']);
$vendor_phone_country_code = intval($row['vendor_template_phone_country_code']);
$vendor_phone = formatPhoneNumber($row['vendor_template_phone'], $vendor_phone_country_code);
$vendor_phone = formatPhoneNumber($row['vendor_template_phone'], $vendor_phone_country_code, false);
$vendor_extension = escapeHtml($row['vendor_template_extension']);
$vendor_email = escapeHtml($row['vendor_template_email']);
$vendor_website = escapeHtml($row['vendor_template_website']);

View File

@@ -14,8 +14,12 @@ $company_address = escapeHtml($row['company_address']);
$company_city = escapeHtml($row['company_city']);
$company_state = escapeHtml($row['company_state']);
$company_zip = escapeHtml($row['company_zip']);
$company_phone_country_code = formatPhoneNumber($row['company_phone_country_code']);
$company_phone = escapeHtml(formatPhoneNumber($row['company_phone'], $company_phone_country_code));
// escapeHtml, not formatPhoneNumber - this is a dial code, not a number.
// The old call was a no-op (no $country_code arg means no reformatting) but
// it left the value unescaped on the way into a hidden input, unlike every
// sibling modal.
$company_phone_country_code = escapeHtml($row['company_phone_country_code']);
$company_phone = escapeHtml(formatPhoneNumber($row['company_phone'], $company_phone_country_code, false));
$company_email = escapeHtml($row['company_email']);
$company_website = escapeHtml($row['company_website']);
$company_logo = escapeHtml($row['company_logo']);