stable

Clone or download

Read-only

request #10687: No HTML5 validation of required list fields

Add a required selectbox field on a tracker. Open an already existing artifact. The field is already in edition mode. The form cannot be submitted unless you fill out the field. Repeat with multiselectbox, radio button, and checkbox. The same when you submit a new artifact. Technical note: using the `required` attribute is not enough for selectboxes and checkboxes. For selectboxes, the `required° attribute need the first option to have an empty value (here, we have our beloved "None value": 100) and for checkboxes, group of checkboxes are not supported by the required attribute. Therefore we have to play with custom validation API. Change-Id: Iaa2872cbcef1419ebd28355c2026d4b31ede5086

Modified Files

Name
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field.class.php +6 −2 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_List.class.php +9 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Radiobutton.class.php +5 −4 Go to diff View file
M plugins/tracker/site-content/en_US/script_locale.txt +3 −1 Go to diff View file
M plugins/tracker/site-content/fr_FR/script_locale.txt +3 −1 Go to diff View file
M plugins/tracker/www/scripts/TrackerArtifactEditionSwitcher.js +59 −0 Go to diff View file