Bugfix: show (cleaned) comment back on detail page.
authorJoe Atzberger <joe.atzberger@liblime.com>
Mon, 9 Jun 2008 18:52:41 +0000 (13:52 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 10 Jun 2008 13:22:19 +0000 (08:22 -0500)
Also added minor debug feedback to review page.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tmpl
opac/opac-review.pl

index b21393d..3fdd217 100644 (file)
@@ -49,6 +49,7 @@
 <body id="comment"> 
 <div id="custom-doc" class="yui-t7"> 
 <div class="container">
+<!-- TMPL_IF NAME="cgi_debug" --><div class="debug">CGI debug is on.</div><!-- /TMPL_IF -->
 <!-- TMPL_IF NAME="ERRORS" -->
        <div class="error">
        <!-- TMPL_LOOP NAME="ERRORS" -->
@@ -64,7 +65,7 @@
        <!-- TMPL_IF NAME="WINDOW_CLOSE" -->Note: this window will close automatically in 5 seconds<!-- /TMPL_IF -->
        </div>
 <!-- /TMPL_IF -->
-<form id="reviewf" action="/cgi-bin/koha/opac-review.pl" method="post"> 
+<form id="reviewf" action="/cgi-bin/koha/opac-review.pl<!-- TMPL_IF NAME="cgi_debug" -->?debug=1<!-- /TMPL_IF -->" method="post"> 
     <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
        <fieldset class="brief">
        <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>
index 52f96e7..57a460f 100755 (executable)
@@ -55,10 +55,10 @@ if (defined $review) {
                } else {
                        if ($clean ne $review) {
                                push @errors, {scrubbed=>$clean};
-                               my $js_ok_review = $clean;
-                               $js_ok_review =~ s/"/&quot;/g;  # probably redundant w/ TMPL ESCAPE=JS
-                               $template->param(clean_review=>$js_ok_review);
                        }
+                       my $js_ok_review = $clean;
+                       $js_ok_review =~ s/"/&quot;/g;  # probably redundant w/ TMPL ESCAPE=JS
+                       $template->param(clean_review=>$js_ok_review);
                        if ($savedreview) {
                        updatereview($biblionumber, $borrowernumber, $clean);
                        } else {