From 77eeb090ba794485cd0d1865b4d62c97288120e1 Mon Sep 17 00:00:00 2001 From: vogelor <vogelor@ispconfig3> Date: Wed, 26 May 2010 07:12:55 -0400 Subject: [PATCH] Improvement of the domain - module : The group, the domain belongs to is also listed --- interface/web/domain/templates/domain_list.htm | 5 ++++- interface/web/domain/list/domain.list.php | 17 ++++++++++++++++- interface/web/domain/domain_edit.php | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/interface/web/domain/domain_edit.php b/interface/web/domain/domain_edit.php index 8e6e638..cc97806 100644 --- a/interface/web/domain/domain_edit.php +++ b/interface/web/domain/domain_edit.php @@ -108,7 +108,7 @@ 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 bd96add..e9630e3 100644 --- a/interface/web/domain/list/domain.list.php +++ b/interface/web/domain/list/domain.list.php @@ -76,9 +76,24 @@ $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 b853384..1e0bd11 100644 --- a/interface/web/domain/templates/domain_list.htm +++ b/interface/web/domain/templates/domain_list.htm @@ -25,17 +25,20 @@ <thead> <tr> <th class="tbl_col_domain" scope="col"><tmpl_var name="domain_txt"></th> + <th class="tbl_col_domain" scope="col"><tmpl_var name="user_txt"></th> <th class="tbl_col_buttons" scope="col"> </th> </tr> <tr> <td class="tbl_col_domain"><input type="text" name="search_domain" value="{tmpl_var name='search_domain'}" /></td> - <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','domain/domain_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td> + <td class="tbl_col_user"><select name="search_sys_groupid" onChange="submitForm('pageForm','domain/domain_list.php');">{tmpl_var name='search_sys_groupid'}</select></td> + <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name='filter_txt'}" onClick="submitForm('pageForm','domain/domain_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td> </tr> </thead> <tbody> <tmpl_loop name="records"> <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> <td class="tbl_col_domain"><a href="#" onClick="loadContent('domain/domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="domain"}</a></td> + <td class="tbl_col_domain"><a href="#" onClick="loadContent('domain/domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="sys_groupid"}</a></td> <td class="tbl_col_buttons"> <tmpl_if name="is_admin"> <div class="buttons icons16"> -- Gitblit v1.9.1