Bug #5353
openWidget Gallery "Integration example" has some issues with validation
0%
Description
With github wt 3.3.6-6-gbadb151, the Widget Gallery "Integration example" exhibits some validation-related problems, particularly when JavaScript is not available.
- Attempting to save an invalid input in the "Birth date" field, e.g. "not-a-date" results in the message "This field cannot be empty" - when the displayed field is not empty. As a consequence, there is no ability to view more useful validation messages that describe the expected input format.
- Without JavaScript, attempting to save invalid values in the "Children" field results in replacement with a prior integer value, e.g. an initial input value of "yes" gets changed to "0" when "Save" is clicked. If "10" has previously been accepted, an attempt to change it to "12.7" will result in the value updating to "10".
- Without JavaScript, there is no way to set the City. Setting a "Country" and pressing "Save" does not refresh the "City" combo box.
Attached, for your review, is a patch that is intended to address the above issues.
Also, for your review, are two related patches that modify the "Integration example" to take advantage of additional C++11 features and the block function. These two patches are independent and intended to be applied in addition to the first patch. NOTE: The third patch is an alternative way of addressing issue #5348. Other than that, the latter two patches are not intended to alter functionality. Please feel free to incorporate any portions you think are helpful. There are additional comments in the patch files.
Files
Updated by Bruce Toll over 7 years ago
- File 0004-Minor-improvements-to-Integration-Example-part-2v2.patch 0004-Minor-improvements-to-Integration-Example-part-2v2.patch added
There is an error in the attached 0003-Minor-improvements-to-Integration-Example-part-2.patch, with respect to the label field. A corrected version has been attached as 0004-Minor-improvements-to-Integration-Example-part-2v2.patch.