From 56949815c692b8ba1da6b03091d0ccb023d0c61e Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Thu, 05 Mar 2009 10:46:46 -0500 Subject: [PATCH] disable the possibility to change the site of a existing shell user. --- interface/web/sites/shell_user_edit.php | 7 +++++++ interface/web/sites/templates/shell_user_edit.htm | 2 +- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/interface/web/sites/shell_user_edit.php b/interface/web/sites/shell_user_edit.php index d288baa..e2613cb 100644 --- a/interface/web/sites/shell_user_edit.php +++ b/interface/web/sites/shell_user_edit.php @@ -93,6 +93,13 @@ } else { $app->tpl->setVar("username_prefix", $shelluser_prefix); } + + if($this->id > 0) { + //* we are editing a existing record + $app->tpl->setVar("parent_domain_id_disabled", 'disabled="disabled"'); + } else { + $app->tpl->setVar("parent_domain_id_disabled", ''); + } parent::onShowEnd(); } diff --git a/interface/web/sites/templates/shell_user_edit.htm b/interface/web/sites/templates/shell_user_edit.htm index e252638..a6f5c3a 100644 --- a/interface/web/sites/templates/shell_user_edit.htm +++ b/interface/web/sites/templates/shell_user_edit.htm @@ -6,7 +6,7 @@ <fieldset id="wf_area_shell_user"><legend>Shell User</legend> <span class="wf_oneField"> <label for="parent_domain_id" class="wf_preField">{tmpl_var name='parent_domain_id_txt'}</label> - <select id="parent_domain_id" name="parent_domain_id">{tmpl_var name='parent_domain_id'}</select> + <select id="parent_domain_id" name="parent_domain_id" {tmpl_var name='parent_domain_id_disabled'}>{tmpl_var name='parent_domain_id'}</select> </span> <span class="wf_oneField"> <label for="username" class="wf_preField">{tmpl_var name='username_txt'}</label> -- Gitblit v1.9.1