From aa370627b211a51dc46891cfa4b6e3d2ef3e52db Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Tue, 16 Jul 2013 10:45:17 -0400
Subject: [PATCH] - Fixed FS#2924 - the month will not set automatically in the autoresponder by click now Along with this fixed some display problems with the combo boxes introduced in 3.0.5. Some fields were not correctly displayed with the predefined values if value and text of the underlying option element differ.
---
interface/web/admin/server_edit.php | 37 +++++++++++++++++++++++++++++++++++--
1 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/interface/web/admin/server_edit.php b/interface/web/admin/server_edit.php
index ea8dd89..e718576 100644
--- a/interface/web/admin/server_edit.php
+++ b/interface/web/admin/server_edit.php
@@ -46,8 +46,41 @@
// Loading classes
$app->uses('tpl,tform,tform_actions');
+$app->load('tform_actions');
-// let tform_actions handle the page
-$app->tform_actions->onLoad();
+class page_action extends tform_actions {
+
+ function onShowEnd() {
+ global $app, $conf;
+
+ // Getting Servers
+ $sql = "SELECT server_id,server_name FROM server WHERE server_id != $this->id ORDER BY server_name";
+ $mirror_servers = $app->db->queryAllRecords($sql);
+ $mirror_server_select = '<option value="0">'.$app->tform->lng('- None -').'</option>';
+ if(is_array($mirror_servers)) {
+ foreach( $mirror_servers as $mirror_server) {
+ $selected = ($mirror_server["server_id"] == $this->dataRecord['mirror_server_id'])?'SELECTED':'';
+ $mirror_server_select .= "<option value='$mirror_server[server_id]' $selected>$mirror_server[server_name]</option>\r\n";
+ }
+ }
+ $app->tpl->setVar("mirror_server_id",$mirror_server_select);
+
+ parent::onShowEnd();
+ }
+
+ function onSubmit() {
+ global $app;
+
+ //* We do not want to mirror the the server itself
+ if($this->id == $this->dataRecord['mirror_server_id']) $this->dataRecord['mirror_server_id'] = 0;
+
+ parent::onSubmit();
+
+ }
+
+}
+
+$page = new page_action;
+$page->onLoad();
?>
\ No newline at end of file
--
Gitblit v1.9.1