diff --git a/include/class.dept.php b/include/class.dept.php index 38b372f8acc8bcb09a3ce51c05e39c2c002756da..44bf6561ebbb33ae92b357fdd7e2034f6aab4166 100644 --- a/include/class.dept.php +++ b/include/class.dept.php @@ -152,9 +152,11 @@ class Dept { function getAutoRespEmail() { - if (!$this->autorespEmail && $this->ht['autoresp_email_id']) - if (!($this->autorespEmail = Email::lookup($this->ht['autoresp_email_id']))) + if (!$this->autorespEmail) { + if (!$this->ht['autoresp_email_id'] + || !($this->autorespEmail = Email::lookup($this->ht['autoresp_email_id']))) $this->autorespEmail = $this->getEmail(); + } return $this->autorespEmail; } diff --git a/include/staff/department.inc.php b/include/staff/department.inc.php index c452cab26d3074540e292dda715b3b206fd53cda..2a001a4037d5864849f6e5b718227f7270c5648c 100644 --- a/include/staff/department.inc.php +++ b/include/staff/department.inc.php @@ -86,7 +86,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </td> <td> <select name="tpl_id"> - <option value="0">— System default —</option> + <option value="0">— System Default —</option> <?php $sql='SELECT tpl_id,name FROM '.EMAIL_TEMPLATE_GRP_TABLE.' tpl WHERE isactive=1 ORDER by name'; if(($res=db_query($sql)) && db_num_rows($res)){ @@ -106,7 +106,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </td> <td> <select name="sla_id"> - <option value="0">— System default —</option> + <option value="0">— System Default —</option> <?php if($slas=SLA::getSLAs()) { foreach($slas as $id =>$name) { @@ -176,12 +176,11 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <tr> <td width="180"> - Auto Response Email: + Auto-Response Email: </td> <td> <select name="autoresp_email_id"> - <option value="" disabled="disabled">Select Outgoing Email</option> - <option value="0">— Department Email (Above) —</option> + <option value="0" selected="selected">— Department Email —</option> <?php $sql='SELECT email_id,email,name FROM '.EMAIL_TABLE.' email ORDER by name'; if(($res=db_query($sql)) && db_num_rows($res)){ diff --git a/include/staff/email.inc.php b/include/staff/email.inc.php index 33ddc72c14f6adf9bed9a3c37b99a07d51c26d8a..193a5347815237a41b2ffbc613cbb0a75b05914f 100644 --- a/include/staff/email.inc.php +++ b/include/staff/email.inc.php @@ -69,9 +69,9 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </td> <td> <select name="priority_id"> - <option value="">— Select Priority —</option> + <option value="0" selected="selected">— System Default —</option> <?php - $sql='SELECT priority_id,priority_desc FROM '.PRIORITY_TABLE.' pri ORDER by priority_urgency DESC'; + $sql='SELECT priority_id, priority_desc FROM '.PRIORITY_TABLE.' pri ORDER by priority_urgency DESC'; if(($res=db_query($sql)) && db_num_rows($res)){ while(list($id,$name)=db_fetch_row($res)){ $selected=($info['priority_id'] && $id==$info['priority_id'])?'selected="selected"':''; @@ -89,9 +89,9 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </td> <td> <select name="dept_id"> - <option value="">— Select Department —</option> + <option value="0" selected="selected">— System Default —</option> <?php - $sql='SELECT dept_id,dept_name FROM '.DEPT_TABLE.' dept ORDER by dept_name'; + $sql='SELECT dept_id, dept_name FROM '.DEPT_TABLE.' dept ORDER by dept_name'; if(($res=db_query($sql)) && db_num_rows($res)){ while(list($id,$name)=db_fetch_row($res)){ $selected=($info['dept_id'] && $id==$info['dept_id'])?'selected="selected"':'';