Lines 193-207
Link Here
|
193 |
> |
193 |
> |
194 |
[% END %] |
194 |
[% END %] |
195 |
[% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %] |
195 |
[% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %] |
196 |
<form method="post" action="/cgi-bin/koha/members/cancel-charge.pl"> |
196 |
<button |
197 |
[% INCLUDE 'csrf-token.inc' %] |
197 |
type="button" |
198 |
<input type="hidden" name="op" value="cud-cancel" /> |
198 |
data-toggle="modal" |
199 |
<input type="hidden" name="accountlines_id" value="[% account.accountlines_id | html %]" /> |
199 |
data-target="#cancelChargeModal" |
200 |
<button type="submit" class="btn btn-default btn-xs cancel-action"> |
200 |
data-accountlines_id="[% account.accountlines_id | html %]" |
201 |
<i class="fa fa-ban"></i> |
201 |
data-borrowernumber="[% patron.borrowernumber | html %]" |
202 |
Cancel charge |
202 |
class="btn btn-default btn-xs void-action" |
203 |
</button> |
203 |
><i class="fa fa-ban"></i> Cancel charge</button |
204 |
</form> |
204 |
> |
205 |
[% END %] |
205 |
[% END %] |
206 |
[% IF CAN_user_updatecharges_payout && account.is_credit && ( account.amountoutstanding < 0 ) %] |
206 |
[% IF CAN_user_updatecharges_payout && account.is_credit && ( account.amountoutstanding < 0 ) %] |
207 |
<button |
207 |
<button |
Lines 477-482
Link Here
|
477 |
</div> |
477 |
</div> |
478 |
<!-- /#voidPaymentModal --> |
478 |
<!-- /#voidPaymentModal --> |
479 |
|
479 |
|
|
|
480 |
<!-- Cancel charge modal --> |
481 |
<div class="modal" id="cancelChargeModal" tabindex="-1" role="dialog" aria-labelledby="cancelChangreLabel"> |
482 |
<form method="post" action="/cgi-bin/koha/members/cancel-charge.pl"> |
483 |
[% INCLUDE 'csrf-token.inc' %] |
484 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
485 |
<input type="hidden" name="accountlines_id" id="accountlines_id" value="" /> |
486 |
<div class="modal-dialog" role="document"> |
487 |
<div class="modal-content"> |
488 |
<div class="modal-header"> |
489 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
490 |
<h4 class="modal-title" id="cancelChargeLabel">Cancel charge</h4> |
491 |
</div> |
492 |
<div class="modal-body"> |
493 |
<fieldset class="rows"> |
494 |
<ol> |
495 |
<li> |
496 |
<label for="cancel_charge_note">Note: </label> |
497 |
<input type="text" id="cnacel_charge_note" name="cancel_charge_note" /> |
498 |
</li> |
499 |
</ol> |
500 |
</fieldset> |
501 |
<!-- /.rows --> |
502 |
</div> |
503 |
<!-- /.modal-body --> |
504 |
<div class="modal-footer"> |
505 |
<button type="submit" class="btn btn-default">Confirm</button> |
506 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> |
507 |
</div> |
508 |
<!-- /.modal-footer --> |
509 |
</div> |
510 |
<!-- /.modal-content --> |
511 |
</div> |
512 |
<!-- /.modal-dialog --> |
513 |
</form> |
514 |
<!-- /#cancel_charge_form --> |
515 |
</div> |
516 |
<!-- /#voidPaymentModal --> |
517 |
|
480 |
[% MACRO jsinclude BLOCK %] |
518 |
[% MACRO jsinclude BLOCK %] |
481 |
[% INCLUDE 'datatables.inc' %] |
519 |
[% INCLUDE 'datatables.inc' %] |
482 |
[% INCLUDE 'format_price.inc' %] |
520 |
[% INCLUDE 'format_price.inc' %] |
Lines 561-566
Link Here
|
561 |
$('#voidline').val(accountline); |
599 |
$('#voidline').val(accountline); |
562 |
}); |
600 |
}); |
563 |
|
601 |
|
|
|
602 |
$("#cancelChargeModal").on("shown.bs.modal", function(e){ |
603 |
var button = $(e.relatedTarget); |
604 |
var item = button.data('accountlines_id'); |
605 |
$('#accountlines_id').val(item); |
606 |
}); |
607 |
|
564 |
$(".receipt-email-action").on("click", function(e){ |
608 |
$(".receipt-email-action").on("click", function(e){ |
565 |
e.preventDefault(); |
609 |
e.preventDefault(); |
566 |
return $(this).siblings('form').submit(); |
610 |
return $(this).siblings('form').submit(); |