Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
21206c45
Commit
21206c45
authored
Aug 31, 2008
by
tbrehm
Browse files
- Added the readonly attribute to tabs.
- Clients that are not resellers can not change the basic web settings anymore.
parent
f1b98990
Changes
3
Hide whitespace changes
Inline
Side-by-side
interface/lib/classes/tform.inc.php
View file @
21206c45
...
...
@@ -1024,6 +1024,14 @@ class tform {
return
$_SESSION
[
"s"
][
"form"
][
"tab"
];
}
function
isReadonlyTab
(
$tab
)
{
if
(
isset
(
$this
->
formDef
[
'tabs'
][
$tab
][
'readonly'
])
&&
$this
->
formDef
[
'tabs'
][
$tab
][
'readonly'
]
==
true
)
{
return
true
;
}
else
{
return
false
;
}
}
// translation function for forms, tries the form wordbook first and if this fails, it tries the global wordbook
function
lng
(
$msg
)
{
...
...
interface/lib/classes/tform_actions.inc.php
View file @
21206c45
...
...
@@ -168,7 +168,7 @@ class tform_actions {
function
onUpdateSave
(
$sql
)
{
global
$app
;
if
(
!
empty
(
$sql
))
{
if
(
!
empty
(
$sql
)
&&
!
$app
->
tform
->
isReadonlyTab
(
$app
->
tform
->
getCurrentTab
())
)
{
$app
->
db
->
query
(
$sql
);
if
(
$app
->
db
->
errorMessage
!=
''
)
die
(
$app
->
db
->
errorMessage
);
}
...
...
interface/web/sites/form/web_domain.tform.php
View file @
21206c45
...
...
@@ -50,10 +50,19 @@ $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update,
$form
[
"auth_preset"
][
"perm_group"
]
=
'riud'
;
//r = read, i = insert, u = update, d = delete
$form
[
"auth_preset"
][
"perm_other"
]
=
''
;
//r = read, i = insert, u = update, d = delete
// Clients may not change the website basic settings if they are not resellers
if
(
$app
->
auth
->
has_clients
(
$_SESSION
[
's'
][
'user'
][
'userid'
])
||
$app
->
auth
->
is_admin
())
{
$web_domain_edit_readonly
=
false
;
}
else
{
$web_domain_edit_readonly
=
true
;
}
$form
[
"tabs"
][
'domain'
]
=
array
(
'title'
=>
"Domain"
,
'width'
=>
100
,
'template'
=>
"templates/web_domain_edit.htm"
,
'readonly'
=>
$web_domain_edit_readonly
,
'fields'
=>
array
(
##################################
# Begin Datatable fields
...
...
@@ -188,6 +197,7 @@ $form["tabs"]['redirect'] = array (
'title'
=>
"Redirect"
,
'width'
=>
100
,
'template'
=>
"templates/web_domain_redirect.htm"
,
'readonly'
=>
false
,
'fields'
=>
array
(
##################################
# Begin Datatable fields
...
...
@@ -216,6 +226,7 @@ $form["tabs"]['ssl'] = array (
'title'
=>
"SSL"
,
'width'
=>
100
,
'template'
=>
"templates/web_domain_ssl.htm"
,
'readonly'
=>
false
,
'fields'
=>
array
(
##################################
# Begin Datatable fields
...
...
@@ -302,6 +313,7 @@ $form["tabs"]['advanced'] = array (
'title'
=>
"Options"
,
'width'
=>
100
,
'template'
=>
"templates/web_domain_advanced.htm"
,
'readonly'
=>
false
,
'fields'
=>
array
(
##################################
# Begin Datatable fields
...
...
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