Conversation
LarrySonar
left a comment
There was a problem hiding this comment.
Needs finer grained country code.
| PhoneNumber::FAX => null, | ||
| ]; | ||
|
|
||
| $country = SystemSetting::first()->country; |
There was a problem hiding this comment.
This unfortunately will not work as needed. We allow in Sonar each individual number to specify the country which is where we should be getting that from though I am not certain it is getting passed back to the portal for use.
Looking at the card, I would state the "real" problem as the lack of validation in the application. I just tested with: 1339064285555 and it accepted that as well! It then just displayed as an unformatted string with the 1 stripped in the UI.
| return utrans("errors.failedToUpdateProfile"); | ||
| } | ||
|
|
||
| private function formatPhoneForDisplay(string $phoneNumber, string $country): string |
There was a problem hiding this comment.
nit: Might name this differently as not really doing "formatting" - maybe stripUsCountryCodeForDisplay(...) though not sure if this will be needed once we fix the item above.
This PR takes care of three small Portal UI issues.
Bug 37078: Customer Portal - Including a "1" before a 10 digit phone number will display in the portal with the last digit being truncated
The issue here is that if a user inputs a US phone number on an account with a leading 1, the existing template data mask would malform the number (non US numbers are rendered as-is) My solution here is to simply truncate that leading 1. Another option would be to update the Portal Framework to include the
number_formattedfield, however I decided that is likely overkill for this edge case.Bug 36078: Customer Portal > Make a Payment - Country and State/Province revert to U.S.
This was a simple addition of blade's
old()template function to retrieve the session data on validation redirects.Bug 36278: Customer Portal > Clicking submit multiple times adds duplicate bank account payment methods
Required a bit of JS to disable the button on submit.