Skip to content

Update new milestone form to match Pajamas specs

Minahil Nichols requested to merge new-milestone-form-pajamas into master

What does this MR do and why?

Solves #333756 (closed)

Before:

  • Create new milestone form was using js-quick-submit and js-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
image image
image image

How to set up and validate locally

  1. Navigate to Create milestone via groups or projects to view changes
  2. Click Create milestone without filling out any fields, this will show error message and highlight the required fields
  3. Enter input in the required fields, and click Create milestone, this should Submit the form successfully
  4. (Optional) Tabbing the above steps should yield the same results

Next steps

#333757 (closed) can likely use js-requires-validation (yet to be investigated)

Merge request reports