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

(-)a/circ/circulation.pl (+1 lines)
Lines 660-665 $template->param( Link Here
660
    canned_bor_notes_loop     => $canned_notes,
660
    canned_bor_notes_loop     => $canned_notes,
661
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
661
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
662
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
662
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
663
    nopermission              => $query->param('nopermission'),
663
);
664
);
664
665
665
output_html_with_http_headers $query, $cookie, $template->output;
666
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +4 lines)
Lines 122-128 $(document).ready(function() { Link Here
122
            $(':radio', this).attr('checked', 'true')
122
            $(':radio', this).attr('checked', 'true')
123
        }
123
        }
124
    });
124
    });
125
126
});
125
});
127
126
128
//]]>
127
//]]>
Lines 212-217 $(document).ready(function() { Link Here
212
    <div class="dialog message">The patron has unpaid charges for holds, rentals etc of [% alert.OTHER_CHARGES %]</div>
211
    <div class="dialog message">The patron has unpaid charges for holds, rentals etc of [% alert.OTHER_CHARGES %]</div>
213
[% END %]
212
[% END %]
214
213
214
[% IF ( nopermission ) %]
215
    <div class="dialog alert">Staff members are not allowed to discharge borrowers, nor borrowers to request a discharge.</div>
216
[% END %]
217
215
[% IF ( NEEDSCONFIRMATION ) %]
218
[% IF ( NEEDSCONFIRMATION ) %]
216
<div class="yui-g">
219
<div class="yui-g">
217
220
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt (+4 lines)
Lines 23-28 Link Here
23
            <div class="span10">
23
            <div class="span10">
24
                <div id="discharge" class="maincontainer">
24
                <div id="discharge" class="maincontainer">
25
                    <h1>Discharge</h1>
25
                    <h1>Discharge</h1>
26
                    [% IF not(Koha.Preference("useDischarge")) %]
27
                        Discharges have not been enabled. Please contact the library.
28
                    [% ELSE %]
26
                    [% FOR message IN messages %]
29
                    [% FOR message IN messages %]
27
                        <div class="dialog [% message.type %]">
30
                        <div class="dialog [% message.type %]">
28
                        [% IF message.code == "unable_to_generate_pdf" %]
31
                        [% IF message.code == "unable_to_generate_pdf" %]
Lines 46-51 Link Here
46
                        <p><strong>Warning</strong>: This request is only valid if you are in good standing with the library. Once the application is made, you can not borrow library materials.</p>
49
                        <p><strong>Warning</strong>: This request is only valid if you are in good standing with the library. Once the application is made, you can not borrow library materials.</p>
47
                        <a href="/cgi-bin/koha/opac-discharge.pl?op=request">Ask for a discharge</a>
50
                        <a href="/cgi-bin/koha/opac-discharge.pl?op=request">Ask for a discharge</a>
48
                    [% END %]
51
                    [% END %]
52
                    [% END %]
49
                </div> <!-- / #discharge -->
53
                </div> <!-- / #discharge -->
50
            </div> <!-- / .span10 -->
54
            </div> <!-- / .span10 -->
51
        </div> <!-- / .row-fluid -->
55
        </div> <!-- / .row-fluid -->
(-)a/members/discharge.pl (-3 / +9 lines)
Lines 42-47 use Koha::Patron::Images; Link Here
42
use Koha::DateUtils;
42
use Koha::DateUtils;
43
43
44
my $input = new CGI;
44
my $input = new CGI;
45
45
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user({
46
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user({
46
    template_name   => 'members/discharge.tt',
47
    template_name   => 'members/discharge.tt',
47
    query           => $input,
48
    query           => $input,
Lines 50-56 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user({ Link Here
50
    flagsrequired   => { 'borrowers' => '*' },
51
    flagsrequired   => { 'borrowers' => '*' },
51
});
52
});
52
53
53
my $borrowernumber;
54
my $borrowernumber = $input->param('borrowernumber');
55
56
unless ( C4::Context->preference('useDischarge') ) {
57
   print $input->redirect("/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber&nopermission=1");
58
   exit;
59
} else {
60
54
my $data;
61
my $data;
55
if ( $input->param('borrowernumber') ) {
62
if ( $input->param('borrowernumber') ) {
56
    $borrowernumber = $input->param('borrowernumber');
63
    $borrowernumber = $input->param('borrowernumber');
Lines 132-138 if ( $input->param('borrowernumber') ) { Link Here
132
        can_be_discharged => $can_be_discharged,
139
        can_be_discharged => $can_be_discharged,
133
        validated_discharges => $validated_discharges,
140
        validated_discharges => $validated_discharges,
134
    );
141
    );
135
}
142
}}
136
143
137
$template->param( dischargeview => 1, );
144
$template->param( dischargeview => 1, );
138
145
139
- 

Return to bug 15823