Skip to content

Commit 8de24d4

Browse files
committed
Fixes #4146
1 parent 3c8467b commit 8de24d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interface/web/client/domain_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ function onShowEnd() {
8585
$clients = $app->db->queryAllRecords($sql);
8686
$client_select = '';
8787
if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>";
88-
$tmp_data_record = $app->tform->getDataRecord($this->id);
88+
if($this->id > 0) $tmp_data_record = $app->tform->getDataRecord($this->id); else $tmp_data_record = $this->dataRecord;
8989
if(is_array($clients)) {
9090
foreach( $clients as $client) {
91-
$selected = ($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':'';
91+
$selected = ($client["groupid"] == $tmp_data_record["sys_groupid"] || $client["groupid"] == $tmp_data_record["client_group_id"])?'SELECTED':'';
9292
$client_select .= "<option value='$client[groupid]' $selected>$client[contactname]</option>\r\n";
9393
}
9494
}

0 commit comments

Comments
 (0)