Closed jamesatheyDDS closed 6 years ago
Regarding ZIP entry, a few questions:
type="number"
continue to function with leading-zero ZIP codes (e.g. 08904)? I vaguely remember having an issue where browsers won't POST
all five digits if the leading digits are zero.@jgarber623-gov
Will these changes prevent users from entering postal codes that aren't entirely numeric (thinking OCONUS off-base postal codes, specifically)?...and/or do we support calculations in regions where postal codes aren't entirely numeric (and five-digit based on the constraints)?
The estimator does not support OCONUS locations at all at the moment. The constraint was 5 digits before this PR as well, this just lets iOS and Android browsers detect that the field is numeric correctly.
Do these form fields that are now of type="number" continue to function with leading-zero ZIP codes (e.g. 08904)?
I just tested the ZIP code 06511 with both Chrome and IE11, and it worked in both browsers.
Addresses #374.
Checklist
I have…
bin/rails server
) and verified that my changes behave as expected.bin/rubocop
) and vulnerability scan (bin/brakeman
) against my changes.bin/rake spec
) and verified that all tests pass.Summary of Changes
This pull request sets the apporpriate attributes on the PPM Estimator and Weight Estimator forms so that mobile browsers will get the numeric-only keyboard when entering quantities, ZIP codes, dates, and weights.
Testing
To verify the changes proposed in this pull request…
numeric-only-inputs
,bin/rails server
, andScreenshots
PPM Estimator - zip code field - before (iOS Safari)
![img_2697c1814ece-1](https://user-images.githubusercontent.com/26554826/38832629-27f0515c-4191-11e8-9189-44a4fa1ff4ff.jpeg)PPM Estimator - zip code field - after (iOS Safari)
![img_ddce3b3e48e1-1](https://user-images.githubusercontent.com/26554826/38832634-2d385a6a-4191-11e8-821f-17fce955ca90.jpeg)Weight Estimator - quantity field - before (iOS Safari)
![img_d8767e3d230a-1](https://user-images.githubusercontent.com/26554826/38832638-32146902-4191-11e8-8af8-b9d301d9ba6a.jpeg)Weight Estimator - quantity field - after (iOS Safari)
![img_bd6a817cadd0-1](https://user-images.githubusercontent.com/26554826/38832642-36778a9c-4191-11e8-8285-20b7b62ff57c.jpeg)