diff --git a/setup/frames/index.inc.php b/setup/frames/index.inc.php
index 6d8db1a48c..f3c369b481 100644
--- a/setup/frames/index.inc.php
+++ b/setup/frames/index.inc.php
@@ -156,8 +156,9 @@ if ($cf->getServerCount() > 0) {
echo ''
, __('Edit') , '';
echo ' | ';
- echo ''
- , __('Delete') , '';
+ echo '';
+ echo __('Delete') . '';
echo '';
echo '';
echo '';
diff --git a/setup/frames/servers.inc.php b/setup/frames/servers.inc.php
index 1cb690a077..74ed7b5674 100644
--- a/setup/frames/servers.inc.php
+++ b/setup/frames/servers.inc.php
@@ -27,7 +27,7 @@ if ($mode == 'edit' && $server_exists) {
$page_title = __('Edit server')
. ' ' . $id
. ' (' . htmlspecialchars($cf->getServerDSN($id)) . ')';
-} elseif ($mode == 'remove' && $server_exists) {
+} elseif ($mode == 'remove' && $server_exists && $_SERVER['REQUEST_METHOD'] == 'POST') {
$cf->removeServer($id);
header('Location: index.php' . Url::getCommonRaw());
exit;
diff --git a/setup/scripts.js b/setup/scripts.js
index 09f4baa5f0..6a2f5b99c2 100644
--- a/setup/scripts.js
+++ b/setup/scripts.js
@@ -216,3 +216,13 @@ $(function () {
//
// END: User preferences allow/disallow UI
// ------------------------------------------------------------------
+
+$(function () {
+ $('.delete-server').on('click', function (e) {
+ e.preventDefault();
+ var $this = $(this);
+ $.post($this.attr('href'), $this.attr('data-post'), function () {
+ window.location.replace('index.php');
+ });
+ });
+});