From eb512c4c1b50c58add694d88ac7c51c6af24dc92 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Sun, 26 Jan 2025 18:18:43 +0200 Subject: [PATCH] Adds js messages to settings page --- app/templates/config.php | 2 +- app/templates/settings.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/templates/config.php b/app/templates/config.php index 5a0ed2a..4c83218 100644 --- a/app/templates/config.php +++ b/app/templates/config.php @@ -152,7 +152,7 @@ $(function() { success: function(response) { // Show message first if (response.messageData) { - JsMessages.show(response.messageData); + JsMessages.success(response.messageData['message']); } // Only update UI if save was successful diff --git a/app/templates/settings.php b/app/templates/settings.php index e4dc248..b2cb12c 100644 --- a/app/templates/settings.php +++ b/app/templates/settings.php @@ -691,6 +691,7 @@ $(function() { }) .then(data => { if (data.success) { + JsMessages.success('Successfully edited the platform.'); // Update view mode with new values platformTable.find('.edit-mode input').each(function() { const value = $(this).val(); @@ -852,6 +853,7 @@ $(function() { }) .then(data => { if (data.success) { + JsMessages.success('Successfully edited the host.'); // Update view mode with new values const name = card.find('input[name="name"]').val() || card.find('input[name="address"]').val(); const address = card.find('input[name="address"]').val(); @@ -985,6 +987,7 @@ $(function() { }) .then(data => { if (data.success) { + JsMessages.success('Successfully edited the agent.'); // Update view mode with new values const type = row.find('select[name="agent_type_id"] option:selected').text(); const url = row.find('input[name="url"]').val();