From 77eeb090ba794485cd0d1865b4d62c97288120e1 Mon Sep 17 00:00:00 2001 From: vogelor Date: Wed, 26 May 2010 11:12:55 +0000 Subject: [PATCH] Improvement of the domain - module : The group, the domain belongs to is also listed --- interface/web/domain/domain_edit.php | 2 +- interface/web/domain/list/domain.list.php | 17 ++++++++++++++++- interface/web/domain/templates/domain_list.htm | 5 ++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/interface/web/domain/domain_edit.php b/interface/web/domain/domain_edit.php index 8e6e638419..cc9780640c 100644 --- a/interface/web/domain/domain_edit.php +++ b/interface/web/domain/domain_edit.php @@ -108,7 +108,7 @@ class page_action extends tform_actions { if(isset($this->dataRecord['client_group_id']) && $this->dataRecord['client_group_id'] == 0) { $app->tform->errorMessage .= $wb['error_client_group_id_empty']; } - //* make sure that the email domain is lowercase + //* make sure that the domain is lowercase if(isset($this->dataRecord["domain"])) $this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]); } else { diff --git a/interface/web/domain/list/domain.list.php b/interface/web/domain/list/domain.list.php index bd96addf21..e9630e388a 100644 --- a/interface/web/domain/list/domain.list.php +++ b/interface/web/domain/list/domain.list.php @@ -76,9 +76,24 @@ $liste["auth"] = "yes"; $liste["item"][] = array( 'field' => "domain", 'datatype' => "VARCHAR", 'formtype' => "TEXT", - 'op' => "like", + 'op' => "LIKE", 'prefix' => "%", 'suffix' => "%", 'width' => "", 'value' => ""); + +$liste["item"][] = array( 'field' => "sys_groupid", + 'datatype' => "VARCHAR", + 'formtype' => "SELECT", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => 'SELECT a.groupid, a.name FROM sys_group a, domain b WHERE (a.groupid = b.sys_groupid) AND ({AUTHSQL-B}) ORDER BY name', + 'keyfield'=> 'groupid', + 'valuefield'=> 'name' + ), + 'width' => "", + 'value' => ""); + ?> \ No newline at end of file diff --git a/interface/web/domain/templates/domain_list.htm b/interface/web/domain/templates/domain_list.htm index b8533840ef..1e0bd11ede 100644 --- a/interface/web/domain/templates/domain_list.htm +++ b/interface/web/domain/templates/domain_list.htm @@ -25,17 +25,20 @@ +   -
+ +
{tmpl_var name="domain"} + {tmpl_var name="sys_groupid"}
-- GitLab