[opw-web] Show names entered when accepting contracts on "Program Participants"



commit 9286d81541c53a9d5320424fa111fd784c303a94
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Thu May 14 14:31:15 2015 -0400

    Show names entered when accepting contracts on "Program Participants"

 modules/mod_view_participants.php |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/modules/mod_view_participants.php b/modules/mod_view_participants.php
index 7b0a0d2..f06ee7b 100644
--- a/modules/mod_view_participants.php
+++ b/modules/mod_view_participants.php
@@ -22,7 +22,7 @@ if ($accepted) {
     $accepted_clause = '';
 }
 
-$sql = "SELECT r.username, r.role AS role, r.contract_approved, r.contract_accepted_time, " .
+$sql = "SELECT r.username, r.role AS role, r.contract_approved, r.contract_accepted_time, 
r.contract_entered_name, " .
        "pr.id AS project_id, pr.title AS project_title, pr.is_accepted, " .
        "pf.fullname, " .
        "(SELECT COUNT(*) FROM {$db->prefix}attachments a " .
@@ -84,6 +84,7 @@ foreach ($list_data as $row)
         'any_accepted' => $row['is_accepted'] == 1,
         'contract_approved'  => $row['contract_approved'],
         'contract_accepted_time'  => $row['contract_accepted_time'],
+        'contract_entered_name'  => $row['contract_entered_name'],
         'contract_count'     => $row['contract_count']
     );
 
@@ -95,8 +96,10 @@ $participant_list = '';
 
 foreach ($list as $item)
 {
-    if ($item['contract_approved'] == 1 || $item['contract_accepted_time'] != 0)
+    if ($item['contract_approved'] == 1)
         $contract_approved = $lang->get('yes');
+    else if ($item['contract_accepted_time'] != 0)
+        $contract_approved = $lang->get('yes') . " (" . htmlspecialchars($item['contract_entered_name']) . 
")";
     else if ($item['any_accepted'] == 1) {
         if ($item['contract_count'] > 0)
             $contract_approved = $lang->get('uploaded');


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]