From 1a1b12b9b179a4776fb38e8005d1ee170a379a9b Mon Sep 17 00:00:00 2001 From: Herman van Rink <rink@initfour.nl> Date: Sun, 12 Jun 2022 17:33:50 +0200 Subject: [PATCH] Squashed commit of the following: 6334-show-name-to-delete commit 46c7e58ae9b761ddc278b05fb1e375d9d54acf4a Author: Herman van Rink <rink@initfour.nl> Date: Sat Apr 23 13:39:55 2022 +0200 Show the client name on the delete confirmation page --- interface/web/client/client_del.php | 5 +++++ interface/web/client/templates/client_del.htm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/interface/web/client/client_del.php b/interface/web/client/client_del.php index a287498981..e681b2444e 100644 --- a/interface/web/client/client_del.php +++ b/interface/web/client/client_del.php @@ -110,6 +110,11 @@ class page_action extends tform_actions { $table_list = array(); $client_group_id = $app->functions->intval($client_group['groupid']); if($client_group_id > 1) { + + $client = $app->db->queryOneRecord("SELECT CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); + + $app->tpl->setVar('contactname', $client['contactname']); + foreach($this->tables as $table => $field) { if($table != '') { $records = $app->db->queryAllRecords("SELECT * FROM ?? WHERE sys_groupid = ?", $table, $client_group_id); diff --git a/interface/web/client/templates/client_del.htm b/interface/web/client/templates/client_del.htm index 5e7201ce5c..3fbd16643a 100644 --- a/interface/web/client/templates/client_del.htm +++ b/interface/web/client/templates/client_del.htm @@ -1,4 +1,4 @@ -<div class='page-header'><h1><tmpl_var name="list_head_txt"></h1></div> +<div class='page-header'><h1><tmpl_var name="list_head_txt"> <tmpl_var name="contactname"></h1></div> <tmpl_if name='number_records'> <tmpl_var name="delete_explanation">:<br /><br /> <div class="table-wrapper marginTop15"> -- GitLab