Skip to content

Conversation

@anonymoususer72041
Copy link

Note about dependency on #675

This Pull Request currently builds on top of #675.

The dependency is mainly about the address field:

  • Single line address instead of textareas in UI #675 makes sure that all address fields are rendered as single-line inputs with a consistent id="address".
  • This Pull Request extends the careers portal validation and relies on the address field having a stable id="address" so that <input-address req> can be validated safely.

Summary

Extend _makeApplyValidator() in modules/careers/CareersUI.php so more input placeholders
can be configured as required via the req marker in the careers portal template, e.g.

- `<input-phone-cell req>`
- `<input-phone-home req>`
- `<input-phoneWork req>`
- `<input-email1 req>` / `<input-email2 req>`
- `<input-source req>`
- `<input-employer req>` / `<input-currentEmployer req>`
- `<input-resumeUpload req>`
- `<input-eeo-gender req>`, `<input-eeo-race req>`, `<input-eeo-veteran req>`, `<input-eeo-disability req>`

Motivation

OpenCATS already supports a small set of required fields in the careers portal by looking for markers like <input-address req> in the template and generating a JavaScript applyValidate() function accordingly.

However, a number of input placeholders were not "req-aware" and could not be configured as required fields even though they are important in real-world setups (e.g. mobile phone number or resume upload).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant