dcd1f5d48c
Here we go, next step then. As we did not fix the performance issue when autofiltering the variables (see bug 20975), the only solution we have is to add the filters explicitely. This patch has been autogenerated (using add_html_filters.pl, see next pathces) and add the html filter to all the variables displayed in the template. Exceptions are made (using the new 'raw' TT filter) to the variable we already listed in the previous versions of this patch. To test: - Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated data which contain <script> tags - Remove them from borrower_debarments.comments (there are allowed here) update borrower_debarments set comment="html tags possible here"; - From the interface hit page and try to catch alert box. If you find one it means you find a possible XSS. To know where it comes from: * note the exact URL where you found it * note the alert box content * Dump your DB and search for the string in the dump to identify its location (for instance table.field) Next: * Ideally we would like to use the raw filter when it is not necessary to HTML escape the variables (in big loop for instance) * Provide a QA script to catch missing filters (we want html, uri, url or raw, certainly others that I am forgetting now) * Replace the html filters with uri when needed (!) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
331 lines
21 KiB
Text
331 lines
21 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% SET footerjs = 1 %]
|
|
[% BLOCK controls %]
|
|
<p class="cart-controls">
|
|
<a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a> <a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a>
|
|
| <b>Selected items :</b>
|
|
<a href="#" id="remove_from_cart">Remove</a>
|
|
|
|
[% IF ( loggedinusername ) %]
|
|
| <a href="#" id="add_to_list">Add to a list</a>
|
|
[% END %]
|
|
|
|
[% IF ( CAN_user_reserveforothers ) %]
|
|
| <a href="#" id="place_hold">Place hold</a>
|
|
[% END %]
|
|
|
|
[% IF CAN_user_tools_records_batchmod %]
|
|
| <a href="#" id="batch_modify">Batch modify</a>
|
|
[% END %]
|
|
|
|
[% IF CAN_user_tools_records_batchdel %]
|
|
| <a href="#" id="batch_delete">Batch delete</a>
|
|
[% END %]
|
|
</p>
|
|
[% END %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Catalog › Your cart</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="cart_basket" class="cart">
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
|
|
<div class="container">
|
|
|
|
<h1>Your cart</h1>
|
|
|
|
<div id="toolbar" class="btn-toolbar">
|
|
[% IF ( verbose ) %]
|
|
<a href="basket.pl" class="btn btn-default btn-sm showdetails showless"><i class="fa fa-folder"></i> Brief display</a>
|
|
[% ELSE %]
|
|
<a href="basket.pl" class="btn btn-default btn-sm showdetails showmore"><i class="fa fa-folder-open"></i> More details</a>
|
|
[% END %]
|
|
|
|
<a class="btn btn-default btn-sm" href="basket.pl" id="send_cart"><i class="fa fa-envelope"></i> Send</a>
|
|
<div class="btn-group">
|
|
<a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" href="#" id="downloadcart"><i class="fa fa-download"></i> Download <span class="caret"></span> </a>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=iso2709&bib_list=[% bib_list | html %]">iso2709</a></li>
|
|
<li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=ris&bib_list=[% bib_list | html %]">RIS</a></li>
|
|
<li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=bibtex&bib_list=[% bib_list | html %]">BibTex</a></li>
|
|
[% FOREACH csv_profile IN csv_profiles %]
|
|
<li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=[% csv_profile.export_format_id | html %]&bib_list=[% bib_list | html %]">CSV - [% csv_profile.profile | html %]</a></li>
|
|
[% END %]
|
|
</ul>
|
|
</div>
|
|
<a class="btn btn-default btn-sm" href="basket.pl" id="print_cart"><i class="fa fa-print"></i> Print</a>
|
|
<a class="btn btn-default btn-sm" href="basket.pl" id="empty_cart"><i class="fa fa-trash"></i> Empty and close</a>
|
|
<a class="btn btn-default btn-sm close" href="basket.pl"><i class="fa fa-times-circle"></i> Hide window</a>
|
|
</div>
|
|
|
|
|
|
[% IF ( verbose ) %]
|
|
[% PROCESS controls %]
|
|
<form action="basket.pl" method="get" name="bookbag_form" id="bookbag_form">
|
|
[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
|
|
<h3>
|
|
<input type="checkbox" class="select_record noprint" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]" />
|
|
[% BIBLIO_RESULT.title |html %]
|
|
[% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl.subfield | html %][% END %]
|
|
[% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author | html %][% END %]
|
|
</h3>
|
|
<!-- COinS / Openurl -->
|
|
<span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.au=[% BIBLIO_RESULT.author | html %]&rft.btitle=[% BIBLIO_RESULT.title |url %]&rft.date=[% BIBLIO_RESULT.publicationyear | html %]&rft.tpages=[% BIBLIO_RESULT.item('size') | html %]&rft.isbn=[% BIBLIO_RESULT.isbn |url %]&rft.aucorp=&rft.place=[% BIBLIO_RESULT.place | html %]&rft.pub=[% BIBLIO_RESULT.publisher |url %]&rft.edition=[% BIBLIO_RESULT.edition | html %]&rft.series=[% BIBLIO_RESULT.series | html %]&rft.genre="></span>
|
|
|
|
<table>
|
|
[% IF ( BIBLIO_RESULT.isbn ) %]
|
|
<tr>
|
|
<th scope="row">ISBN</th>
|
|
<td>[% BIBLIO_RESULT.isbn | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.HASAUTHORS ) %]
|
|
<tr>
|
|
<th scope="row">Author(s)</th>
|
|
<td>
|
|
[% IF ( BIBLIO_RESULT.author ) %]
|
|
<p>[% BIBLIO_RESULT.author | html %]</p>
|
|
[% END %]
|
|
[% IF ( BIBLIO_RESULT.MARCAUTHORS ) %]
|
|
[% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %]
|
|
<p>
|
|
[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %]
|
|
[% MARCAUTHOR_SUBFIELDS_LOO.separator | html %]
|
|
[% MARCAUTHOR_SUBFIELDS_LOO.value | html %]
|
|
[% END %]
|
|
</p>
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.publishercode ) %]
|
|
<tr>
|
|
<th scope="row">Publisher</th>
|
|
<td>[% BIBLIO_RESULT.place | html %] [% BIBLIO_RESULT.publishercode | html %] [% BIBLIO_RESULT.publicationyear | html %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.pages ) %]
|
|
<tr>
|
|
<th scope="row">Details</th>
|
|
<td>[% BIBLIO_RESULT.pages | html %] [% BIBLIO_RESULT.illus | html %] [% BIBLIO_RESULT.item('size') | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.seriestitle ) %]
|
|
<tr>
|
|
<th scope="row">Collection</th>
|
|
<td> [% BIBLIO_RESULT.seriestitle | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.MARCSUBJCTS ) %]
|
|
<tr>
|
|
<th scope="row">Subject(s)</th>
|
|
<td>
|
|
[% FOREACH MARCSUBJCT IN BIBLIO_RESULT.MARCSUBJCTS %]
|
|
<p>
|
|
[% FOREACH MARCSUBJECT_SUBFIELDS_LOO IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %]
|
|
[% MARCSUBJECT_SUBFIELDS_LOO.separator | html %][% MARCSUBJECT_SUBFIELDS_LOO.value | html %]
|
|
[% END %]
|
|
</p>
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.copyrightdate ) %]
|
|
<tr><th scope="row">Copyright</th>
|
|
<td> [% BIBLIO_RESULT.copyrightdate | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.MARCNOTES ) %]
|
|
<tr>
|
|
<th scope="row">Notes</th>
|
|
<td>
|
|
[% FOREACH MARCNOTE IN BIBLIO_RESULT.MARCNOTES %]
|
|
<p>
|
|
[% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
|
|
- <a href="[% MARCNOTE.marcnote | html %]">[% MARCNOTE.marcnote | html %]</a>
|
|
[% ELSE %]
|
|
- [% MARCNOTE.marcnote | html %]
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.unititle ) %]
|
|
<tr>
|
|
<th scope="row">Unified title</th>
|
|
<td> [% BIBLIO_RESULT.unititle | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.serial ) %]
|
|
<tr>
|
|
<th scope="row">Serial</th>
|
|
<td>[% BIBLIO_RESULT.serial | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.dewey ) %]
|
|
<tr>
|
|
<th scope="row">Dewey</th>
|
|
<td>[% BIBLIO_RESULT.dewey | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.classification ) %]
|
|
<tr>
|
|
<th scope="row">Classification</th>
|
|
<td> [% BIBLIO_RESULT.classification | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
[% IF ( BIBLIO_RESULT.lccn ) %]
|
|
<tr>
|
|
<th scope="row">LCCN</th>
|
|
<td> [% BIBLIO_RESULT.lccn | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
|
|
[% IF BIBLIO_RESULT.MARCURLS.size %]
|
|
<tr>
|
|
<th scope="row">URL(s)</th>
|
|
<td>
|
|
[% FOREACH MARCurl IN BIBLIO_RESULT.MARCURLS %]
|
|
[% IF MARCurl.part %]<p>[% MARCurl.part | html %]</p>[% END %]
|
|
<a href="[% MARCurl.MARCURL | html %]" title="[% MARCurl.MARCURL | html %]">[% MARCurl.linktext | html %]</a>
|
|
[% IF MARCurl.notes %]
|
|
[% FOREACH note IN MARCurl.notes %]
|
|
<p>[% note.note | html %]</p>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
<tr>
|
|
<th scope="row">Location(s)</th>
|
|
<td>
|
|
[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
|
|
[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
|
|
<p>
|
|
[% ITEM_RESULT.branchname | html %] [% ITEM_RESULT.location_description | html %]
|
|
[% IF ( ITEM_RESULT.itemcallnumber ) %]
|
|
([% ITEM_RESULT.itemcallnumber | html %])
|
|
[% END %]
|
|
</p>
|
|
[% END %]
|
|
[% ELSE %]
|
|
This record has no items.
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
[% END # /FOREACH BIBLIO_RESULT %]
|
|
</form> [% # /bookbag_form %]
|
|
|
|
[% ELSE # IF verbose %]
|
|
|
|
<form action="/cgi-bin/koha/basket/basket.pl" method="get" name="bookbag_form" id="bookbag_form">
|
|
[% PROCESS controls %]
|
|
|
|
<table id="itemst">
|
|
<thead>
|
|
<tr>
|
|
<th class="NoSort noprint"> </th>
|
|
<th class="anti-the">Title</th>
|
|
<th>Item type</th>
|
|
<th>
|
|
<a id="items-popover" href="#" data-trigger="hover" data-toggle="popover" data-placement="top" title="Item sorting" data-content="Items are sorted by the highest or lowest callnumber in a group of items respectively.">Items</a>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
|
|
<tr>
|
|
<td class="noprint">
|
|
<input type="checkbox" class="select_record" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]" />
|
|
</td>
|
|
<td>
|
|
<a href="[% BIBLIO_RESULT.dest | html %]?biblionumber=[% BIBLIO_RESULT.biblionumber | html %]" class="open_title">
|
|
[% BIBLIO_RESULT.title |html %]
|
|
[% FOREACH subtitl IN BIBLIO_RESULT.subtitle %]
|
|
[% subtitl.subfield | html %]
|
|
[% END %]
|
|
</a>
|
|
[% BIBLIO_RESULT.author | html %]
|
|
<p>
|
|
[% IF ( BIBLIO_RESULT.publishercode ) %]
|
|
- [% BIBLIO_RESULT.publishercode | html %]
|
|
[% IF ( BIBLIO_RESULT.place ) %]
|
|
[% BIBLIO_RESULT.place | html %]
|
|
[% END %]
|
|
[% END %]
|
|
[% IF ( BIBLIO_RESULT.pages ) %]
|
|
- [% BIBLIO_RESULT.pages | html %]
|
|
[% IF ( BIBLIO_RESULT.item('size') ) %]
|
|
[% BIBLIO_RESULT.item('size') | html %]
|
|
[% END %]
|
|
[% END %]
|
|
</p>
|
|
[% IF ( BIBLIO_RESULT.notes ) %]
|
|
<p>[% BIBLIO_RESULT.notes | html %]</p>
|
|
[% END %]
|
|
<!-- COinS / Openurl -->
|
|
<span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.au=[% BIBLIO_RESULT.author | html %]&rft.btitle=[% BIBLIO_RESULT.title |url %]&rft.date=[% BIBLIO_RESULT.publicationyear | html %]&rft.tpages=[% BIBLIO_RESULT.item('size') | html %]&rft.isbn=[% BIBLIO_RESULT.isbn |url %]&rft.aucorp=&rft.place=[% BIBLIO_RESULT.place | html %]&rft.pub=[% BIBLIO_RESULT.publisher |url %]&rft.edition=[% BIBLIO_RESULT.edition | html %]&rft.series=[% BIBLIO_RESULT.series | html %]&rft.genre="></span>
|
|
</td>
|
|
<td>[% BIBLIO_RESULT.description | html %]</td>
|
|
<td class="callnumbers">
|
|
[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
|
|
[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
|
|
<div>
|
|
<span class="nowrap">
|
|
<strong>
|
|
<span class="callnumber">[% ITEM_RESULT.itemcallnumber | html %]</span>
|
|
</strong>
|
|
[% ITEM_RESULT.branchname | html %]
|
|
<span class="shelvingloc inline">[% ITEM_RESULT.location_description | html %]</span>
|
|
</span>
|
|
</div>
|
|
[% END %]
|
|
[% ELSE %]
|
|
This record has no items.
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END # /FOREACH BIBLIO_RESULT %]
|
|
</table>
|
|
</form>
|
|
[% END # /IF verbose %]
|
|
|
|
<form name="myform" action="basket/basket.pl" method="get">
|
|
<input type="hidden" name="records" id="records" />
|
|
</form>
|
|
|
|
</div> [% # /.container %]
|
|
</div> [% # /.col-md-12 %]
|
|
</div> [% # /.row %]
|
|
</div> [% # /.main.container-fluid %]
|
|
|
|
[% INCLUDE js_includes.inc %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
[% Asset.js("js/cart.js") | $raw %]
|
|
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
|
|
|
|
</body>
|
|
</html>
|