Lines 132-138
Link Here
|
132 |
[% END %] |
132 |
[% END %] |
133 |
</td> |
133 |
</td> |
134 |
<td>[% IF account.itemnumber %][% Branches.GetName( account.item.homebranch ) | html %][% END %]</td> |
134 |
<td>[% IF account.itemnumber %][% Branches.GetName( account.item.homebranch ) | html %][% END %]</td> |
135 |
<td>[% account.note | html_line_break %]</td> |
135 |
<td> |
|
|
136 |
[% account.note | html_line_break %] |
137 |
[% IF CAN_user_updatecharges_edit_notes %] |
138 |
<button type="button" class="btn btn-default btn-xs edit-action" data-toggle="modal" data-target="#editNoteModal" data-accountline="[% account.accountlines_id | html %]" data-note="[% account.note | html %]" data-member="[% account.borrowernumber | html %]"><i class="fa-solid fa-pen"></i> Edit</button> |
139 |
[% END %] |
140 |
</td> |
136 |
[% IF account.amount <= 0 %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td> |
141 |
[% IF account.amount <= 0 %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td> |
137 |
[% IF account.amountoutstanding <= 0 %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding | $Price %]</td> |
142 |
[% IF account.amountoutstanding <= 0 %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding | $Price %]</td> |
138 |
<td class="actions"> |
143 |
<td class="actions"> |
Lines 448-453
Link Here
|
448 |
</form> <!-- /#cancel_charge_form --> |
453 |
</form> <!-- /#cancel_charge_form --> |
449 |
</div> <!-- /#voidPaymentModal --> |
454 |
</div> <!-- /#voidPaymentModal --> |
450 |
|
455 |
|
|
|
456 |
<!-- Edit note modal --> |
457 |
<div class="modal" id="editNoteModal" tabindex="-1" role="dialog" aria-labelledby="editNoteLabel"> |
458 |
<form id="edit_form" action="/cgi-bin/koha/members/boraccount.pl" method="post" enctype="multipart/form-data" class="validated"> |
459 |
[% INCLUDE 'csrf-token.inc' %] |
460 |
<input type="hidden" name="accountlines_id" value="" id="noteline"> |
461 |
<input type="hidden" name="op" value="cud-edit_note"> |
462 |
<input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]"> |
463 |
<div class="modal-dialog" role="document"> |
464 |
<div class="modal-content"> |
465 |
<div class="modal-header"> |
466 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
467 |
<h4 class="modal-title" id="editNoteLabel">Edit note</h4> |
468 |
</div> |
469 |
<div class="modal-body"> |
470 |
<fieldset class="rows"> |
471 |
<ol> |
472 |
<li> |
473 |
<label for="edited_note">Note: </label> |
474 |
<input name="edited_note" id="edited_note" value="" /> |
475 |
</li> |
476 |
</ol> |
477 |
</fieldset> <!-- /.rows --> |
478 |
</div> <!-- /.modal-body --> |
479 |
<div class="modal-footer"> |
480 |
<button type="submit" class="btn btn-default">Confirm</button> |
481 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> |
482 |
</div> <!-- /.modal-footer --> |
483 |
</div> <!-- /.modal-content --> |
484 |
</div> <!-- /.modal-dialog --> |
485 |
</form> <!-- /#void_form --> |
486 |
</div> <!-- /#editNoteModal --> |
451 |
|
487 |
|
452 |
[% MACRO jsinclude BLOCK %] |
488 |
[% MACRO jsinclude BLOCK %] |
453 |
[% INCLUDE 'datatables.inc' %] |
489 |
[% INCLUDE 'datatables.inc' %] |
Lines 537-542
Link Here
|
537 |
$('#accountlines_id').val(item); |
573 |
$('#accountlines_id').val(item); |
538 |
}); |
574 |
}); |
539 |
|
575 |
|
|
|
576 |
$("#editNoteModal").on("shown.bs.modal", function(e){ |
577 |
var button = $(e.relatedTarget); |
578 |
var item = button.data('item'); |
579 |
$("#item + span").replaceWith(item); |
580 |
var accountline = button.data('accountline'); |
581 |
$('#noteline').val(accountline); |
582 |
var note = button.data('note'); |
583 |
$('#edited_note').val(note); |
584 |
}); |
585 |
|
540 |
$(".receipt-email-action").on("click", function(e){ |
586 |
$(".receipt-email-action").on("click", function(e){ |
541 |
e.preventDefault(); |
587 |
e.preventDefault(); |
542 |
return $(this).siblings('form').submit(); |
588 |
return $(this).siblings('form').submit(); |