Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Zvonimir
ISPConfig 3
Commits
554c4035
Commit
554c4035
authored
Jan 11, 2014
by
Till Brehm
Browse files
- Added option to allow resellers to add domains in the domain limits (domain module).
- Added section toggle for client limits
parent
94c9617e
Changes
13
Hide whitespace changes
Inline
Side-by-side
install/sql/incremental/upd_0063.sql
0 → 100644
View file @
554c4035
ALTER
TABLE
`client`
ADD
`limit_domainmodule`
INT
NOT
NULL
DEFAULT
'0'
;
ALTER
TABLE
`client_template`
ADD
`limit_domainmodule`
INT
NOT
NULL
DEFAULT
'0'
;
install/sql/ispconfig3.sql
View file @
554c4035
...
...
@@ -215,6 +215,7 @@ CREATE TABLE `client` (
`limit_cron_frequency`
int
(
11
)
NOT
NULL
DEFAULT
'5'
,
`limit_traffic_quota`
int
(
11
)
NOT
NULL
DEFAULT
'-1'
,
`limit_client`
int
(
11
)
NOT
NULL
DEFAULT
'0'
,
`limit_domainmodule`
int
(
11
)
NOT
NULL
DEFAULT
'0'
,
`limit_mailmailinglist`
int
(
11
)
NOT
NULL
DEFAULT
'-1'
,
`limit_openvz_vm`
int
(
11
)
NOT
NULL
DEFAULT
'0'
,
`limit_openvz_vm_template_id`
int
(
11
)
NOT
NULL
DEFAULT
'0'
,
...
...
@@ -317,6 +318,7 @@ CREATE TABLE `client_template` (
`limit_cron_frequency`
int
(
11
)
NOT
NULL
default
'5'
,
`limit_traffic_quota`
int
(
11
)
NOT
NULL
default
'-1'
,
`limit_client`
int
(
11
)
NOT
NULL
default
'0'
,
`limit_domainmodule`
int
(
11
)
NOT
NULL
DEFAULT
'0'
,
`limit_mailmailinglist`
int
(
11
)
NOT
NULL
default
'-1'
,
`limit_openvz_vm`
int
(
11
)
NOT
NULL
DEFAULT
'0'
,
`limit_openvz_vm_template_id`
int
(
11
)
NOT
NULL
DEFAULT
'0'
,
...
...
interface/web/client/client_template_edit.php
View file @
554c4035
...
...
@@ -55,9 +55,10 @@ class page_action extends tform_actions {
function
onSubmit
()
{
global
$app
;
//* Resellers shall not be able to create another reseller
//* Resellers shall not be able to create another reseller
or set reseller specific settings
if
(
$_SESSION
[
"s"
][
"user"
][
"typ"
]
==
'user'
)
{
$this
->
dataRecord
[
'limit_client'
]
=
0
;
$this
->
dataRecord
[
'limit_domainmodule'
]
=
0
;
}
parent
::
onSubmit
();
...
...
interface/web/client/domain_edit.php
View file @
554c4035
...
...
@@ -52,6 +52,15 @@ $app->load('tform_actions');
$lng_file
=
'lib/lang/'
.
$_SESSION
[
's'
][
'language'
]
.
'.lng'
;
include
$lng_file
;
if
(
!
$app
->
tform
->
checkClientLimit
(
'limit_domainmodule'
))
{
$app
->
uses
(
'ini_parser,getconf'
);
$settings
=
$app
->
getconf
->
get_global_config
(
'domains'
);
if
(
$settings
[
'use_domain_module'
]
==
'y'
)
{
$app
->
error
(
$settings
[
'new_domain_html'
]);
}
}
class
page_action
extends
tform_actions
{
function
onShowNew
()
{
...
...
interface/web/client/form/reseller.tform.php
View file @
554c4035
...
...
@@ -1130,6 +1130,20 @@ $form["tabs"]['limits'] = array (
'width'
=>
'30'
,
'maxlength'
=>
'255'
),
'limit_domainmodule'
=>
array
(
'datatype'
=>
'INTEGER'
,
'formtype'
=>
'TEXT'
,
'validators'
=>
array
(
0
=>
array
(
'type'
=>
'ISINT'
,
'errmsg'
=>
'limit_domainmodule_error_notint'
),
),
'default'
=>
'0'
,
'value'
=>
''
,
'separator'
=>
''
,
'width'
=>
'10'
,
'maxlength'
=>
'10'
,
'rows'
=>
''
,
'cols'
=>
''
),
//#################################
// END Datatable fields
//#################################
...
...
interface/web/client/lib/lang/en_client_template.lng
View file @
554c4035
...
...
@@ -88,4 +88,6 @@ $wb["virtualization_limits_txt"] = 'Virtualization Limits';
$wb
[
'aps_limits_txt'
]
=
'APS Installer Limits'
;
$wb
[
'limit_aps_txt'
]
=
'Max. number of APS instances'
;
$wb
[
'limit_aps_error_notint'
]
=
'The APS instances limit must be a number.'
;
$wb
[
'limit_domainmodule_txt'
]
=
'Domainmodule Limit'
;
$wb
[
'client_limits_txt'
]
=
'Client Limits'
?>
\ No newline at end of file
interface/web/client/lib/lang/en_client_template_list.lng
View file @
554c4035
<?php
$wb
[
"list_head_txt"
]
=
'Client
-
Templates'
;
$wb
[
"list_head_txt"
]
=
'Client
and Reseller
Templates'
;
$wb
[
"template_type_txt"
]
=
'Type'
;
$wb
[
"template_name_txt"
]
=
'Template name'
;
$wb
[
'template_id_txt'
]
=
'Template ID'
;
...
...
interface/web/client/lib/lang/en_reseller.lng
View file @
554c4035
...
...
@@ -156,4 +156,8 @@ $wb['customer_no_start_txt'] = 'Customer No. start value';
$wb
[
'customer_no_counter_txt'
]
=
'Customer No. counter'
;
$wb
[
'added_by_txt'
]
=
'Added by'
;
$wb
[
'added_date_txt'
]
=
'Added date'
;
$wb
[
'limit_domainmodule_error_notint'
]
=
'Domainmodule limit must be a number.'
;
$wb
[
'limit_domainmodule_txt'
]
=
'Domainmodule Limit'
;
$wb
[
'client_limits_txt'
]
=
'Client Limits'
;
$wb
[
'err_msg_master_tpl_set'
]
=
'All custom limit settings are ignored if any master template other than "custom" is selected.'
;
?>
interface/web/client/lib/module.conf.php
View file @
554c4035
...
...
@@ -17,13 +17,6 @@ $items[] = array( 'title' => "Add Client",
'link'
=>
'client/client_edit.php'
,
'html_id'
=>
'client_add'
);
if
(
$_SESSION
[
"s"
][
"user"
][
"typ"
]
==
'admin'
){
$items
[]
=
array
(
'title'
=>
"Edit Client-Templates"
,
'target'
=>
'content'
,
'link'
=>
'client/client_template_list.php'
,
'html_id'
=>
'client_template_list'
);
}
$module
[
"nav"
][]
=
array
(
'title'
=>
'Clients'
,
'open'
=>
1
,
'items'
=>
$items
);
...
...
@@ -66,11 +59,11 @@ $module["nav"][] = array( 'title' => 'Messaging',
unset
(
$items
);
//if($_SESSION["s"]["user"]["typ"] == 'admin'){
$items
[]
=
array
(
'title'
=>
"Limit-Templates"
,
'target'
=>
'content'
,
'link'
=>
'client/client_template_list.php'
,
'html_id'
=>
'client_template_list'
);
$items
[]
=
array
(
'title'
=>
"Limit-Templates"
,
'target'
=>
'content'
,
'link'
=>
'client/client_template_list.php'
,
'html_id'
=>
'client_template_list'
);
$module
[
"nav"
][]
=
array
(
'title'
=>
'Templates'
,
...
...
@@ -78,7 +71,6 @@ $module["nav"][] = array( 'title' => 'Templates',
'items'
=>
$items
);
unset
(
$items
);
//}
$app
->
uses
(
'ini_parser,getconf'
);
...
...
interface/web/client/templates/client_edit_limits.htm
View file @
554c4035
...
...
@@ -313,7 +313,7 @@ jQuery('div.panel_client')
.
find
(
'
div.pnl_formsarea
'
)
.
find
(
'
fieldset
'
)
.
find
(
'
input,select,button
'
)
.
not
(
'
#template_master,#template_additional,#default_mailserver,#default_webserver,#default_dbserver,#default_dnsserver,#default_slave_dnsserver
'
)
.
not
(
'
#template_master,#template_additional,#default_mailserver,#default_webserver,#default_dbserver,#default_dnsserver,#default_slave_dnsserver
,#customer_no_template,#customer_no_start,#customer_no_counter
'
)
.
click
(
function
(
e
)
{
if
(
custom_template_selected
())
return
true
;
e
.
preventDefault
();
...
...
interface/web/client/templates/client_template_edit_limits.htm
View file @
554c4035
...
...
@@ -5,12 +5,6 @@
<div
class=
"pnl_formsarea"
>
<fieldset
class=
"inlineLabels"
><legend>
Limits
</legend>
<tmpl_if
name=
"is_admin"
>
<div
class=
"ctrlHolder"
>
<label
for=
"limit_client"
>
{tmpl_var name='limit_client_txt'}
</label>
<input
name=
"limit_client"
id=
"limit_client"
value=
"{tmpl_var name='limit_client'}"
size=
"10"
maxlength=
"10"
type=
"text"
class=
"textInput formLengthLimit"
/>
</div>
</tmpl_if>
<div
class=
"subsectiontoggle"
><span
class=
"showing"
></span>
{tmpl_var name='web_limits_txt'}
<em
class=
"showing"
></em></div>
<div>
<div
class=
"ctrlHolder"
>
...
...
@@ -230,6 +224,19 @@
<input
name=
"limit_aps"
id=
"limit_aps"
value=
"{tmpl_var name='limit_aps'}"
size=
"10"
maxlength=
"10"
type=
"text"
class=
"textInput formLengthLimit"
/>
</div>
</div>
<tmpl_if
name=
"is_admin"
>
<div
class=
"subsectiontoggle"
><span></span>
{tmpl_var name='client_limits_txt'}
<em></em></div>
<div
style=
"display:none;"
>
<div
class=
"ctrlHolder"
>
<label
for=
"limit_client"
>
{tmpl_var name='limit_client_txt'}
</label>
<input
name=
"limit_client"
id=
"limit_client"
value=
"{tmpl_var name='limit_client'}"
size=
"10"
maxlength=
"10"
type=
"text"
class=
"textInput formLengthLimit"
/>
</div>
<div
class=
"ctrlHolder"
>
<label
for=
"limit_domainmodule"
>
{tmpl_var name='limit_domainmodule_txt'}
</label>
<input
name=
"limit_domainmodule"
id=
"limit_domainmodule"
value=
"{tmpl_var name='limit_domainmodule'}"
size=
"10"
maxlength=
"10"
type=
"text"
class=
"textInput formLengthLimit"
/>
</div>
</div>
</tmpl_if>
</fieldset>
<input
type=
"hidden"
name=
"id"
value=
"{tmpl_var name='id'}"
>
...
...
interface/web/client/templates/domain_list.htm
View file @
554c4035
...
...
@@ -6,15 +6,9 @@
<div
class=
"pnl_toolsarea"
>
<fieldset><legend>
{tmpl_var name="toolsarea_head_txt"}
</legend>
<div
class=
"buttons"
>
<tmpl_if
name=
"is_admin"
>
<button
class=
"button iconstxt icoAdd"
type=
"button"
onclick=
"loadContent('client/domain_edit.php');"
>
<span>
{tmpl_var name="add_new_record_txt"}
</span>
</button>
<tmpl_else>
<button
class=
"button iconstxt icoAdd"
type=
"button"
onclick=
"loadContent('client/domain_new_client.php');"
>
<span>
{tmpl_var name="add_new_record_txt"}
</span>
</button>
</tmpl_if>
</div>
</fieldset>
</div>
...
...
interface/web/client/templates/reseller_edit_limits.htm
View file @
554c4035
...
...
@@ -41,10 +41,6 @@
</div>
</tmpl_if>
<div
class=
"ctrlHolder"
>
<label
for=
"limit_client"
>
{tmpl_var name='limit_client_txt'}
</label>
<input
name=
"limit_client"
id=
"limit_client"
value=
"{tmpl_var name='limit_client'}"
size=
"10"
maxlength=
"10"
type=
"text"
class=
"textInput formLengthLimit"
/>
</div>
<div
class=
"ctrlHolder"
>
<label
for=
"customer_no_template"
>
{tmpl_var name='customer_no_template_txt'}
</label>
<input
name=
"customer_no_template"
id=
"customer_no_template"
value=
"{tmpl_var name='customer_no_template'}"
size=
"30"
maxlength=
"255"
type=
"text"
class=
"textInput formLengthHalf"
/>
...
...
@@ -306,6 +302,17 @@
<input
name=
"limit_aps"
id=
"limit_aps"
value=
"{tmpl_var name='limit_aps'}"
size=
"10"
maxlength=
"10"
type=
"text"
class=
"textInput formLengthLimit"
/>
</div>
</div>
<div
class=
"subsectiontoggle"
><span></span>
{tmpl_var name='client_limits_txt'}
<em></em></div>
<div
style=
"display:none;"
>
<div
class=
"ctrlHolder"
>
<label
for=
"limit_client"
>
{tmpl_var name='limit_client_txt'}
</label>
<input
name=
"limit_client"
id=
"limit_client"
value=
"{tmpl_var name='limit_client'}"
size=
"10"
maxlength=
"10"
type=
"text"
class=
"textInput formLengthLimit"
/>
</div>
<div
class=
"ctrlHolder"
>
<label
for=
"limit_domainmodule"
>
{tmpl_var name='limit_domainmodule_txt'}
</label>
<input
name=
"limit_domainmodule"
id=
"limit_domainmodule"
value=
"{tmpl_var name='limit_domainmodule'}"
size=
"10"
maxlength=
"10"
type=
"text"
class=
"textInput formLengthLimit"
/>
</div>
</div>
</fieldset>
<input
type=
"hidden"
name=
"id"
value=
"{tmpl_var name='id'}"
>
...
...
@@ -333,7 +340,7 @@ jQuery('div.panel_client')
.
find
(
'
div.pnl_formsarea
'
)
.
find
(
'
fieldset
'
)
.
find
(
'
input,select,button
'
)
.
not
(
'
#template_master,#template_additional,#default_mailserver,#default_webserver,#default_dbserver,#default_dnsserver,#default_slave_dnsserver
'
)
.
not
(
'
#template_master,#template_additional,#default_mailserver,#default_webserver,#default_dbserver,#default_dnsserver,#default_slave_dnsserver
,#customer_no_template,#customer_no_start,#customer_no_counter
'
)
.
click
(
function
(
e
)
{
if
(
custom_template_selected
())
return
true
;
e
.
preventDefault
();
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment