From 19a07cc16f2ffb1c019bf98707fcbe31e57168a5 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 --- .../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 bec2e9fad5..9912fc8f79 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 @@ -209,10 +209,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