From f0dbfbcb9b7905e682df677dfe8c980840fac09e 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 --- 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 8ed7a52..2af7a0e 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.7.0