From 5910510bafd55e5adefc1f2d2a8f58cab6c22ed0 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 24 Jun 2022 16:50:53 +0100 Subject: [PATCH] Bug 28854: (follow-up) Improve error for item not found --- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 8a4d62494d..fea66bced5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1622,6 +1622,8 @@ Note that permanent location is a code, and location may be an authval. } else { $('#addResult').replaceWith('
'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'
'); } + } else if ( data.status === 404 ) { + $('#addResult').replaceWith('
'+_("Failure: Item '%s' not found").format(barcode)+'
'); } else { $('#addResult').replaceWith('
'+_("Failure: Check the logs for details")+'
'); } @@ -1689,6 +1691,8 @@ Note that permanent location is a code, and location may be an authval. } else { $('#removeResult').replaceWith('
'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'
'); } + } else if ( data.status === 404 ) { + $('#addResult').replaceWith('
'+_("Failure: Item '%s' not found").format(barcode)+'
'); } else { $('#removeResult').replaceWith('
'+_("Failure: Check the logs for details")+'
'); } -- 2.20.1