View | Details | Raw Unified | Return to bug 26592
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc (-3 / +14 lines)
Lines 104-114 Link Here
104
                        var cardnumber = "";
104
                        var cardnumber = "";
105
                        if( item.cardnumber != "" ){
105
                        if( item.cardnumber != "" ){
106
                            // Display card number in parentheses if it exists
106
                            // Display card number in parentheses if it exists
107
                            cardnumber = " (" + item.cardnumber + ") ";
107
                            cardnumber = " (" + ( item.cardnumber ? item.surname.escapeHtml() : "" ) + ") ";
108
                        }
108
                        }
109
                        return $( "<li></li>" )
109
                        return $( "<li></li>" )
110
                        .data( "ui-autocomplete-item", item )
110
                        .data( "ui-autocomplete-item", item )
111
                        .append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
111
                        .append( "<a href=\"" + item.link + "\">" + ( item.surname ? item.surname.escapeHtml() : "" ) + ", " + ( item.firstname ? item.firstname.escapeHtml : "" ) + ( cardnumber ? cardnumber.escapeHtml() : "" ) + " <small>" + ( item.dateofbirth ? item.dateofbirth.escapeHtml() : "" ) + " " + ( item.address ? item.address.escapeHtml() : "" ) + " " + ( item.city ? item.city.escapeHtml() : "" ) + " " + ( item.zipcode ? item.zipcode.escapeHtml() : "" ) + " " + ( item.country ? item.country.escapeHtml() : "" ) + "</small></a>" )
112
                        .appendTo( ul );
112
                        .appendTo( ul );
113
                    };
113
                    };
114
                }
114
                }
Lines 137-143 Link Here
137
                }
137
                }
138
                return $( "<li></li>" )
138
                return $( "<li></li>" )
139
                .data( "ui-autocomplete-item", item )
139
                .data( "ui-autocomplete-item", item )
140
                .append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
140
                .append(
141
                    "<a href=\"" + item.link + "\">" + ( item.surname ? item.surname.escapeHtml() : "" ) + ", "
142
                        + ( item.firstname ? item.firstname.escapeHtml() : "" )
143
                        + cardnumber.escapeHtml()
144
                        + " <small>"
145
                            + ( item.dateofbirth ? item.dateofbirth.escapeHtml() : "" ) + " "
146
                            + ( item.address     ? item.address.escapeHtml() : "" )     + " "
147
                            + ( item.city        ? item.city.escapeHtml() : "" )        + " "
148
                            + ( item.zipcode     ? item.zipcode.escapeHtml() : "" )     + " "
149
                            + ( item.country     ? item.country.escapeHtml() : "" )
150
                        + "</small>"
151
                    + "</a>" )
141
                .appendTo( ul );
152
                .appendTo( ul );
142
            };
153
            };
143
        }
154
        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt (-4 / +17 lines)
Lines 323-332 Link Here
323
                .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
323
                .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
324
                    return $( "<li></li>" )
324
                    return $( "<li></li>" )
325
                    .data( "ui-autocomplete-item", item )
325
                    .data( "ui-autocomplete-item", item )
326
                    .append( "<a>" + item.surname + ", " + item.firstname +
326
                    .append(
327
                             " (" + item.cardnumber + ") <small>" + item.address +
327
                        "<a>"
328
                             " " + item.city + " " + item.zipcode + " " +
328
                            + ( item.surname ? item.surname.escapeHtml() : "" )
329
                             item.country + "</small></a>" )
329
                            + ", "
330
                            + ( item.firstname ? item.firstname.escapeHtml() : "" )
331
                            + " (" + ( item.cardnumber ? item.cardnumber.escapeHtml() : "" ) + ")"
332
                            + " "
333
                            + "<small>"
334
                                + ( item.address ? item.address.escapeHtml() : "" )
335
                                + " "
336
                                + ( item.city ? item.city.escapeHtml() : "" )
337
                                + " "
338
                                + ( item.zipcode ? item.zipcode.escapeHtml() : "" )
339
                                + " "
340
                                + ( item.country ? item.country.escapeHtml() : "" )
341
                            + "</small>"
342
                        + "</a>" )
330
                    .appendTo( ul );
343
                    .appendTo( ul );
331
                };
344
                };
332
            }
345
            }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt (-2 / +18 lines)
Lines 169-175 Link Here
169
                .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
169
                .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
170
                    return $( "<li></li>" )
170
                    return $( "<li></li>" )
171
                    .data( "ui-autocomplete-item", item )
171
                    .data( "ui-autocomplete-item", item )
172
                    .append( "<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
172
                    .append(
173
                        "<a>"
174
                            + ( item.surname ? item.surname.escapeHtml() : "" )
175
                            + ", "
176
                            + ( item.firstname ? item.firstname.escapeHtml() : "" )
177
                            + " (" + ( item.cardnumber ? item.cardnumber.escapeHtml() : "" ) + ")"
178
                            + " "
179
                            + "<small>"
180
                                + ( item.address ? item.address.escapeHtml() : "" )
181
                                + " "
182
                                + ( item.city ? item.city.escapeHtml() : "" )
183
                                + " "
184
                                + ( item.zipcode ? item.zipcode.escapeHtml() : "" )
185
                                + " "
186
                                + ( item.country ? item.country.escapeHtml() : "" )
187
                            + "</small>"
188
                        + "</a>" )
173
                    .appendTo( ul );
189
                    .appendTo( ul );
174
                };
190
                };
175
191
Lines 186-192 Link Here
186
            });
202
            });
187
203
188
            function AddInstructor( name, borrowernumber ) {
204
            function AddInstructor( name, borrowernumber ) {
189
                div = "<div class='instructor_line' id='borrower_" + borrowernumber + "'>" + name + " ( <a href='#' class='removeInstructor'><i class='fa fa-trash'></i> " + _("Remove")+ " </a> ) <input type='hidden' name='instructors' value='" + borrowernumber + "' /></div>";
205
                div = "<div class='instructor_line' id='borrower_" + borrowernumber + "'>" + ( name ? name.escapeHtml() : "" ) + " ( <a href='#' class='removeInstructor'><i class='fa fa-trash'></i> " + _("Remove")+ " </a> ) <input type='hidden' name='instructors' value='" + borrowernumber + "' /></div>";
190
                $('#instructors').append( div );
206
                $('#instructors').append( div );
191
207
192
                $('#find_instructor').val('').focus();
208
                $('#find_instructor').val('').focus();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-5 / +17 lines)
Lines 1248-1257 Link Here
1248
                .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
1248
                .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
1249
                    return $( "<li></li>" )
1249
                    return $( "<li></li>" )
1250
                    .data( "ui-autocomplete-item", item )
1250
                    .data( "ui-autocomplete-item", item )
1251
                    .append( "<a>" + item.surname + ", " + item.firstname +
1251
                    .append(
1252
                             " (" + item.cardnumber + ") <small>" + item.address +
1252
                        "<a>"
1253
                             " " + item.city + " " + item.zipcode + " " +
1253
                            + ( item.surname ? item.surname.escapeHtml() : "" )
1254
                             item.country + "</small></a>" )
1254
                            + ", "
1255
                            + ( item.firstname ? item.firstname.escapeHtml() : "" )
1256
                            + " (" + ( item.cardnumber ? item.cardnumber.escapeHtml() : "" ) + ")"
1257
                            + " "
1258
                            + "<small>"
1259
                                + ( item.address ? item.address.escapeHtml() : "" )
1260
                                + " "
1261
                                + ( item.city ? item.city.escapeHtml() : "" )
1262
                                + " "
1263
                                + ( item.zipcode ? item.zipcode.escapeHtml() : "" )
1264
                                + " "
1265
                                + ( item.country ? item.country.escapeHtml() : "" )
1266
                            + "</small>"
1267
                        + "</a>" )
1255
                    .appendTo( ul );
1268
                    .appendTo( ul );
1256
                };
1269
                };
1257
                [% END %]
1270
                [% END %]
1258
- 

Return to bug 26592