From fff73a73837d577214fa3a9198fa97f8a50471f3 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Tue, 3 Nov 2015 12:16:08 -0300 Subject: [PATCH] Bug 15061: Can't add item to rotating collection MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch prevents adding items to invalid (empty) rotating collection id To test: 1) Go to /cgi-bin/koha/rotating_collections/addItems.pl 2) Try to add an item, you get error show in attached pictures 3) Apply the patch 4) Go again to /cgi-bin/koha/rotating_collections/addItems.pl 5) Can't add any items I don't know if this is a real problem Followed test plan, works as expected. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/rotating_collections/addItems.tt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt index 25ec9c3f9f..43d4a8b66e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt @@ -20,8 +20,13 @@
+ [% IF ( ! colId ) %] +
+

Invalid collection id

+

Return to rotating collections home

+
+ [% ELSE %] [% INCLUDE 'rotating-collections-toolbar.inc' %] -

Collection [% colTitle %]

[% IF ( previousActionAdd ) %] @@ -112,11 +117,11 @@
There are no items in this collection.
[% END %]
- + [% END %]
[% INCLUDE 'tools-menu.inc' %]
-[% INCLUDE 'intranet-bottom.inc' %] \ No newline at end of file +[% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5