Page 1 of 1

Editing candidate resets EEO values to default

Posted: 01 May 2015, 14:45
by dmcman73
I have EEO tracking on and I'm not sure if anyone else has noticed this but, if you go to edit a candidate, say to enter their desired salary, whatever value there was set for either their race, veteran status and/or disability status is reset to the default " ----" value. It does not do this with the Gender one though.

I modified the lines in the code (in the add.tpl, edit.tpl and the careers module) to change some of the descriptions and also added some as well as requested by legal. I also added the same exact descriptions and value numbers to the database as well so it all matched. Everything works and is displayed as it should but, as soon as you click on edit in the candidate display, those EEO fields get reset on the edit page. Is there a way to tell the system to pull the value from the database rather than reset the field to the default "-----" as soon as you click edit?

Also, is there a reason why in the code that all of the EEO labels are "canRelocateLabel" and "canRelocate", shouldn't these be unique? I didn't change these as this is how it is in the original code base and didn't want to break anything.

This is the code section in the Edit.tpl:

START CODE-----------------------------------------------------------------------------------------------

<?php if($this->EEOSettingsRS['enabled'] == 1): ?>
<?php if(!$this->EEOSettingsRS['canSeeEEOInfo']): ?>
<table class="editTable" width="700">
<tr>
<td>
Editing EEO data is disabled.
</td>
</tr>
</tr>
<table class="editTable" width="700" style="display:none;">
<?php else: ?>
<table class="editTable" width="700">
<?php endif; ?>

<?php if ($this->EEOSettingsRS['genderTracking'] == 1): ?>
<tr>
<td class="tdVertical">
<label id="canRelocateLabel" for="canRelocate">Gender:</label>
</td>
<td class="tdData">
<select id="gender" name="gender" class="inputbox" style="width:200px;">
<option value="na">----</option>
<option value="m" <?php if (strtolower($this->data['eeoGender']) == 'm') echo('selected'); ?>>Male</option>
<option value="f" <?php if (strtolower($this->data['eeoGender']) == 'f') echo('selected'); ?>>Female</option>
<option value="np" <?php if (strtolower($this->data['eeoGender']) == 'np') echo('selected'); ?>>I do not wish to self-identify</option>
</select>
</td>
</tr>
<?php endif; ?>
<?php if ($this->EEOSettingsRS['ethnicTracking'] == 1): ?>
<tr>
<td class="tdVertical">
<label id="canRelocateLabel" for="canRelocate">Ethnic Background:</label>
</td>
<td class="tdData">
<select id="race" name="race" class="inputbox" style="width:200px;">
<option value="9">----</option>
<option value="1"<?php if (isset($this->preassignedFields['race']) && $this->preassignedFields['race'] == '1') echo ' selected'; ?>>American Indian or Alaska Native</option>
<option value="2"<?php if (isset($this->preassignedFields['race']) && $this->preassignedFields['race'] == '2') echo ' selected'; ?>>Non-Hispanic Asian</option>
<option value="3"<?php if (isset($this->preassignedFields['race']) && $this->preassignedFields['race'] == '3') echo ' selected'; ?>>Hispanic or Latino</option>
<option value="4"<?php if (isset($this->preassignedFields['race']) && $this->preassignedFields['race'] == '4') echo ' selected'; ?>>Non-Hispanic Black or African American</option>
<option value="5"<?php if (isset($this->preassignedFields['race']) && $this->preassignedFields['race'] == '5') echo ' selected'; ?>>Non-Hispanic White</option>
<option value="6"<?php if (isset($this->preassignedFields['race']) && $this->preassignedFields['race'] == '6') echo ' selected'; ?>>Non-Hispanic Native Hawaiian or Pacific Islander</option>
<option value="7"<?php if (isset($this->preassignedFields['race']) && $this->preassignedFields['race'] == '7') echo ' selected'; ?>>Two or More Races</option>
<option value="8"<?php if (isset($this->preassignedFields['race']) && $this->preassignedFields['race'] == '8') echo ' selected'; ?>>I Do Not Wish To Self-Identify</option>
</select>
</td>
</tr>
<?php endif; ?>
<?php if ($this->EEOSettingsRS['veteranTracking'] == 1): ?>
<tr>
<td class="tdVertical">
<label id="canRelocateLabel" for="canRelocate">Vetran Status:</label>
</td>
<td class="tdData">
<select id="veteran" name="veteran" class="inputbox" style="width:200px;">
<option selected="selected" value="3">----</option>
<option value="1"<?php if (isset($this->preassignedFields['veteran']) && $this->preassignedFields['veteran'] == '1') echo ' selected'; ?>>I Am Not A Protected Veteran</option>
<option value="2"<?php if (isset($this->preassignedFields['veteran']) && $this->preassignedFields['veteran'] == '2') echo ' selected'; ?>>I Am A Protected Veteran as Listed Above</option>
</select>
</td>
</tr>
<?php endif; ?>
<?php if ($this->EEOSettingsRS['disabilityTracking'] == 1): ?>
<tr>
<td class="tdVertical">
<label id="canRelocateLabel" for="canRelocate">Disability Status:</label>
</td>
<td class="tdData">
<select id="disability" name="disability" class="inputbox" style="width:200px;">
<option selected="selected" value="NA">----</option>
<option value="No"<?php if (isset($this->preassignedFields['disability']) && $this->preassignedFields['disability'] == 'No') echo ' selected'; ?>>No, I do not have a disability</option>
<option value="Yes"<?php if (isset($this->preassignedFields['disability']) && $this->preassignedFields['disability'] == 'Yes') echo ' selected'; ?>>Yes, I have a disability (or previously had one)</option>
<option value="NP"<?php if (isset($this->preassignedFields['disability']) && $this->preassignedFields['disability'] == 'NP') echo ' selected'; ?>>I do not wish to answer</option>
</select>
</td>
</tr>
<?php endif; ?>
</table>
<?php endif; ?>

END CODE---------------------------------------------------------------------------------------------------------------------------------------