kohabug 2026 - HTML-escape comments
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-review.tmpl
1 <!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo; Library Home for  <!-- TMPL_LOOP name="BORROWER_INFO" --><!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --><!-- /TMPL_LOOP -->
2 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3            <style type="text/css"> 
4    #custom-doc { width:37.08em;*width:36.16em;min-width:485px; margin:1em auto; text-align:left; } 
5            </style> 
6         </head> 
7         <body id="comment"> 
8         <div id="custom-doc" class="yui-t7"> 
9 <h3> </h3>
10
11 <form id="reviewf" action="/cgi-bin/koha/opac-review.pl" method="post"> 
12     <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
13     <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" />
14         <fieldset class="brief">
15         <legend>Comments on <i><!--TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></i><!-- TMPL_IF NAME="author" -->by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --></legend>
16             <ol><li><textarea id="review" name="review" cols="60" rows="8"><!--TMPL_VAR NAME="review"--></textarea></li></ol>
17                 </fieldset>
18     <p>Note: Your comment must be approved by a librarian. </p>
19                 <fieldset class="action"> <input type="submit" value="Submit and close this window" /> <a class="cancel close" href="#">Cancel</a></fieldset>
20 </form>
21 <script type="text/JavaScript" language="JavaScript">
22 //<![CDATA[
23          $(document).ready(function() {
24                 $('#reviewf').submit( function() {
25                         <!-- TMPL_IF NAME="reviewid" -->
26                         parent.opener.$('#c<!-- TMPL_VAR NAME="reviewid" --> p').prev("small").prev("h5").html("Your Edited Comment (preview, pending approval)");
27                         parent.opener.$('#c<!-- TMPL_VAR NAME="reviewid" --> p').html($("#review").val().replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'));
28                         parent.opener.$('#c<!-- TMPL_VAR NAME="reviewid" --> p').append(" <a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->&amp;reviewid=<!-- TMPL_VAR NAME="reviewid" -->\');\">Edit</a>");
29                         window.close();
30                         <!-- TMPL_ELSE -->
31                         parent.opener.$('#newcomment').attr("class","yours");
32                         parent.opener.$('#newcomment').html("<h5>Your Comment (preview, pending approval)</h5>");
33                         parent.opener.$('#newcomment').append("<p>"+$("#review").val().replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'));
34                         parent.opener.$('#newcomment p').append(" <a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->&amp;reviewid=<!-- TMPL_VAR NAME="reviewid" -->\');\">Edit</a></p>");
35                         parent.opener.$("#addcomment").prev("p").remove();
36                         parent.opener.$("#addcomment").remove();
37                         window.close();
38                         <!-- /TMPL_IF -->
39                 });
40         }); 
41 //]]>
42 </script>
43 </div>
44
45 </body>
46 </html>
47