From e47323012b1bb063b4925a1d22ace3f79c4103ec Mon Sep 17 00:00:00 2001
From: Brett Bieber <brett.bieber@gmail.com>
Date: Wed, 12 Jan 2011 17:46:44 +0000
Subject: [PATCH] Allow sending confirmation emails again.

---
 src/UNL/UCARE/Reminder.php                 |  6 +++++-
 www/templates/Admin/ApplicantTable.tpl.php | 11 ++++++++---
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/UNL/UCARE/Reminder.php b/src/UNL/UCARE/Reminder.php
index 60b6011..45aab7e 100644
--- a/src/UNL/UCARE/Reminder.php
+++ b/src/UNL/UCARE/Reminder.php
@@ -20,6 +20,10 @@ class UNL_UCARE_Reminder
         if (!$this->application) {
             throw new Exception('Could not find that application!');
         }
-        $this->application->emailSponsor();
+        if (isset($options['confirmation'])) {
+            $this->application->emailApplicant();
+        } else {
+            $this->application->emailSponsor();
+        }
     }
 }
\ No newline at end of file
diff --git a/www/templates/Admin/ApplicantTable.tpl.php b/www/templates/Admin/ApplicantTable.tpl.php
index ce6b143..b74ebb2 100644
--- a/www/templates/Admin/ApplicantTable.tpl.php
+++ b/www/templates/Admin/ApplicantTable.tpl.php
@@ -13,14 +13,19 @@
     ?>
     <tr>
         <td><?php echo $id; ?>
-        <td><?php echo $app->first_name.' '.$app->last_name; ?></td>
+        <td>
+            <?php echo $app->first_name.' '.$app->last_name; ?><br />
+            <a style="font-size:smaller" href="?view=reminder&amp;year=<?php echo $year; ?>&amp;id=<?php echo $app->id; ?>&amp;confirmation=1">Send Confirmation</a>
+        </td>
         <td><?php echo $app->title; ?></td>
         <td><?php echo date('Y-m-d', strtotime($app->datesubmitted)); ?></td>
-        <td><a href="http://peoplefinder.unl.edu/?uid=<?php echo $app->sponsor_uid; ?>"><?php echo $app->sponsor_uid; ?></a></td>
+        <td><a href="http://directory.unl.edu/?uid=<?php echo $app->sponsor_uid; ?>"><?php echo $app->sponsor_uid; ?></a></td>
         <?php if ($app->getEndorsement()) : ?>
         <td class="complete">Endorsement complete</td>
         <?php else : ?>
-        <td><a href="?view=reminder&amp;year=<?php echo $year; ?>&amp;id=<?php echo $app->id; ?>">Send Reminder</a></td>
+        <td>
+            <a href="?view=reminder&amp;year=<?php echo $year; ?>&amp;id=<?php echo $app->id; ?>">Send Reminder</a>
+        </td>
         <?php endif; ?>
         <td><a href="?view=admin&amp;delete<?php echo $year; ?>=<?php echo $app->id; ?>" onclick="return confirm('Are you sure?');">Delete</a></td>
     </tr>
-- 
GitLab