From 2c332513ffd421af6b23ebf30474f5baeac8ba6f 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 --- 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 8ed7a52235..2af7a0e6eb 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