Skip to content

Commit

Permalink
Revert "added the option to email a candidate from the candidate show…
Browse files Browse the repository at this point in the history
… page (it was already implemented through mailto:, but this option is through OpenCATS so the email templates can be used) (#246) (#457)"

This reverts commit 0cd2295.
  • Loading branch information
RussH committed Nov 12, 2019
1 parent 0cd2295 commit b005f83
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 29 deletions.
28 changes: 9 additions & 19 deletions modules/candidates/CandidatesUI.php
Expand Up @@ -3344,31 +3344,21 @@ private function onEmailCandidates()
}
else
{
if(isset($_GET['candidateID']))
$dataGrid = DataGrid::getFromRequest();

$candidateIDs = $dataGrid->getExportIDs();

/* Validate each ID */
foreach ($candidateIDs as $index => $candidateID)
{
if (!$this->isRequiredIDValid('candidateID', $_GET)) {
if (!$this->isRequiredIDValid($index, $candidateIDs))
{
CommonErrors::fatalModal(COMMONERROR_BADINDEX, $this, 'Invalid candidate ID.');
return;
}
$candidateID = $_GET['candidateID'];
$db_str = $candidateID;
}
else
{
$dataGrid = DataGrid::getFromRequest();

$candidateIDs = $dataGrid->getExportIDs();

/* Validate each ID */
foreach ($candidateIDs as $index => $candidateID) {
if (!$this->isRequiredIDValid($index, $candidateIDs)) {
CommonErrors::fatalModal(COMMONERROR_BADINDEX, $this, 'Invalid candidate ID.');
return;
}
}

$db_str = implode(", ", $candidateIDs);
}
$db_str = implode(", ", $candidateIDs);

$db = DatabaseConnection::getInstance();

Expand Down
13 changes: 3 additions & 10 deletions modules/candidates/Show.tpl
Expand Up @@ -78,16 +78,9 @@ use OpenCATS\UI\CandidateDuplicateQuickActionMenu;
<tr>
<td class="vertical">E-Mail:</td>
<td class="data">
<?php if ($this->data['email1'] != ""): ?>
<a href="mailto:<?php $this->_($this->data['email1']); ?>" title="Send E-Mail via Email Client">
<?php $this->_($this->data['email1']); ?>
</a>
<a href="index.php?m=candidates&amp;a=emailCandidates&candidateID=<?php echo $this->_($this->data['candidateID']); ?>" title="Send E-Mail via OpenCATS"/>
<img src="images/actions/email.gif" width="16" height="16" alt="" class="absmiddle" border="0" />
</a>
<?php else: ?>
<img src="images/actions/email_no.gif" title="No E-Mail Address" width="16" height="16" alt="" class="absmiddle" border="0" />
<?php endif; ?>
<a href="mailto:<?php $this->_($this->data['email1']); ?>">
<?php $this->_($this->data['email1']); ?>
</a>
</td>
</tr>
<tr>
Expand Down

0 comments on commit b005f83

Please sign in to comment.