From dbb6fe3cb1bc01e2ddcfde963e96a156da785d54 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@enhancesoft.com>
Date: Fri, 13 Jul 2018 18:33:56 +0000
Subject: [PATCH] Misc. Fixes

---
 include/class.collaborator.php                   | 2 ++
 include/staff/templates.inc.php                  | 2 +-
 include/staff/templates/tickets-actions.tmpl.php | 1 -
 scp/js/scp.js                                    | 2 +-
 setup/test/tests/stubs.php                       | 2 ++
 5 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/class.collaborator.php b/include/class.collaborator.php
index 94e97fee6..dc35a436f 100644
--- a/include/class.collaborator.php
+++ b/include/class.collaborator.php
@@ -168,6 +168,8 @@ implements EmailContact, ITicketUser {
 
     static function create($vars=false) {
         $inst = new static($vars);
+        $inst->setFlag(Collaborator::FLAG_ACTIVE, true);
+        $inst->setFlag(Collaborator::FLAG_CC, true);
         $inst->created = SqlFunction::NOW();
         return $inst;
     }
diff --git a/include/staff/templates.inc.php b/include/staff/templates.inc.php
index 0ed4dea24..e261a903c 100644
--- a/include/staff/templates.inc.php
+++ b/include/staff/templates.inc.php
@@ -106,7 +106,7 @@ else
                 if($ids && in_array($row['tpl_id'],$ids))
                     $sel=true;
 
-                $default=($defaultTplId==$row['tpl_id'])?'<small class="fadded">('.__('System Default').')</small>':'';
+                $default=($defaultTplId==$row['tpl_id'])?'<small class="faded">('.__('System Default').')</small>':'';
                 ?>
             <tr id="<?php echo $row['tpl_id']; ?>">
                 <td align="center">
diff --git a/include/staff/templates/tickets-actions.tmpl.php b/include/staff/templates/tickets-actions.tmpl.php
index 0535a5af2..2735fc70e 100644
--- a/include/staff/templates/tickets-actions.tmpl.php
+++ b/include/staff/templates/tickets-actions.tmpl.php
@@ -71,7 +71,6 @@ $(function() {
             +'?count='+count
             +'&tids='+tids.join(',')
             +'&_uid='+new Date().getTime();
-            console.log(tids);
             $.dialog(url, [201], function (xhr) {
                 $.pjax.reload('#pjax-container');
              });
diff --git a/scp/js/scp.js b/scp/js/scp.js
index 4f67a74d1..e016087d3 100644
--- a/scp/js/scp.js
+++ b/scp/js/scp.js
@@ -801,7 +801,7 @@ $.confirm = function(message, title, options) {
             .append($('<span class="buttons pull-left"></span>')
                 .append($('<input type="button" class="close"/>')
                     .attr('value', __('Cancel'))
-                    .click(function() { hide(); })
+                    .click(function() { hide();  D.resolve(false); })
             )).append($('<span class="buttons pull-right"></span>')
                 .append($('<input type="button"/>')
                     .attr('value', __('OK'))
diff --git a/setup/test/tests/stubs.php b/setup/test/tests/stubs.php
index 6a7b0d285..4cb35183c 100644
--- a/setup/test/tests/stubs.php
+++ b/setup/test/tests/stubs.php
@@ -223,6 +223,8 @@ class Mail_mime {
     function setTXTBody() {}
     function setHTMLBody() {}
     function addCc() {}
+    function addTo() {}
+    function addBcc() {}
 }
 
 class mPDF {
-- 
GitLab