Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt
Owen Leonard 3e91d99a15 Bug 20053: Drop type attribute "text/javascript" in OPAC templates
This patch is a reimplementation of the original from Indranil Das Gupta
and the QA follow-up from Julian Maurice. Original test plan:

Conformance rules for HTML5 is generating warnings for <script> element
with type="text/javascript" attribute when the OPAC page is checked
with W3C Validator. This patch removes the cause of these warnings.

Test plan
=========

1/ Paste the URL to your OPAC page (if it is hosted) to W3C Validator
   and watch about 10+ warnings being generated by the validator.

2/ Apply patch and re-submit the page to the Validator. The warnings
   would be gone.

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 09:48:12 -04:00

77 lines
4 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Comments on [% title |html %]</title>
<style>
#custom-doc { width:37.08em;*width:36.16em;min-width:485px; margin:1em auto; text-align:left; }
</style>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='comment' bodyclass='popup' %]
<div class="main">
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div id="userreview">
[% IF ( cgi_debug ) %]
<div class="debug">CGI debug is on.</div>
[% END %]
[% IF ( ERRORS ) %]
<div class="alert">
[% FOREACH ERROR IN ERRORS %]
[% IF ( ERROR.nobiblio ) %]
<p>Error: we cannot find this bibliographic record.</p>
[% END %]
[% IF ( ERROR.unauthorized ) %]
<p>Sorry, only the creator of this comment is allowed to change it.</p>
[% END %]
[% IF ( ERROR.scrubbed ) %]
<p>Note: your comment contained illegal markup code. It has been saved with the markup removed, as below. You can edit the comment further, or cancel to retain the comment as is.</p>
[% END %]
[% IF ( ERROR.scrubbed_all ) %]
<p>Error! Your comment was entirely illegal markup code. It has NOT been added.</p>
[% END %]
[% IF ( ERROR.empty ) %]
<p>Error! You cannot add an empty comment. Please add content or cancel.</p>
[% END %]
[% END # / FOREACH ERROR %]
[% IF ( WINDOW_CLOSE ) %]
Note: this window will close automatically in 5 seconds.
[% END %]
</div>
[% END # / ERRORs %]
<h1>Comments on <i>[% title |html %] [% subtitle %]</i></h1>
[% IF ( author ) %]<h3>[% author |html %]</h3>[% END %]
<form id="reviewf" action="/cgi-bin/koha/opac-review.pl[% IF ( cgi_debug ) %]?debug=1[% END %]" method="post">
<input type="hidden" name="biblionumber" value="[% biblionumber | html%]" />
[% IF ( reviewid ) %]<input type="hidden" name="reviewid" value="[% reviewid | html%]" />[% END %]
<fieldset>
<textarea id="review" name="review" cols="60" rows="8">[% review %]</textarea>
</fieldset>
<p>Note: Your comment must be approved by a librarian. </p>
<fieldset class="action">
<input type="submit" class="btn" value="Submit and close this window" />
<a class="cancel close" href="#">Cancel</a>
</fieldset>
</form>
</div> <!-- / #usersendshelfform -->
</div> <!-- / .span12 -->
</div> <!-- / .row-fluid -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' is_popup=1 %]
[% BLOCK jsinclude %]
<script>
//<![CDATA[
$(document).ready(function() {
[% IF WINDOW_CLOSE %]
opener.location.reload();
window.close();
[% END %]
});
//]]>
</script>
[% END %]