From 0a590fb054f6a11ed6bfb76c5b31c6cbc07ffa8f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 13 May 2016 22:03:08 +0100 Subject: [PATCH] Bug 1859: Do not display <<>> if an entry without value is selected For instance there are ---TABLES--- to delimite fields' tables, if selected we do not want to add "<<>>" to the letter. Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 2c332513ffd421af6b23ebf30474f5baeac8ba6f) Signed-off-by: Julian Maurice --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 8b55d9e07e..03b6fa8ec2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -134,7 +134,7 @@ $(document).ready(function() { if($(myListBox).find('option').length > 0) { $(myListBox).find('option').each( function (){ - if ( $(this).attr('selected') ) { + if ( $(this).attr('selected') && $(this).val().length > 0 ) { $(myQuery).insertAtCaret("<<" + $(this).val() + ">>"); } }); -- 2.39.5