From d04ec1ffdc36f81a071d08d00a825f63f64368dd Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 19 Nov 2024 15:07:43 +0000 Subject: [PATCH] Bug 35604: Display success message Consider success message from backend and present it. Add btn-primary class to auto ILL screen Sponsored-by: NHS England Sponsored-by: PTFS Europe Ltd Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 2 +- koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt index 2d372228e05..34ba28acc14 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -881,7 +881,7 @@ - + Cancel diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js b/koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js index a57871de836..cfbfa1762a2 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js +++ b/koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js @@ -24,7 +24,7 @@ $(document).ready(function () { auto_backend.available = 0; }, success: function (data) { - _addSuccessMessage(auto_backend.name); + _addSuccessMessage(auto_backend.name, data); auto_backend.available = 1; }, error: function (request, textstatus) { @@ -84,11 +84,13 @@ $(document).ready(function () { _addBackendOption("Standard"); } - function _addSuccessMessage(auto_backend_name) { + function _addSuccessMessage(auto_backend_name, data) { _removeVerifyingMessage(auto_backend_name); $(auto_ill_el + " > #backend-" + auto_backend_name).append( ' ' + __("Available.").format(auto_backend_name) + + " " + + data.success + "" ); } -- 2.49.0