Skip to content
Snippets Groups Projects
Commit 5fc623ce authored by Jared Hancock's avatar Jared Hancock
Browse files

Allow the admin to select from any canned response

parent 38910e53
Branches
Tags
No related merge requests found
...@@ -189,8 +189,9 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); ...@@ -189,8 +189,9 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
<select name="canned_response"> <select name="canned_response">
<option value="">&mdash; None &mdash;</option> <option value="">&mdash; None &mdash;</option>
<?php <?php
if($canneds=Canned::responsesByDeptId($thisstaff->getDeptId())) { $sql='SELECT canned_id,title FROM '.CANNED_TABLE.' ORDER by title';
foreach ($canneds as $id => $title) { if ($res=db_query($sql)) {
while (list($id,$title)=db_fetch_row($res)) {
$selected=($info['canned_response'] && $selected=($info['canned_response'] &&
$id==$info['canned_response']) $id==$info['canned_response'])
? 'selected="selected"' : ''; ? 'selected="selected"' : '';
...@@ -200,6 +201,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); ...@@ -200,6 +201,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
} }
?> ?>
</select> </select>
<em>(Automatically respond with this canned attachment)</em>
</td> </td>
</tr> </tr>
<tr> <tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment