Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ISPConfig
ISPConfig 3
Commits
21b60042
Commit
21b60042
authored
5 years ago
by
Helmo
Browse files
Options
Downloads
Patches
Plain Diff
Show (disabled) client field on mail_domain edit
parent
60f83685
No related branches found
No related tags found
1 merge request
!1061
Show (disabled) client field on mail_domain edit for admin
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
interface/web/mail/mail_domain_edit.php
+7
-1
7 additions, 1 deletion
interface/web/mail/mail_domain_edit.php
interface/web/mail/templates/mail_domain_edit.htm
+10
-3
10 additions, 3 deletions
interface/web/mail/templates/mail_domain_edit.htm
with
17 additions
and
4 deletions
interface/web/mail/mail_domain_edit.php
+
7
−
1
View file @
21b60042
...
@@ -75,7 +75,13 @@ class page_action extends tform_actions {
...
@@ -75,7 +75,13 @@ class page_action extends tform_actions {
$app
->
uses
(
'ini_parser,getconf'
);
$app
->
uses
(
'ini_parser,getconf'
);
$settings
=
$app
->
getconf
->
get_global_config
(
'domains'
);
$settings
=
$app
->
getconf
->
get_global_config
(
'domains'
);
if
(
$_SESSION
[
"s"
][
"user"
][
"typ"
]
==
'admin'
&&
$settings
[
'use_domain_module'
]
!=
'y'
)
{
if
(
$_SESSION
[
"s"
][
"user"
][
"typ"
]
==
'admin'
&&
$settings
[
'use_domain_module'
]
==
'y'
)
{
$sql
=
"SELECT 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_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id = ?"
;
$clients
=
$app
->
db
->
queryAllRecords
(
$sql
,
$this
->
dataRecord
[
'sys_groupid'
]);
$client_select
=
'<option value="dummy">'
.
$clients
[
0
][
'contactname'
]
.
'</option>'
;
$app
->
tpl
->
setVar
(
"client_group_name"
,
$client_select
);
}
elseif
(
$_SESSION
[
"s"
][
"user"
][
"typ"
]
==
'admin'
&&
$settings
[
'use_domain_module'
]
!=
'y'
)
{
// Getting Clients of the user
// Getting Clients of the user
$sql
=
"SELECT sys_group.groupid, sys_group.name, 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_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name"
;
$sql
=
"SELECT sys_group.groupid, sys_group.name, 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_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name"
;
...
...
This diff is collapsed.
Click to expand it.
interface/web/mail/templates/mail_domain_edit.htm
+
10
−
3
View file @
21b60042
...
@@ -6,21 +6,28 @@
...
@@ -6,21 +6,28 @@
{tmpl_var name='server_id'}
{tmpl_var name='server_id'}
</select></div>
</select></div>
<input
type=
"hidden"
name=
"server_id"
value=
"{tmpl_var name='server_id_value'}"
/>
<input
type=
"hidden"
name=
"server_id"
value=
"{tmpl_var name='server_id_value'}"
/>
<tmpl_else>
<tmpl_else>
<label
for=
"server_id"
class=
"col-sm-3 control-label"
>
{tmpl_var name='server_id_txt'}
</label>
<label
for=
"server_id"
class=
"col-sm-3 control-label"
>
{tmpl_var name='server_id_txt'}
</label>
<div
class=
"col-sm-9"
><select
name=
"server_id"
id=
"server_id"
class=
"form-control"
>
<div
class=
"col-sm-9"
><select
name=
"server_id"
id=
"server_id"
class=
"form-control"
>
{tmpl_var name='server_id'}
{tmpl_var name='server_id'}
</select></div>
</select></div>
</tmpl_if>
</tmpl_if>
</div>
</div>
<tmpl_unless
name=
"domain_option"
>
<tmpl_if
name=
"domain_option"
>
<div
class=
"form-group"
>
<label
for=
"client_group_id"
class=
"col-sm-3 control-label"
>
{tmpl_var name='client_txt'}
</label>
<div
class=
"col-sm-9"
><select
name=
"server_id_disabled"
id=
"server_id_disabled"
class=
"form-control"
disabled=
"disabled"
>
{tmpl_var name='client_group_name'}
</select></div>
</div>
<tmpl_else>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"client_group_id"
class=
"col-sm-3 control-label"
>
{tmpl_var name='client_txt'}
</label>
<label
for=
"client_group_id"
class=
"col-sm-3 control-label"
>
{tmpl_var name='client_txt'}
</label>
<div
class=
"col-sm-9"
><select
name=
"client_group_id"
id=
"client_group_id"
class=
"form-control"
>
<div
class=
"col-sm-9"
><select
name=
"client_group_id"
id=
"client_group_id"
class=
"form-control"
>
{tmpl_var name='client_group_id'}
{tmpl_var name='client_group_id'}
</select></div>
</select></div>
</div>
</div>
</tmpl_
unless
>
</tmpl_
if
>
<tmpl_else>
<tmpl_else>
<tmpl_if
name=
"only_one_server"
>
<tmpl_if
name=
"only_one_server"
>
<input
type=
"hidden"
id=
"server_id"
name=
"server_id"
value=
"{tmpl_var name='server_id_value'}"
/>
<input
type=
"hidden"
id=
"server_id"
name=
"server_id"
value=
"{tmpl_var name='server_id_value'}"
/>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment