From 292d29b9ce84732787eb4f917e8b8d4a7afcdb9f Mon Sep 17 00:00:00 2001 From: aydreeihn <adriane@enhancesoft.com> Date: Wed, 21 Mar 2018 17:03:33 -0500 Subject: [PATCH] only show the from dropdown in ticket view if smtp set up for at least one email --- include/staff/ticket-view.inc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index f5d7ae5f7..6b8fe9791 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -695,15 +695,15 @@ if ($errors['err'] && isset($_POST['a'])) { <?php }?> <tbody id="to_sec"> + <?php + # XXX: Add user-to-name and user-to-email HTML ID#s + if ($addresses = Email::getAddresses(array('smtp' => true))){ + ?> <tr> <td width="120"> <label><strong><?php echo __('From'); ?>:</strong></label> </td> <td> - <?php - # XXX: Add user-to-name and user-to-email HTML ID#s - $addresses = Email::getAddresses(); - ?> <select id="from_name" name="from_name"> <?php $sql=' SELECT email_id, email, name, smtp_host ' @@ -719,6 +719,7 @@ if ($errors['err'] && isset($_POST['a'])) { </select> </td> </tr> + <?php } ?> <tr> <td width="120"> <label><strong><?php echo __('To'); ?>:</strong></label> -- GitLab