From ba57a9aa58c4588c603d6ffb7613271b3f662a6c Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 27 Jun 2023 12:03:58 +0100 Subject: [PATCH] Bug 33817: (follow-up) Fix spec and messages This patch should resolve the issues highlighted at signoff time by Victor. Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 34b704fb0b9da3d279c4169920d39b286d17fb39) Signed-off-by: Martin Renvoize --- api/v1/swagger/paths/items.yaml | 4 ++++ koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/api/v1/swagger/paths/items.yaml b/api/v1/swagger/paths/items.yaml index ac8c313a14..ed7e88dcaa 100644 --- a/api/v1/swagger/paths/items.yaml +++ b/api/v1/swagger/paths/items.yaml @@ -310,6 +310,10 @@ description: Bad parameter schema: $ref: "../swagger.yaml#/definitions/error" + "409": + description: Conflict in creating resource + schema: + $ref: "../swagger.yaml#/definitions/error" "401": description: Authentication required schema: 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 aa71b4a4d6..081dc7426a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1978,6 +1978,8 @@ var response = data.responseJSON; if ( response.error_code === 'already_bundled' ) { $('#addResult').replaceWith('
'+_("Warning: Item '%s' already attached").format(barcode)+'
'); + } else if (response.error_code === 'bundle_checkout_out') { + $('#addResult').replaceWith('
'+_("Failure: Bundle is currently checked out")+'
'); } else if (response.error_code === 'checked_out') { const button = $('