Skip to content

Commit e7d1842

Browse files
committed
Removed server selector from FTP- and Shell-User forms, as the server is always identical with the server ID of the selected website.
1 parent 5ebfd81 commit e7d1842

File tree

4 files changed

+26
-18
lines changed

4 files changed

+26
-18
lines changed

interface/web/sites/ftp_user_edit.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,18 @@ function onShowNew() {
7272
parent::onShowNew();
7373
}
7474

75+
function onSubmit() {
76+
global $app, $conf;
77+
78+
// Get the record of the parent domain
79+
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval(@$this->dataRecord["parent_domain_id"]));
80+
81+
// Set a few fixed values
82+
$this->dataRecord["server_id"] = $parent_domain["server_id"];
83+
84+
parent::onSubmit();
85+
}
86+
7587
function onAfterInsert() {
7688
global $app, $conf;
7789

interface/web/sites/shell_user_edit.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,18 @@ function onShowNew() {
7272
parent::onShowNew();
7373
}
7474

75+
function onSubmit() {
76+
global $app, $conf;
77+
78+
// Get the record of the parent domain
79+
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval(@$this->dataRecord["parent_domain_id"]));
80+
81+
// Set a few fixed values
82+
$this->dataRecord["server_id"] = $parent_domain["server_id"];
83+
84+
parent::onSubmit();
85+
}
86+
7587
function onBeforeInsert() {
7688
global $app, $conf;
7789

interface/web/sites/templates/ftp_user_edit.htm

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
<table width="500" border="0" cellspacing="0" cellpadding="2">
2-
<tr>
3-
<td class="frmText11">{tmpl_var name='server_id_txt'}:</td>
4-
<td class="frmText11">
5-
<select name="server_id" class="text">
6-
{tmpl_var name='server_id'}
7-
</select>
8-
</td>
9-
</tr>
102
<tr>
113
<td class="frmText11">{tmpl_var name='parent_domain_id_txt'}:</td>
124
<td class="frmText11">

interface/web/sites/templates/shell_user_edit.htm

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
<table width="500" border="0" cellspacing="0" cellpadding="2">
2-
<tr>
3-
<td class="frmText11">{tmpl_var name='server_id_txt'}:</td>
4-
<td class="frmText11">
5-
<select name="server_id" class="text">
6-
{tmpl_var name='server_id'}
7-
</select>
8-
</td>
9-
</tr>
102
<tr>
113
<td class="frmText11">{tmpl_var name='parent_domain_id_txt'}:</td>
124
<td class="frmText11">
@@ -47,6 +39,6 @@
4739
<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>&nbsp;
4840
<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>
4941
</td>
50-
</tr>
51-
</table>
42+
</tr>
43+
</table>
5244
<input type="hidden" name="id" value="{tmpl_var name='id'}">

0 commit comments

Comments
 (0)