Skip to content

Comments

feat: add required-field support for additional careers portal inputs#677

Merged
RussH merged 15 commits intoopencats:masterfrom
anonymoususer72041:feature/careers-required-fields
Feb 16, 2026
Merged

feat: add required-field support for additional careers portal inputs#677
RussH merged 15 commits intoopencats:masterfrom
anonymoususer72041:feature/careers-required-fields

Conversation

@anonymoususer72041
Copy link
Contributor

@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:

  • feat: introduce address2 and replace address textareas with inputs #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
Contributor Author

This Pull Request also addresses issue #354.

@anonymoususer72041 anonymoususer72041 changed the title Add required-field support for additional careers portal inputs feature: add required-field support for additional careers portal inputs Jan 22, 2026
Copy link
Member

@RussH RussH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR appears to be built on top of #675 and still includes the single-line address refactor. As noted in my review of #675, this format doesn't work for international addresses (UK building/suite lines). I recommend pausing this until the address field approach in #675 is resolved.

@RussH RussH self-assigned this Jan 26, 2026
@anonymoususer72041 anonymoususer72041 changed the title feature: add required-field support for additional careers portal inputs feat: add required-field support for additional careers portal inputs Jan 27, 2026
@anonymoususer72041 anonymoususer72041 force-pushed the feature/careers-required-fields branch from bce532d to 30096f4 Compare February 4, 2026 16:42
@anonymoususer72041 anonymoususer72041 force-pushed the feature/careers-required-fields branch from 30096f4 to 1e26992 Compare February 4, 2026 17:03
@anonymoususer72041
Copy link
Contributor Author

@anonymoususer72041 happy to merge this based on your comments above, let me know when #697 is updated and ready, and I'll do them both at the same time.

@RussH done

@anonymoususer72041 anonymoususer72041 force-pushed the feature/careers-required-fields branch from 1e26992 to 4ac9a25 Compare February 11, 2026 18:28
@RussH
Copy link
Member

RussH commented Feb 16, 2026

Thank you for the great work!

@RussH RussH merged commit d7fe1bd into opencats:master Feb 16, 2026
3 checks passed
@anonymoususer72041 anonymoususer72041 deleted the feature/careers-required-fields branch February 16, 2026 19:56
anonymoususer72041 added a commit to anonymoususer72041/OpenCATS that referenced this pull request Feb 17, 2026
…opencats#677)

* Use single-line address inputs for candidates, contacts and companies

* Use single-line address input in careers portal apply form

* Drop legacy address2 from candidates add form

* Add address2 to initial database schema

* Sync test SQL with address2 column

* Add address2 to existing databases

* Use address2 across the system

* Split existing multi-line address into address2

* Fix unit tests for address2 support

* Add required support for additional careers portal input fields

* Add comments in careers apply validator

* Fix address2 required validation message
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.

2 participants