TPAC: Integrate i18n for TPAC into build process
[working/Evergreen.git] / Open-ILS / src / templates / opac / myopac / main_pay.tt2
1 [%  PROCESS "opac/parts/header.tt2";
2     PROCESS "opac/parts/misc_util.tt2";
3     WRAPPER "opac/parts/myopac/base.tt2";
4     myopac_page = "main";
5     myopac_main_page = "pay" %]
6 <div id="myopac_summary_div">
7
8     [% IF ctx.payment_response.textcode %]
9         <div class="payment-error">
10             <span title="[% ctx.payment_response.textcode %]">
11                 [% ctx.payment_response.desc || ctx.payment_response.textcode %]
12             </span><br />
13             [% ctx.payment_response.note %]
14             [% ctx.payment_response.payload.error_message %]
15         </div>
16         <p>
17             [%
18                 url_args = {xact => [], xact_misc => []};
19                 FOR k IN ['xact', 'xact_misc'];
20                     FOR val IN CGI.param(k);
21                         url_args.$k.push(val);
22                     END;
23                 END;
24                 retry_url =  mkurl(ctx.opac_root _ '/myopac/main_payment_form', url_args, 1);
25             %]
26             <br/>
27             <a href="[% retry_url %]">[%
28                 l('Go back to try again or to cancel this payment attempt.')
29             %]</a>
30         </p>
31     [% ELSE %]
32         <p><big>[% l('Your payment has been approved.') %]</big></p>
33         [% IF ctx.printable_receipt.template_output;
34             print_args = [];
35             FOR p IN ctx.payment_response.payments;
36                 print_args.push('payment=' _ p);
37             END %]
38         <p>[ <a href="[% ctx.opac_root %]/myopac/receipt_print?[% print_args.join('&amp;') %]"
39             target="_egrecpt"
40             onclick="try { print_node('printable-receipt'); } catch (e) { window.print(); } return false;">[% l('Print receipt') %]</a> ]</p>
41         <tt id="printable-receipt">
42             [% ctx.printable_receipt.template_output.data %]
43         </tt>
44         [% ELSE %]
45         <div class="payment-error">
46             [% l(
47                 'Error creating receipt: [_1]',
48                     (ctx.printable_receipt.textcode ? ctx.printable_receipt.textcode _ ' / ' _ ctx.printable_receipt.desc : 0) ||
49                     ctx.printable_receipt.error_output.data ||
50                     l('No receipt data returned from server')
51                 ) | html %]
52         </div>
53         [% END %]
54         <p>[ <a href="[% ctx.opac_root %]/myopac/main">[%
55             l("Back to Account Summary") %]</a> ]</p>
56     [% END %]
57 </div>
58 [% END %]