From eafb10b580aed03a312335bb06fddc6d255a6bf8 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 17 Mar 2022 18:17:44 +0000 Subject: [PATCH] Bug 29999: (follow-up) Show the remote image tab if selected This follow-up corrects the markup so that if a value is entered in the "Remote image" field, the correct tab will be selected upon page load. The patch also corrrects the input name on the "No image" field so that the option works correctly. To test, apply the patch and edit an authorized value. - Select an icon from an icon set. Save, and then re-edit. - The correct icon set tab should be activated. - Select "No image," save, and re-edit. - The "No image" tab should be selected. - On the "Remote image" tab, enter a remote image url, e.g. https://via.placeholder.com/50/FF0000/FFFFFF.png. Save and re-edit. - The "Remote image" should be selected. --- .../prog/en/modules/admin/authorised_values.tt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt index 12336be243..c59f878a0e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt @@ -189,7 +189,7 @@
@@ -221,7 +221,11 @@ [% END # /FOREACH imageset %] -
+ [% IF av.imageurl.match('^http') %] +
+ [% ELSE %] +
+ [% END %] [% IF av.imageurl.match('^http') %] -- 2.20.1