Bug 19230: (follow-up) Preventing warn when deleting course

Simplify 'unless' statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2018-01-30 14:06:27 -03:00
parent f05da6ada7
commit 19a07cc16f
1 changed files with 1 additions and 4 deletions

View File

@ -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 %]