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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc (-4 / +20 lines)
Lines 101-111 Link Here
101
                            // Display card number in parentheses if it exists
101
                            // Display card number in parentheses if it exists
102
                            cardnumber = " (" + item.cardnumber + ") ";
102
                            cardnumber = " (" + item.cardnumber + ") ";
103
                        }
103
                        }
104
                        var itemString = "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>";
104
                        var itemString = "<a href=\"" + item.link + "\">" + ( item.surname ? item.surname.escapeHtml() : "" ) + ", " + ( item.firstname ? item.firstname.escapeHtml() : "" ) + cardnumber.escapeHtml() + " <small>";
105
                        if( item.dateofbirth ) {
105
                        if( item.dateofbirth ) {
106
                            itemString += item.dateofbirth + "<span class=\"age_years\"> (" + item.age + " " +  _("years") + ")</span>, ";
106
                            itemString += ( item.dateofbirth ? item.dateofbirth.escapeHtml() : "" )
107
                                        + "<span class=\"age_years\"> (" + ( item.age ? item.age.escapeHtml() : "" ) + " " +  _("years") + ")</span>, ";
107
                        }
108
                        }
108
                        itemString += item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>";
109
                        itemString += ( item.address ? item.address.escapeHtml() : "" ) + " "
110
                                    + ( item.city    ? item.city.escapeHtml()    : "" ) + " "
111
                                    + ( item.zipcode ? item.city.escapeHtml()    : "" ) + " "
112
                                    + ( item.country ? item.country.escapeHtml() : "" )
113
                                    + "</small></a>";
109
                        return $( "<li></li>" )
114
                        return $( "<li></li>" )
110
                        .data( "ui-autocomplete-item", item )
115
                        .data( "ui-autocomplete-item", item )
111
                        .append( itemString )
116
                        .append( itemString )
Lines 137-143 Link Here
137
                }
142
                }
138
                return $( "<li></li>" )
143
                return $( "<li></li>" )
139
                .data( "ui-autocomplete-item", item )
144
                .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>" )
145
                .append(
146
                    "<a href=\"" + item.link + "\">" + ( item.surname ? item.surname.escapeHtml() : "" ) + ", "
147
                        + ( item.firstname ? item.firstname.escapeHtml() : "" )
148
                        + cardnumber.escapeHtml()
149
                        + " <small>"
150
                            + ( item.dateofbirth ? item.dateofbirth.escapeHtml() : "" ) + " "
151
                            + ( item.address     ? item.address.escapeHtml() : "" )     + " "
152
                            + ( item.city        ? item.city.escapeHtml() : "" )        + " "
153
                            + ( item.zipcode     ? item.zipcode.escapeHtml() : "" )     + " "
154
                            + ( item.country     ? item.country.escapeHtml() : "" )
155
                        + "</small>"
156
                    + "</a>" )
141
                .appendTo( ul );
157
                .appendTo( ul );
142
            };
158
            };
143
        }
159
        }
(-)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 1320-1329 Link Here
1320
                .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
1320
                .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
1321
                    return $( "<li></li>" )
1321
                    return $( "<li></li>" )
1322
                    .data( "ui-autocomplete-item", item )
1322
                    .data( "ui-autocomplete-item", item )
1323
                    .append( "<a>" + item.surname + ", " + item.firstname +
1323
                    .append(
1324
                             " (" + item.cardnumber + ") <small>" + item.address +
1324
                        "<a>"
1325
                             " " + item.city + " " + item.zipcode + " " +
1325
                            + ( item.surname ? item.surname.escapeHtml() : "" )
1326
                             item.country + "</small></a>" )
1326
                            + ", "
1327
                            + ( item.firstname ? item.firstname.escapeHtml() : "" )
1328
                            + " (" + ( item.cardnumber ? item.cardnumber.escapeHtml() : "" ) + ")"
1329
                            + " "
1330
                            + "<small>"
1331
                                + ( item.address ? item.address.escapeHtml() : "" )
1332
                                + " "
1333
                                + ( item.city ? item.city.escapeHtml() : "" )
1334
                                + " "
1335
                                + ( item.zipcode ? item.zipcode.escapeHtml() : "" )
1336
                                + " "
1337
                                + ( item.country ? item.country.escapeHtml() : "" )
1338
                            + "</small>"
1339
                        + "</a>" )
1327
                    .appendTo( ul );
1340
                    .appendTo( ul );
1328
                };
1341
                };
1329
                [% END %]
1342
                [% END %]
1330
- 

Return to bug 26592