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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-1 / +3 lines)
Lines 82-88 Link Here
82
        [% END %]
82
        [% END %]
83
        <a href="accountline-details.pl?accountlines_id=[% account.accountlines_id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a>
83
        <a href="accountline-details.pl?accountlines_id=[% account.accountlines_id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a>
84
        [% IF account.is_credit %]
84
        [% IF account.is_credit %]
85
          <a href="boraccount.pl?action=void&amp;accountlines_id=[% account.accountlines_id | uri %]&amp;borrowernumber=[% account.borrowernumber | uri %]" class="btn btn-default btn-xs void"><i class="fa fa-ban"></i> Void</a>
85
          <a href="boraccount.pl?action=void&amp;accountlines_id=[% account.accountlines_id | uri %]&amp;borrowernumber=[% account.borrowernumber | uri %]&amp;csrf_token=[% csrf_token | html %]" class="btn btn-default btn-xs void"><i class="fa fa-ban"></i> Void</a>
86
        [% END %]
86
        [% END %]
87
        [% IF CAN_user_updatecharges_payout && account.is_credit && ( account.amountoutstanding < 0 ) %]
87
        [% IF CAN_user_updatecharges_payout && account.is_credit && ( account.amountoutstanding < 0 ) %]
88
          <button type="button" data-toggle="modal" data-target="#issuePayoutModal" data-account="[%- PROCESS account_type_description account=account -%]" data-accountline="[% account.accountlines_id | html %]" data-amount="[% account.amountoutstanding | $Price %]" class="btn btn-default btn-xs"><i class="fa fa-money"></i> Issue payout</button>
88
          <button type="button" data-toggle="modal" data-target="#issuePayoutModal" data-account="[%- PROCESS account_type_description account=account -%]" data-accountline="[% account.accountlines_id | html %]" data-amount="[% account.amountoutstanding | $Price %]" class="btn btn-default btn-xs"><i class="fa fa-money"></i> Issue payout</button>
Lines 125-130 Link Here
125
            <input type="hidden" name="accountlines_id" value="" id="payoutline">
125
            <input type="hidden" name="accountlines_id" value="" id="payoutline">
126
            <input type="hidden" name="action" value="payout">
126
            <input type="hidden" name="action" value="payout">
127
            <input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]">
127
            <input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]">
128
            [% INCLUDE 'csrf-token.inc' %]
128
            <div class="modal-dialog" role="document">
129
            <div class="modal-dialog" role="document">
129
                <div class="modal-content">
130
                <div class="modal-content">
130
                    <div class="modal-header">
131
                    <div class="modal-header">
Lines 189-194 Link Here
189
            <input type="hidden" name="accountlines_id" value="" id="refundline">
190
            <input type="hidden" name="accountlines_id" value="" id="refundline">
190
            <input type="hidden" name="action" value="refund">
191
            <input type="hidden" name="action" value="refund">
191
            <input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]">
192
            <input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]">
193
            [% INCLUDE 'csrf-token.inc' %]
192
            <div class="modal-dialog" role="document">
194
            <div class="modal-dialog" role="document">
193
                <div class="modal-content">
195
                <div class="modal-content">
194
                    <div class="modal-header">
196
                    <div class="modal-header">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (+1 lines)
Lines 39-44 Link Here
39
[% IF ( accounts ) %]
39
[% IF ( accounts ) %]
40
    <form action="/cgi-bin/koha/members/pay.pl" method="post" id="pay-fines-form">
40
    <form action="/cgi-bin/koha/members/pay.pl" method="post" id="pay-fines-form">
41
    <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
41
    <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
42
    [% INCLUDE 'csrf-token.inc' %]
42
<p><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></p>
43
<p><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></p>
43
<table id="finest">
44
<table id="finest">
44
<thead>
45
<thead>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-3 / +5 lines)
Lines 48-53 Link Here
48
        Suggestions management
48
        Suggestions management
49
    [% END %]
49
    [% END %]
50
</div>
50
</div>
51
[% INCLUDE 'blocking_errors.inc' %]
51
52
52
[% IF ( op == 'show' ) %]
53
[% IF ( op == 'show' ) %]
53
    <div class="main container-fluid">
54
    <div class="main container-fluid">
Lines 251-256 Link Here
251
        </div>
252
        </div>
252
    [% END %]
253
    [% END %]
253
    <form id="add_edit" action="suggestion.pl" method="post" class="validated">
254
    <form id="add_edit" action="suggestion.pl" method="post" class="validated">
255
    [% INCLUDE 'csrf-token.inc' %]
254
    <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
256
    <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
255
    <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
257
    <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
256
    [% IF ( suggestionid ) %]
258
    [% IF ( suggestionid ) %]
Lines 496-502 Link Here
496
[% FOREACH suggestion IN suggestions %]
498
[% FOREACH suggestion IN suggestions %]
497
<div id="[% suggestion.suggestiontype | html %]">
499
<div id="[% suggestion.suggestiontype | html %]">
498
<form class="update_suggestions" name="f[% suggestion.suggestiontype | html %]" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype | html %]">
500
<form class="update_suggestions" name="f[% suggestion.suggestiontype | html %]" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype | html %]">
499
501
[% INCLUDE 'csrf-token.inc' %]
500
[% IF ( suggestion.suggestions_loop ) %]
502
[% IF ( suggestion.suggestions_loop ) %]
501
<p><a id="CheckAll[% suggestion.suggestiontype | html %]" href="#">Check all</a> | <a id="UncheckAll[% suggestion.suggestiontype | html %]" href="#">Uncheck all</a></p>
503
<p><a id="CheckAll[% suggestion.suggestiontype | html %]" href="#">Check all</a> | <a id="UncheckAll[% suggestion.suggestiontype | html %]" href="#">Uncheck all</a></p>
502
    <table id="[% suggestion.suggestiontype | html %]t" class="sorted">
504
    <table id="[% suggestion.suggestiontype | html %]t" class="sorted">
Lines 570-577 Link Here
570
                    [% END %]
572
                    [% END %]
571
                </td>
573
                </td>
572
                <td class="actions">
574
                <td class="actions">
573
                    <a class="btn btn-xs btn-default" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&amp;op=edit"><i class="fa fa-pencil"></i> Edit</a>
575
                    <a class="btn btn-xs btn-default" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&amp;csrf_token=[% csrf_token | html %]&amp;op=edit"><i class="fa fa-pencil"></i> Edit</a>
574
                    <a class="btn btn-default btn-xs deletesuggestion" href="suggestion.pl?op=delete&amp;edit_field=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
576
                    <a class="btn btn-default btn-xs deletesuggestion" href="suggestion.pl?op=delete&amp;edit_field=[% suggestions_loo.suggestionid | html %]&amp;csrf_token=[% csrf_token | html %]"><i class="fa fa-trash"></i> Delete</a>
575
                </td>
577
                </td>
576
        </tr>
578
        </tr>
577
        [% END %]</tbody>
579
        [% END %]</tbody>
(-)a/members/boraccount.pl (+3 lines)
Lines 92-103 if ( C4::Context->preference('UseCashRegisters') ) { Link Here
92
}
92
}
93
93
94
if ( $action eq 'void' ) {
94
if ( $action eq 'void' ) {
95
    output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
95
    my $payment_id = scalar $input->param('accountlines_id');
96
    my $payment_id = scalar $input->param('accountlines_id');
96
    my $payment    = Koha::Account::Lines->find( $payment_id );
97
    my $payment    = Koha::Account::Lines->find( $payment_id );
97
    $payment->void();
98
    $payment->void();
98
}
99
}
99
100
100
if ( $action eq 'payout' ) {
101
if ( $action eq 'payout' ) {
102
    output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
101
    my $payment_id        = scalar $input->param('accountlines_id');
103
    my $payment_id        = scalar $input->param('accountlines_id');
102
    my $payment           = Koha::Account::Lines->find($payment_id);
104
    my $payment           = Koha::Account::Lines->find($payment_id);
103
    my $amount           = scalar $input->param('amount');
105
    my $amount           = scalar $input->param('amount');
Lines 119-124 if ( $action eq 'payout' ) { Link Here
119
}
121
}
120
122
121
if ( $action eq 'refund' ) {
123
if ( $action eq 'refund' ) {
124
    output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
122
    my $charge_id        = scalar $input->param('accountlines_id');
125
    my $charge_id        = scalar $input->param('accountlines_id');
123
    my $charge           = Koha::Account::Lines->find($charge_id);
126
    my $charge           = Koha::Account::Lines->find($charge_id);
124
    my $amount           = scalar $input->param('amount');
127
    my $amount           = scalar $input->param('amount');
(-)a/members/pay.pl (+7 lines)
Lines 77-95 $user ||= q{}; Link Here
77
our $branch = C4::Context->userenv->{'branch'};
77
our $branch = C4::Context->userenv->{'branch'};
78
78
79
if ( $input->param('paycollect') ) {
79
if ( $input->param('paycollect') ) {
80
    output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
80
    print $input->redirect(
81
    print $input->redirect(
81
        "/cgi-bin/koha/members/paycollect.pl?borrowernumber=$borrowernumber&change_given=$change_given");
82
        "/cgi-bin/koha/members/paycollect.pl?borrowernumber=$borrowernumber&change_given=$change_given");
82
}
83
}
83
elsif ( $input->param('payselected') ) {
84
elsif ( $input->param('payselected') ) {
85
    output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
84
    payselected({ params => \@names });
86
    payselected({ params => \@names });
85
}
87
}
86
elsif ( $input->param('writeoff_selected') ) {
88
elsif ( $input->param('writeoff_selected') ) {
89
    output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
87
    payselected({ params => \@names, type => 'WRITEOFF' });
90
    payselected({ params => \@names, type => 'WRITEOFF' });
88
}
91
}
89
elsif ( $input->param('woall') ) {
92
elsif ( $input->param('woall') ) {
93
    output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
90
    writeoff_all(@names);
94
    writeoff_all(@names);
91
}
95
}
92
elsif ( $input->param('apply_credits') ) {
96
elsif ( $input->param('apply_credits') ) {
97
    output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
93
    apply_credits({ patron => $patron, cgi => $input });
98
    apply_credits({ patron => $patron, cgi => $input });
94
}
99
}
95
elsif ( $input->param('confirm_writeoff') ) {
100
elsif ( $input->param('confirm_writeoff') ) {
Lines 127-135 elsif ( $input->param('confirm_writeoff') ) { Link Here
127
132
128
for (@names) {
133
for (@names) {
129
    if (/^pay_indiv_(\d+)$/) {
134
    if (/^pay_indiv_(\d+)$/) {
135
        output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
130
        my $line_no = $1;
136
        my $line_no = $1;
131
        redirect_to_paycollect( 'pay_individual', $line_no );
137
        redirect_to_paycollect( 'pay_individual', $line_no );
132
    } elsif (/^wo_indiv_(\d+)$/) {
138
    } elsif (/^wo_indiv_(\d+)$/) {
139
        output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
133
        my $line_no = $1;
140
        my $line_no = $1;
134
        redirect_to_paycollect( 'writeoff_individual', $line_no );
141
        redirect_to_paycollect( 'writeoff_individual', $line_no );
135
    }
142
    }
(-)a/members/setstatus.pl (+1 lines)
Lines 53-58 my $patron = Koha::Patrons->find( $borrowernumber ); Link Here
53
if ( $logged_in_user->can_see_patron_infos($patron) ) {
53
if ( $logged_in_user->can_see_patron_infos($patron) ) {
54
    if ( $reregistration eq 'y' ) {
54
    if ( $reregistration eq 'y' ) {
55
        # re-reregistration function to automatic calcul of date expiry
55
        # re-reregistration function to automatic calcul of date expiry
56
        output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
56
        $dateexpiry = $patron->renew_account;
57
        $dateexpiry = $patron->renew_account;
57
    } else {
58
    } else {
58
        my $sth = $dbh->prepare("UPDATE borrowers SET debarred = ?, debarredcomment = '' WHERE borrowernumber = ?");
59
        my $sth = $dbh->prepare("UPDATE borrowers SET debarred = ?, debarredcomment = '' WHERE borrowernumber = ?");
(-)a/suggestion/suggestion.pl (-3 / +5 lines)
Lines 125-130 my $branchfilter = $input->param('branchcode') || C4::Context->userenv->{'branch Link Here
125
##
125
##
126
126
127
if ( $op =~ /save/i ) {
127
if ( $op =~ /save/i ) {
128
    output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
128
    my @messages;
129
    my @messages;
129
    my $biblio = MarcRecordFromNewSuggestion({
130
    my $biblio = MarcRecordFromNewSuggestion({
130
            title => $suggestion_only->{title},
131
            title => $suggestion_only->{title},
Lines 196-202 elsif ($op=~/add/) { Link Here
196
    $op ='save';
197
    $op ='save';
197
}
198
}
198
elsif ($op=~/edit/) {
199
elsif ($op=~/edit/) {
199
    #Edit suggestion  
200
    #Edit suggestion
201
    output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
200
    $suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'});
202
    $suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'});
201
    $suggestion_ref->{reasonsloop} = $reasonsloop;
203
    $suggestion_ref->{reasonsloop} = $reasonsloop;
202
    my $other_reason = 1;
204
    my $other_reason = 1;
Lines 211-217 elsif ($op=~/edit/) { Link Here
211
    $op ='save';
213
    $op ='save';
212
}  
214
}  
213
elsif ($op eq "change" ) {
215
elsif ($op eq "change" ) {
214
216
    output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
215
    my $suggestion;
217
    my $suggestion;
216
    # set accepted/rejected/managed informations if applicable
218
    # set accepted/rejected/managed informations if applicable
217
    # ie= if the librarian has chosen some action on the suggestions
219
    # ie= if the librarian has chosen some action on the suggestions
Lines 261-266 elsif ($op eq "change" ) { Link Here
261
    }
263
    }
262
    print $input->redirect("/cgi-bin/koha/suggestion/suggestion.pl?$params");
264
    print $input->redirect("/cgi-bin/koha/suggestion/suggestion.pl?$params");
263
}elsif ($op eq "delete" ) {
265
}elsif ($op eq "delete" ) {
266
    output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
264
    foreach my $delete_field (@editsuggestions) {
267
    foreach my $delete_field (@editsuggestions) {
265
        &DelSuggestion( $borrowernumber, $delete_field,'intranet' );
268
        &DelSuggestion( $borrowernumber, $delete_field,'intranet' );
266
    }
269
    }
267
- 

Return to bug 22990