From 44320d6c03bfa5ae2eb6661afc3fa7a863708886 Mon Sep 17 00:00:00 2001
From: anonymoususer72041
<247563575+anonymoususer72041@users.noreply.github.com>
Date: Fri, 5 Dec 2025 09:04:02 +0100
Subject: [PATCH 1/5] Use single-line address inputs for candidates, contacts
and companies
---
modules/candidates/Add.tpl | 2 +-
modules/candidates/Edit.tpl | 2 +-
modules/companies/Add.tpl | 2 +-
modules/companies/Edit.tpl | 2 +-
modules/contacts/Add.tpl | 2 +-
modules/contacts/Edit.tpl | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/candidates/Add.tpl b/modules/candidates/Add.tpl
index c56dcad6c..89bbebddc 100755
--- a/modules/candidates/Add.tpl
+++ b/modules/candidates/Add.tpl
@@ -224,7 +224,7 @@
-
+
|
diff --git a/modules/candidates/Edit.tpl b/modules/candidates/Edit.tpl
index aeb5c7987..f2a33cb6e 100755
--- a/modules/candidates/Edit.tpl
+++ b/modules/candidates/Edit.tpl
@@ -117,7 +117,7 @@
-
+
|
diff --git a/modules/companies/Add.tpl b/modules/companies/Add.tpl
index 9487743af..a71baaf25 100755
--- a/modules/companies/Add.tpl
+++ b/modules/companies/Add.tpl
@@ -75,7 +75,7 @@
-
+
|
diff --git a/modules/companies/Edit.tpl b/modules/companies/Edit.tpl
index 8ca6aba16..f9f838600 100755
--- a/modules/companies/Edit.tpl
+++ b/modules/companies/Edit.tpl
@@ -141,7 +141,7 @@
- _($this->data['address']); ?>
+
|
diff --git a/modules/contacts/Add.tpl b/modules/contacts/Add.tpl
index 6ca978ded..944b9f00a 100755
--- a/modules/contacts/Add.tpl
+++ b/modules/contacts/Add.tpl
@@ -168,7 +168,7 @@
-
+
|
diff --git a/modules/contacts/Edit.tpl b/modules/contacts/Edit.tpl
index 4e3963571..9c0a25c83 100755
--- a/modules/contacts/Edit.tpl
+++ b/modules/contacts/Edit.tpl
@@ -188,7 +188,7 @@
-
+
|
From e187c3de28c8fe03619637b378bbaee928437cc0 Mon Sep 17 00:00:00 2001
From: anonymoususer72041
<247563575+anonymoususer72041@users.noreply.github.com>
Date: Fri, 5 Dec 2025 10:52:02 +0100
Subject: [PATCH 2/5] Use single-line address input in careers portal apply
form
---
modules/careers/CareersUI.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/careers/CareersUI.php b/modules/careers/CareersUI.php
index f47c92fb9..3adc92403 100755
--- a/modules/careers/CareersUI.php
+++ b/modules/careers/CareersUI.php
@@ -224,7 +224,7 @@ private function careersPage()
/* Replace input fields. */
$content = str_replace('', '', $content);
$content = str_replace('', '', $content);
- $content = str_replace('', '', $content);
+ $content = str_replace('', '', $content);
$content = str_replace('', '', $content);
$content = str_replace('', '', $content);
$content = str_replace('', '', $content);
@@ -581,7 +581,7 @@ private function careersPage()
$template['Content'] = str_replace('', $jobOrderData['title'], $template['Content']);
$template['Content'] = str_replace('', '', $template['Content']);
$template['Content'] = str_replace('', '', $template['Content']);
- $template['Content'] = str_replace('', '', $template['Content']);
+ $template['Content'] = str_replace('', '', $template['Content']);
$template['Content'] = str_replace('', '', $template['Content']);
$template['Content'] = str_replace('', '', $template['Content']);
$template['Content'] = str_replace('', '', $template['Content']);
From 1176778a0addf16d34d9843d8025e18d12a02423 Mon Sep 17 00:00:00 2001
From: anonymoususer72041
<247563575+anonymoususer72041@users.noreply.github.com>
Date: Fri, 5 Dec 2025 14:54:37 +0100
Subject: [PATCH 3/5] Drop legacy address2 from candidates add form
---
modules/candidates/Add.tpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/candidates/Add.tpl b/modules/candidates/Add.tpl
index 89bbebddc..3dab5ee93 100755
--- a/modules/candidates/Add.tpl
+++ b/modules/candidates/Add.tpl
@@ -224,7 +224,7 @@
-
+
|
From b976a223d8116f3d8ddf146eca31d9bb8711c239 Mon Sep 17 00:00:00 2001
From: anonymoususer72041
<247563575+anonymoususer72041@users.noreply.github.com>
Date: Fri, 5 Dec 2025 15:55:32 +0100
Subject: [PATCH 4/5] Add required support for additional careers portal input
fields
---
modules/careers/CareersUI.php | 155 ++++++++++++++++++++++++++++++++++
1 file changed, 155 insertions(+)
diff --git a/modules/careers/CareersUI.php b/modules/careers/CareersUI.php
index 3adc92403..213bb23b3 100755
--- a/modules/careers/CareersUI.php
+++ b/modules/careers/CareersUI.php
@@ -1080,6 +1080,117 @@ private function _makeApplyValidator($template)
}';
}
+ if (strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'phoneCell\').value == \'\')
+ {
+ alert(\'Please enter a mobile phone number.\');
+ document.getElementById(\'phoneCell\').focus();
+ return false;
+ }';
+ }
+
+ if (strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'phoneHome\').value == \'\')
+ {
+ alert(\'Please enter a home phone number.\');
+ document.getElementById(\'phoneHome\').focus();
+ return false;
+ }';
+ }
+
+ if (strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'phoneWork\').value == \'\')
+ {
+ alert(\'Please enter a work phone number.\');
+ document.getElementById(\'phoneWork\').focus();
+ return false;
+ }';
+ }
+
+ if (strpos($template['Content'], '') !== false ||
+ strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'bestTimeToCall\').value == \'\')
+ {
+ alert(\'Please enter the best time to call.\');
+ document.getElementById(\'bestTimeToCall\').focus();
+ return false;
+ }';
+ }
+
+ if (strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'email2\').value == \'\')
+ {
+ alert(\'Please enter an E-Mail address.\');
+ document.getElementById(\'email2\').focus();
+ return false;
+ }';
+ }
+
+ if (strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'email1\').value == \'\')
+ {
+ alert(\'Please enter an E-Mail address.\');
+ document.getElementById(\'email1\').focus();
+ return false;
+ }';
+ }
+
+ if (strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'source\').value == \'\')
+ {
+ alert(\'Please enter a source.\');
+ document.getElementById(\'source\').focus();
+ return false;
+ }';
+ }
+
+ if (strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'employer\').value == \'\')
+ {
+ alert(\'Please enter your current employer.\');
+ document.getElementById(\'employer\').focus();
+ return false;
+ }';
+ }
+
+ if (strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'currentEmployer\').value == \'\')
+ {
+ alert(\'Please enter your current employer.\');
+ document.getElementById(\'currentEmployer\').focus();
+ return false;
+ }';
+ }
+
+ if (strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'resume\').value == \'\')
+ {
+ alert(\'Please upload your resume.\');
+ document.getElementById(\'resume\').focus();
+ return false;
+ }';
+ }
+
if (strpos($template['Content'], '') !== false)
{
$validator .= '
@@ -1102,6 +1213,50 @@ private function _makeApplyValidator($template)
}';
}
+ if (strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'eeogender\').value == \'\')
+ {
+ alert(\'Please select your gender.\');
+ document.getElementById(\'eeogender\').focus();
+ return false;
+ }';
+ }
+
+ if (strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'eeorace\').value == \'\')
+ {
+ alert(\'Please select your race.\');
+ document.getElementById(\'eeorace\').focus();
+ return false;
+ }';
+ }
+
+ if (strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'eeoveteran\').value == \'\')
+ {
+ alert(\'Please select your veteran status.\');
+ document.getElementById(\'eeoveteran\').focus();
+ return false;
+ }';
+ }
+
+ if (strpos($template['Content'], '') !== false)
+ {
+ $validator .= '
+ if (document.getElementById(\'eeodisability\').value == \'\')
+ {
+ alert(\'Please select your disability status.\');
+ document.getElementById(\'eeodisability\').focus();
+ return false;
+ }';
+ }
+
$validator = '';
From 5f52469fb740109e3a7f907292dc7c79868c0879 Mon Sep 17 00:00:00 2001
From: anonymoususer72041
<247563575+anonymoususer72041@users.noreply.github.com>
Date: Fri, 5 Dec 2025 15:57:52 +0100
Subject: [PATCH 5/5] Add comments in careers apply validator
---
modules/careers/CareersUI.php | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/modules/careers/CareersUI.php b/modules/careers/CareersUI.php
index 213bb23b3..b842075db 100755
--- a/modules/careers/CareersUI.php
+++ b/modules/careers/CareersUI.php
@@ -974,6 +974,7 @@ private function _makeApplyValidator($template)
{
$validator = '';
+ // First name is always required if the field is present in the template.
if (strpos($template['Content'], '') !== false || strpos($template['Content'], '') !== false)
{
$validator .= '
@@ -985,6 +986,7 @@ private function _makeApplyValidator($template)
}';
}
+ // Last name is always required if the field is present in the template.
if (strpos($template['Content'], '') !== false || strpos($template['Content'], '') !== false)
{
$validator .= '
@@ -996,6 +998,7 @@ private function _makeApplyValidator($template)
}';
}
+ // Email confirmation must match the primary email if the field is present.
if (strpos($template['Content'], '') !== false || strpos($template['Content'], '') !== false)
{
$validator .= '
@@ -1007,6 +1010,7 @@ private function _makeApplyValidator($template)
}';
}
+ // Primary email must be present and must look somewhat valid.
if (strpos($template['Content'], '') !== false || strpos($template['Content'], '') !== false)
{
$validator .= '
@@ -1025,6 +1029,11 @@ private function _makeApplyValidator($template)
}';
}
+ /*
+ * Optional fields that can be made required by using the "req" marker
+ * in the template, for example .
+ */
+
if (strpos($template['Content'], '') !== false)
{
$validator .= '
@@ -1213,6 +1222,10 @@ private function _makeApplyValidator($template)
}';
}
+ /*
+ * EEO fields (if enabled and placed in the template).
+ */
+
if (strpos($template['Content'], '') !== false)
{
$validator .= '