From b659ec28b0b906798da9896debf272bb167e3686 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Thu, 05 Sep 2013 10:06:38 -0400
Subject: [PATCH] - Added check to tform if a client is locked
---
interface/web/help/form/support_message.tform.php | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/interface/web/help/form/support_message.tform.php b/interface/web/help/form/support_message.tform.php
index ce80e03..a8c0847 100644
--- a/interface/web/help/form/support_message.tform.php
+++ b/interface/web/help/form/support_message.tform.php
@@ -54,6 +54,8 @@
}
}
+$authsql = $app->tform->getAuthSQL('r', 'client');
+
//* Begin of the form definition of the first tab. The name of the tab is called "message". We refer
//* to this name in the $form["tab_default"] setting above.
$form["tabs"]['message'] = array (
@@ -69,7 +71,7 @@
'formtype' => 'SELECT',
'default' => $sm_default_recipient_id,
'datasource' => array ( 'type' => 'SQL',
- 'querystring' => "SELECT sys_user.userid, CONCAT(sys_user.username,' :: ',client.company_name,' :: ',client.contact_name) as contactname FROM sys_user, client WHERE sys_user.userid != 1 AND sys_user.client_id = client.client_id AND {AUTHSQL} ORDER BY sys_user.username",
+ 'querystring' => "SELECT sys_user.userid, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_user, client WHERE sys_user.userid != 1 AND sys_user.client_id = client.client_id AND $authsql ORDER BY sys_user.username",
'keyfield' => 'userid',
'valuefield' => 'contactname'
),
--
Gitblit v1.9.1