From ffb33d00c8eb04b7e2d0587c12bc273aaa7d1431 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 10 Oct 2021 20:21:41 -0400 Subject: [PATCH] Fix some phone/email bugs for new custorder page --- tailbone/templates/custorders/create.mako | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tailbone/templates/custorders/create.mako b/tailbone/templates/custorders/create.mako index 390d6f34..5aed3c7b 100644 --- a/tailbone/templates/custorders/create.mako +++ b/tailbone/templates/custorders/create.mako @@ -153,7 +153,13 @@
- {{ orderPhoneNumber }} + + {{ orderPhoneNumber }} + + + (no valid phone number on file) +
% if allow_contact_info_choice:
- (no valid email on file) + (no valid email address on file)
% if allow_contact_info_choice: @@ -1035,7 +1041,7 @@ that.orderPhoneNumber = response.data.phone_number that.orderEmailAddress = response.data.email_address that.addOtherPhoneNumber = response.data.add_phone_number - that.addOtherEmailAddres = response.data.add_email_address + that.addOtherEmailAddress = response.data.add_email_address that.contactProfileURL = response.data.contact_profile_url that.contactPhones = response.data.contact_phones that.contactEmails = response.data.contact_emails @@ -1051,7 +1057,7 @@ editPhoneNumberInit() { this.existingPhoneUUID = null - let normalOrderPhone = this.orderPhoneNumber.replace(/\D/g, '') + let normalOrderPhone = (this.orderPhoneNumber || '').replace(/\D/g, '') for (let phone of this.contactPhones) { let normal = phone.number.replace(/\D/g, '') if (normal == normalOrderPhone) {