From 5327a82685bab4dbf96c348c0bf00b0cb7b45fa1 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Wed, 30 Oct 2024 17:03:42 +0200 Subject: [PATCH] Cleans up platform delete --- app/pages/config.php | 4 ++-- ...{config-delete-platform.php => config-platform-delete.php} | 2 +- app/templates/config-platform-edit.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename app/templates/{config-delete-platform.php => config-platform-delete.php} (94%) diff --git a/app/pages/config.php b/app/pages/config.php index 2142cbc..14142a9 100644 --- a/app/pages/config.php +++ b/app/pages/config.php @@ -113,6 +113,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { case 'platform': if (isset($action) && $action === 'edit') { include '../app/templates/config-platform-edit.php'; + } elseif (isset($action) && $action === 'delete') { + include '../app/templates/config-platform-delete.php'; } else { if ($userObject->hasRight($user_id, 'view config file')) { include '../app/templates/config-platform.php'; @@ -170,8 +172,6 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (isset($_GET['agent'])) { $agentDetails = $agentObject->getAgentDetails($platform_id, $agent); include '../app/templates/config-delete-agent.php'; - } else { - include '../app/templates/config-delete-platform.php'; } break; } diff --git a/app/templates/config-delete-platform.php b/app/templates/config-platform-delete.php similarity index 94% rename from app/templates/config-delete-platform.php rename to app/templates/config-platform-delete.php index a00de9b..d672041 100644 --- a/app/templates/config-delete-platform.php +++ b/app/templates/config-platform-delete.php @@ -24,7 +24,7 @@ foreach ($platformDetails[0] as $key => $value) {

Are you sure you want to delete this platform?


- Cancel + Cancel diff --git a/app/templates/config-platform-edit.php b/app/templates/config-platform-edit.php index 68cd81a..10f8054 100644 --- a/app/templates/config-platform-edit.php +++ b/app/templates/config-platform-edit.php @@ -28,7 +28,7 @@ foreach ($platformDetails[0] as $key => $value) {
- Cancel + Cancel