From 68f595c1c7fd51c528a6029bf3d45715c12f769b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 30 Jan 2018 14:06:27 -0300 Subject: [PATCH] Bug 19230: (follow-up) Preventing warn when deleting course Simplify 'unless' statement Signed-off-by: Jonathan Druart Conflicts: koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt Signed-off-by: Nick Clemens --- .../prog/en/modules/course_reserves/course-details.tt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt index e1b8c9c0c1..e24be94130 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt @@ -23,10 +23,7 @@ }); $("#delete_course").click(function(){ - [% SET count = course_reserves.size %] - [% UNLESS count %] - [% count = 0 %] - [% END %] + [% SET count = course_reserves.size || 0 %] [% IF count == 1 %] return confirmDelete(_("Are you sure you want to delete this course? There is [% count %] attached item.") ); [% ELSIF count > 1 %] -- 2.39.5