Skip to content

Commit 5694981

Browse files
committed
disable the possibility to change the site of a existing shell user.
1 parent 0f76ebb commit 5694981

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

interface/web/sites/shell_user_edit.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ function onShowEnd() {
9393
} else {
9494
$app->tpl->setVar("username_prefix", $shelluser_prefix);
9595
}
96+
97+
if($this->id > 0) {
98+
//* we are editing a existing record
99+
$app->tpl->setVar("parent_domain_id_disabled", 'disabled="disabled"');
100+
} else {
101+
$app->tpl->setVar("parent_domain_id_disabled", '');
102+
}
96103

97104
parent::onShowEnd();
98105
}

interface/web/sites/templates/shell_user_edit.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h2><tmpl_var name="list_head_txt"></h2>
66
<fieldset id="wf_area_shell_user"><legend>Shell User</legend>
77
<span class="wf_oneField">
88
<label for="parent_domain_id" class="wf_preField">{tmpl_var name='parent_domain_id_txt'}</label>
9-
<select id="parent_domain_id" name="parent_domain_id">{tmpl_var name='parent_domain_id'}</select>
9+
<select id="parent_domain_id" name="parent_domain_id" {tmpl_var name='parent_domain_id_disabled'}>{tmpl_var name='parent_domain_id'}</select>
1010
</span>
1111
<span class="wf_oneField">
1212
<label for="username" class="wf_preField">{tmpl_var name='username_txt'}</label>

0 commit comments

Comments
 (0)