From 0bc8fc2787a5ef29638094a0a7ec7b47be636ae1 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 11 Oct 2019 14:18:58 +0100 Subject: [PATCH] Bug 23804: Correctly catch remote itemtype images Bug 20216 missed the mark and although it did start display a URL for the itemtype image in use, it was not limited to remote urls and as such broke the checked handling for displaying which local image was selected. Test plan: 1) Select a local image for an itemtype. 2) Check the correct image is displayed in the admin table. 3) Edit the itemtype checking that the correct image is checked. 4) Change to a remote image for the itemtype 5) Check the correct image is displayed in the admin table. 6) Edit the itemtype again and check that the URL still displays and is checked in the 'Remote image' tab. 7) Signoff Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- .../intranet-tmpl/prog/en/modules/admin/itemtypes.tt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt index 2f8c8986aa..7bff5dddaa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -195,14 +195,16 @@ Item types administration
  • - [% IF itemtype.imageurl %] + [% SET image_location = itemtype.image_location('intranet') %] + [% IF image_location.match('^http') %] + + [% IF itemtype.imageurl %] + + [% END %] [% ELSE %] - [% END %] - - [% IF itemtype.imageurl %] - + [% END %]
-- 2.39.5