Bug 20980: Make mancredit.pl use Koha::Account::add_credit
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / mancredit.tt
1 [% USE Asset %]
2 [% USE Koha %]
3 [% USE Branches %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Patrons &rsaquo; Create manual credit</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 </head>
9
10 <body id="pat_mancredit" class="pat">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'patron-search.inc' %]
13
14 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Manual credit</div>
15
16 <div id="doc3" class="yui-t2">
17    
18    <div id="bd">
19         <div id="yui-main">
20         <div class="yui-b">
21 [% INCLUDE 'members-toolbar.inc' %]
22
23 <!-- The manual invoice and credit buttons -->
24 <div class="statictabs">
25 <ul>
26     <li><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Account</a></li>
27     <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]" >Pay fines</a></li>
28     <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual invoice</a></li>
29     <li class="active"><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual credit</a></li>
30 </ul>
31 <div class="tabs-container">
32
33 <form action="/cgi-bin/koha/members/mancredit.pl" method="post" id="mancredit">
34 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" />
35     <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
36
37 <fieldset class="rows">
38 <legend>Manual credit</legend><ol>
39         <li><label for="type">Credit type: </label><select name="type" id="type">
40 <option value="credit">Credit</option>
41 <option value="forgiven">Forgiven</option>
42 </select></li>
43         <li><label for="barcode">Barcode: </label><input type="text" name="barcode" id="barcode" /></li>
44         <li><label for="desc">Description: </label><input type="text" name="desc" size="50" id="desc" /></li>
45     <li><label for="note">Note: </label><input type="text" name="note" size="50" id="note" /></li>
46     <li><label for="amount">Amount: </label><input type="number" name="amount" id="amount" required="required" value="" step="any" min="0" /> Example: 5.00</li>
47 </ol></fieldset>
48
49 <fieldset class="action"><input type="submit" name="add" value="Add credit" /> <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Cancel</a></fieldset>
50 </form>
51
52 </div></div>
53
54 </div>
55 </div>
56
57 <div class="yui-b">
58 [% INCLUDE 'circ-menu.inc' %]
59 </div>
60 </div>
61
62 [% MACRO jsinclude BLOCK %]
63     [% Asset.js("js/members-menu.js") %]
64     <script type="text/javascript">
65         $(document).ready(function(){
66             $('#mancredit').preventDoubleFormSubmit();
67             $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
68         });
69     </script>
70 [% END %]
71
72 [% INCLUDE 'intranet-bottom.inc' %]