diff --git a/modules/candidates/Add.tpl b/modules/candidates/Add.tpl
index c56dcad6..3dab5ee9 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 aeb5c798..f2a33cb6 100755
--- a/modules/candidates/Edit.tpl
+++ b/modules/candidates/Edit.tpl
@@ -117,7 +117,7 @@
-
+
|
diff --git a/modules/careers/CareersUI.php b/modules/careers/CareersUI.php
index f47c92fb..b842075d 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']);
@@ -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 .= '
@@ -1080,6 +1089,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 +1222,54 @@ private function _makeApplyValidator($template)
}';
}
+ /*
+ * EEO fields (if enabled and placed in the 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 = '';
diff --git a/modules/companies/Add.tpl b/modules/companies/Add.tpl
index 9487743a..a71baaf2 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 8ca6aba1..f9f83860 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 6ca978de..944b9f00 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 4e396357..9c0a25c8 100755
--- a/modules/contacts/Edit.tpl
+++ b/modules/contacts/Edit.tpl
@@ -188,7 +188,7 @@
-
+
|