Update new milestone form to match Pajamas specs
What does this MR do and why?
Solves #333756 (closed)
Before:
- Create new milestone form was using
js-quick-submit
andjs-requires-input
to disable Create milestone button unless all required inputs are filled.
After:
- enables Create milestone button always
-
js-requires-validation
adds an onClick handler to the submit button - handler checks that all required inputs are filled
- if they are filled, submits the form
- if any are missing, prompts the user highlighted input is required
-
js-requires-validation
specs test for this as well
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Navigate to Create milestone via groups or projects to view changes
- Click Create milestone without filling out any fields, this will show error message and highlight the required fields
- Enter input in the required fields, and click Create milestone, this should Submit the form successfully
- (Optional) Tabbing the above steps should yield the same results
Next steps
#333757 (closed) can likely use js-requires-validation
(yet to be investigated)