From 5fc623ceeef918d096ce0c6858829fb58ddc8f94 Mon Sep 17 00:00:00 2001 From: Jared Hancock <gravydish@gmail.com> Date: Mon, 2 Jul 2012 08:51:25 -0500 Subject: [PATCH] Allow the admin to select from any canned response --- include/staff/filter.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/staff/filter.inc.php b/include/staff/filter.inc.php index c84e539b6..b23dd520b 100644 --- a/include/staff/filter.inc.php +++ b/include/staff/filter.inc.php @@ -189,8 +189,9 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <select name="canned_response"> <option value="">— None —</option> <?php - if($canneds=Canned::responsesByDeptId($thisstaff->getDeptId())) { - foreach ($canneds as $id => $title) { + $sql='SELECT canned_id,title FROM '.CANNED_TABLE.' ORDER by title'; + if ($res=db_query($sql)) { + while (list($id,$title)=db_fetch_row($res)) { $selected=($info['canned_response'] && $id==$info['canned_response']) ? 'selected="selected"' : ''; @@ -200,6 +201,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); } ?> </select> + <em>(Automatically respond with this canned attachment)</em> </td> </tr> <tr> -- GitLab