diff --git a/interface/web/sites/ftp_user_edit.php b/interface/web/sites/ftp_user_edit.php index ecfeb4a6edd7b59ca717f1b17797cdccb1f5d1d5..31bf0aa8a4a654651c71b2f6e2972a3aee6e6a1b 100644 --- a/interface/web/sites/ftp_user_edit.php +++ b/interface/web/sites/ftp_user_edit.php @@ -72,6 +72,18 @@ class page_action extends tform_actions { parent::onShowNew(); } + function onSubmit() { + global $app, $conf; + + // Get the record of the parent domain + $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval(@$this->dataRecord["parent_domain_id"])); + + // Set a few fixed values + $this->dataRecord["server_id"] = $parent_domain["server_id"]; + + parent::onSubmit(); + } + function onAfterInsert() { global $app, $conf; diff --git a/interface/web/sites/shell_user_edit.php b/interface/web/sites/shell_user_edit.php index 299d1b0e6b1f64210ef58d4fb78d913dce1561d1..d6f52fcaf4f15d1fc4bae960a0ba67bda5312f32 100644 --- a/interface/web/sites/shell_user_edit.php +++ b/interface/web/sites/shell_user_edit.php @@ -72,6 +72,18 @@ class page_action extends tform_actions { parent::onShowNew(); } + function onSubmit() { + global $app, $conf; + + // Get the record of the parent domain + $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval(@$this->dataRecord["parent_domain_id"])); + + // Set a few fixed values + $this->dataRecord["server_id"] = $parent_domain["server_id"]; + + parent::onSubmit(); + } + function onBeforeInsert() { global $app, $conf; diff --git a/interface/web/sites/templates/ftp_user_edit.htm b/interface/web/sites/templates/ftp_user_edit.htm index 894a0d1e5c6881b3d2443f3fe32bc2a3b5e6ff82..f06e845f604dc97021b9e086caafd0746f531ef1 100644 --- a/interface/web/sites/templates/ftp_user_edit.htm +++ b/interface/web/sites/templates/ftp_user_edit.htm @@ -1,12 +1,4 @@ <table width="500" border="0" cellspacing="0" cellpadding="2"> - <tr> - <td class="frmText11">{tmpl_var name='server_id_txt'}:</td> - <td class="frmText11"> - <select name="server_id" class="text"> - {tmpl_var name='server_id'} - </select> - </td> - </tr> <tr> <td class="frmText11">{tmpl_var name='parent_domain_id_txt'}:</td> <td class="frmText11"> diff --git a/interface/web/sites/templates/shell_user_edit.htm b/interface/web/sites/templates/shell_user_edit.htm index 5960efc21efaa17ff8afeae505b2a85268968c9b..784d419d51d4281a77e7ea47a16dd35bd3b6f0b4 100644 --- a/interface/web/sites/templates/shell_user_edit.htm +++ b/interface/web/sites/templates/shell_user_edit.htm @@ -1,12 +1,4 @@ <table width="500" border="0" cellspacing="0" cellpadding="2"> - <tr> - <td class="frmText11">{tmpl_var name='server_id_txt'}:</td> - <td class="frmText11"> - <select name="server_id" class="text"> - {tmpl_var name='server_id'} - </select> - </td> - </tr> <tr> <td class="frmText11">{tmpl_var name='parent_domain_id_txt'}:</td> <td class="frmText11"> @@ -47,6 +39,6 @@ <td><input name="btn_save" type="button" class="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','sites/shell_user_edit.php');"><div class="buttonEnding"></div> <input name="btn_cancel" type="button" class="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('sites/shell_user_list.php');"><div class="buttonEnding"></div> </td> - </tr> -</table> + </tr> +</table> <input type="hidden" name="id" value="{tmpl_var name='id'}"> \ No newline at end of file