Line # Revision Author
1 563 ahitrov <script type="text/javascript">
2 <!--
3 $(document).ready(function(){
4 $('#search-order-form').on('submit', function( ev ){
5 ev.preventDefault();
6 var order_id = $(this).find('input[name=order_id]').val();
7 if ( order_id ) {
8 $.ajax({
9 'url' : '/contenido/payments/ajax/order_info.html',
10 'data' : { 'id' : order_id },
11 'dataType' : 'json',
12 'success' : function( data ){
13 if ( data.brief ) {
14 $('#order-info').html( data.brief );
15 }
16 if ( data.actions ) {
17 $('#order-actions').html( data.actions );
18 }
19 }
20 });
21 }
22 });
23 });
24 //-->
25 </script>
26 <style>
27 #form-order-finder b.prompt { display:inline-block; width:120px; }
28 </style>
29 <fieldset id="form-order-finder">
30 <legend>Поиск по номеру заказа</legend>
31 <form id="search-order-form" name="search_order" action="/contenido/payments/" method="GET" target="select">
32 <table width="100%" border="0" cellpadding="0" cellspacing="6" class="tform">
33 <tr><td width="98%"><input type="text" name="order_id" value="<% $order_id %>" style="width:97%;" placeholder="Введите идентификатор заказа"></td>
34 <td width="2%" nowrap>
35 <input type="submit" value="Искать" class="btn">
36 </td></tr>
37 </table>
38 </form>
39 <div id="order-info">
40 % if ( $order_id ) {
41 <& /contenido/payments/components/block_order_brief.msn, order => $order &>
42 % }
43 </div>
44 </fieldset>
45 <%args>
46
47 $order_id => undef
48
49 </%args>
50 <%init>
51
52 my $order = $keeper->{payments}->get_order( $order_id );
53
54 </%init>