From d84b347a2dedb397c22a98463c160057fe520bb9 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=UTF-8 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 --- .../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 25ec9c3..e2f7a58 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' %] -- 1.7.10.4