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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt (-1 / +3 lines)
Lines 48-54 Link Here
48
                <ul>
48
                <ul>
49
            [% END %]
49
            [% END %]
50
            <h3>Are you sure you want to delete the patron [% patron.firstname | html %] [% patron.surname | html %]? This cannot be undone.</h3>
50
            <h3>Are you sure you want to delete the patron [% patron.firstname | html %] [% patron.surname | html %]? This cannot be undone.</h3>
51
51
            [% IF pending_suggestions > 0 %]
52
                <h3>Note that this patron has [% pending_suggestions %] pending suggestions.</h3>
53
            [% END %]
52
            <form action="/cgi-bin/koha/members/deletemem.pl">
54
            <form action="/cgi-bin/koha/members/deletemem.pl">
53
                <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
55
                <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
54
                <input type="hidden" name="member" value="[% patron.borrowernumber | html %]"/>
56
                <input type="hidden" name="member" value="[% patron.borrowernumber | html %]"/>
(-)a/members/deletemem.pl (-1 / +10 lines)
Lines 28-33 use C4::Context; Link Here
28
use C4::Output;
28
use C4::Output;
29
use C4::Auth;
29
use C4::Auth;
30
use C4::Members;
30
use C4::Members;
31
use C4::Suggestions qw( SearchSuggestion );
31
use Koha::Patrons;
32
use Koha::Patrons;
32
use Koha::Token;
33
use Koha::Token;
33
use Koha::Patron::Categories;
34
use Koha::Patron::Categories;
Lines 102-107 if ( $op eq 'delete_confirm' or $countissues > 0 or $debits or $is_guarantor ) { Link Here
102
        op         => 'delete_confirm',
103
        op         => 'delete_confirm',
103
        csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID') }),
104
        csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID') }),
104
    );
105
    );
106
107
    # Add warning if patron has pending suggestions
108
    $template->param(
109
        pending_suggestions => scalar @{
110
        C4::Suggestions::SearchSuggestion(
111
                { suggestedby => $member, STATUS => 'ASKED' }
112
            )
113
        }
114
    );
105
} elsif ( $op eq 'delete_confirmed' ) {
115
} elsif ( $op eq 'delete_confirmed' ) {
106
    output_and_exit( $input, $cookie, $template, 'wrong_csrf_token' )
116
    output_and_exit( $input, $cookie, $template, 'wrong_csrf_token' )
107
        unless Koha::Token->new->check_csrf( {
117
        unless Koha::Token->new->check_csrf( {
108
- 

Return to bug 10910