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

(-)a/Koha/Template/Plugin/EncodeUTF8.pm (+31 lines)
Line 0 Link Here
1
package Koha::Template::Plugin::EncodeUTF8;
2
3
# Copyright Bywater Solutions 2013
4
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 3 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Modern::Perl;
21
22
use base qw{Template::Plugin::Filter};
23
24
use Encode qw{encode};
25
26
sub filter {
27
    my ( $self, $value ) = @_;
28
    return encode( 'UTF-8', $value );
29
}
30
31
1;
(-)a/circ/renew.pl (-4 / +5 lines)
Lines 6-12 Link Here
6
#
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 2 of the License, or (at your option) any later
9
# Foundation; either version 3 of the License, or (at your option) any later
10
# version.
10
# version.
11
#
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
Lines 45-51 my $barcode = $cgi->param('barcode'); Link Here
45
my $override_limit = $cgi->param('override_limit');
45
my $override_limit = $cgi->param('override_limit');
46
my $override_holds = $cgi->param('override_holds');
46
my $override_holds = $cgi->param('override_holds');
47
47
48
my ( $item, $issue, $borrower, $error );
48
my ( $item, $issue, $borrower );
49
my $error = q{};
49
50
50
if ($barcode) {
51
if ($barcode) {
51
    $item = $schema->resultset("Item")->single( { barcode => $barcode } );
52
    $item = $schema->resultset("Item")->single( { barcode => $barcode } );
Lines 57-64 if ($barcode) { Link Here
57
        if ($issue) {
58
        if ($issue) {
58
59
59
            $borrower = $issue->borrower();
60
            $borrower = $issue->borrower();
60
61
            
61
            if ( $borrower->debarred() lt dt_from_string()->ymd() ) {
62
            if ( ( $borrower->debarred() || q{} ) lt dt_from_string()->ymd() ) {
62
                my $can_renew;
63
                my $can_renew;
63
                ( $can_renew, $error ) =
64
                ( $can_renew, $error ) =
64
                  CanBookBeRenewed( $borrower->borrowernumber(),
65
                  CanBookBeRenewed( $borrower->borrowernumber(),
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js (+7 lines)
Lines 77-79 function openWindow(link,name,width,height) { Link Here
77
    height = (typeof height == "undefined")?'400':height;
77
    height = (typeof height == "undefined")?'400':height;
78
    var newin=window.open(link,name,'width='+width+',height='+height+',resizable=yes,toolbar=false,scrollbars=yes,top');
78
    var newin=window.open(link,name,'width='+width+',height='+height+',resizable=yes,toolbar=false,scrollbars=yes,top');
79
}
79
}
80
81
// Use this function to remove the focus from any element for
82
// repeated scanning actions on errors so the librarian doesn't
83
// continue scanning and miss the error.
84
function removeFocus() {
85
    $(':focus').blur();
86
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt (-5 / +14 lines)
Lines 1-6 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE KohaBranchName %]
3
[% USE EncodeUTF8 %]
4
4
5
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
6
Lines 8-13 Link Here
8
8
9
[% INCLUDE 'doc-head-close.inc' %]
9
[% INCLUDE 'doc-head-close.inc' %]
10
10
11
[% IF error %]
12
    <script type="text/javascript">
13
    //<![CDATA[
14
        $( document ).ready(function() {
15
            removeFocus()
16
        });
17
    //]]>
18
    </script>
19
[% END %]
20
11
</head>
21
</head>
12
22
13
<body>
23
<body>
Lines 30-40 Link Here
30
40
31
                            [% ELSIF error == "no_checkout" %]
41
                            [% ELSIF error == "no_checkout" %]
32
42
33
                                <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title %] [% item.biblioitem.subtitle %]</a> ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> ) is not checked out to a patron.</p>
43
                                <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %]</a> ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> ) is not checked out to a patron.</p>
34
44
35
                            [% ELSIF error == "too_many" %]
45
                            [% ELSIF error == "too_many" %]
36
46
37
                                <p>[% item.biblio.title %] [% item.biblioitem.subtitle %] ( [% item.barcode %] ) has been renewed the maximum number of times by [% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )</p>
47
                                <p>[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %] ( [% item.barcode %] ) has been renewed the maximum number of times by [% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )</p>
38
48
39
                                [% IF Koha.Preference('AllowRenewalLimitOverride') %]
49
                                [% IF Koha.Preference('AllowRenewalLimitOverride') %]
40
                                    <form method="post" action="/cgi-bin/koha/circ/renew.pl">
50
                                    <form method="post" action="/cgi-bin/koha/circ/renew.pl">
Lines 75-81 Link Here
75
                    <div class="dialog message">
85
                    <div class="dialog message">
76
                        <h3>Item renewed:</h3>
86
                        <h3>Item renewed:</h3>
77
                        <p>
87
                        <p>
78
                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title %] [% item.biblioitem.subtitle %]</a>
88
                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]">[% item.biblio.title | $EncodeUTF8 %] [% item.biblioitem.subtitle | $EncodeUTF8 %]</a>
79
                            ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> )
89
                            ( <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a> )
80
                            renewed for
90
                            renewed for
81
                            [% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )
91
                            [% borrower.firstname %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> )
82
- 

Return to bug 10493