Skip to content

Commit f5655fd

Browse files
author
Florian Schaal
committed
extend last commit
1 parent a268a1a commit f5655fd

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

interface/web/admin/server_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ function onShowEnd() {
7272
function onSubmit() {
7373
global $app;
7474

75-
//* We do not want to mirror the the server itself
76-
if($this->id == $this->dataRecord['mirror_server_id']) $this->dataRecord['mirror_server_id'] = 0;
75+
//* We do not want to mirror the the server itself and the master can not be a mirror
76+
if($this->id == $this->dataRecord['mirror_server_id'] || $this->id == 1) $this->dataRecord['mirror_server_id'] = 0;
7777

7878
parent::onSubmit();
7979

interface/web/admin/templates/server_edit_services.htm

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ <h1><tmpl_var name="list_head_txt"></h1>
5050
{tmpl_var name='xmpp_server'}
5151
</div>
5252
</div>
53-
<div class="form-group">
54-
<label for="mirror_server_id" class="col-sm-3 control-label">{tmpl_var name='mirror_server_id_txt'}</label>
55-
<div class="col-sm-9"><select name="mirror_server_id" id="server_id" class="form-control">
56-
{tmpl_var name='mirror_server_id'}
57-
</select></div>
58-
</div>
53+
<tmpl_if name="id" op="!=" value="1">
54+
<div class="form-group">
55+
<label for="mirror_server_id" class="col-sm-3 control-label">{tmpl_var name='mirror_server_id_txt'}</label>
56+
<div class="col-sm-9"><select name="mirror_server_id" id="server_id" class="form-control">
57+
{tmpl_var name='mirror_server_id'}
58+
</select></div>
59+
</div>
60+
</tmpl_if>
5961
<div class="form-group">
6062
<label for="active" class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
6163
<div class="col-sm-9"><select name="active" id="active" class="form-control">
@@ -69,4 +71,4 @@ <h1><tmpl_var name="list_head_txt"></h1>
6971
<div class="clear"><div class="right">
7072
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_edit.php">{tmpl_var name='btn_save_txt'}</button>
7173
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_list.php">{tmpl_var name='btn_cancel_txt'}</button>
72-
</div></div>
74+
</div></div>

0 commit comments

Comments
 (0)