Skip to content

Conversation

@anonymoususer72041
Copy link

@anonymoususer72041 anonymoususer72041 commented Dec 6, 2025

Note about dependency on #675

This Pull Request is currently stacked on top of #675.

The overlap is mainly about the address field:

  • Single line address instead of textareas in UI #675 changes the address fields to use single-line <input> elements with a consistent id="address", including the careers portal apply templates.
  • This Pull Request builds on that change and extends the careers portal validation. The updated _makeApplyValidator() assumes that <input-address> renders an element with 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:

- <input-phone-cell req>
- <input-phone-home req>
- <input-best-time-to-call req>
- <input-bestTimeToCall req>
- <input-email2 req>
- <input-source req>
- <input-employer 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).

This Pull Request extends the existing mechanism in a backwards-compatible way so that careers portal templates can opt into stricter validation where needed by simply adding the req marker to the relevant placeholders.

anonymoususer72041 added a commit to anonymoususer72041/OpenCATS that referenced this pull request Dec 11, 2025
opencats#677

commit bce532d
Author: anonymoususer72041 <247563575+anonymoususer72041@users.noreply.github.com>
Date:   Fri Dec 5 15:57:52 2025 +0100

    Add comments in careers apply validator

commit 47bef29
Author: anonymoususer72041 <247563575+anonymoususer72041@users.noreply.github.com>
Date:   Fri Dec 5 15:55:32 2025 +0100

    Add required support for additional careers portal input fields

commit 1176778
Author: anonymoususer72041 <247563575+anonymoususer72041@users.noreply.github.com>
Date:   Fri Dec 5 14:54:37 2025 +0100

    Drop legacy address2 from candidates add form

commit e187c3d
Author: anonymoususer72041 <247563575+anonymoususer72041@users.noreply.github.com>
Date:   Fri Dec 5 10:52:02 2025 +0100

    Use single-line address input in careers portal apply form

commit 44320d6
Author: anonymoususer72041 <247563575+anonymoususer72041@users.noreply.github.com>
Date:   Fri Dec 5 09:04:02 2025 +0100

    Use single-line address inputs for candidates, contacts and companies
@anonymoususer72041
Copy link
Author

This Pull Request also addresses issue #354.

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