shop.balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

pp_express_search.twig (12823B)


      1 {{ header }}{{ column_left }}
      2 <div id="content">
      3   <div class="page-header">
      4     <div class="container-fluid">
      5       <div class="pull-right"><a id="button-edit" data-toggle="tooltip" style="display:none;" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a> <a id="button-search" data-toggle="tooltip" title="{{ button_search }}" class="btn btn-info"><i class="fa fa-search"></i></a></div>
      6       <h1><i class="fa fa-search"></i> {{ heading_title }}</h1>
      7       <ul class="breadcrumb">
      8         {% for breadcrumb in breadcrumbs %}
      9         <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
     10         {% endfor %}
     11       </ul>
     12     </div>
     13   </div>
     14   <div class="container-fluid">
     15     <div class="panel panel-default">
     16       <div class="panel-heading">
     17         <h3 class="panel-title"><i class="fa fa-list"></i> {{ heading_title }}</h3>
     18       </div>
     19       <div class="panel-body">
     20         <div id="search-input">
     21           <form id="form" class="form-horizontal">
     22             <h3>{{ text_date_search }}</h3>
     23             <div class="form-group">
     24               <label class="col-sm-2 control-label" for="input-date-start">{{ entry_date_start }}</label>
     25               <div class="col-sm-10">
     26                 <div class="input-group date">
     27                   <input type="text" name="date_start" value="{{ date_start }}" placeholder="{{ text_format }}: yy-mm-dd" data-date-format="YYYY-MM-DD" id="input-date-start" class="form-control" />
     28                   <span class="input-group-btn">
     29                   <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
     30                   </span></div>
     31               </div>
     32             </div>
     33             <div class="form-group">
     34               <label class="col-sm-2 control-label" for="input-date-end">{{ entry_date_end }}</label>
     35               <div class="col-sm-10">
     36                 <div class="input-group date">
     37                   <input type="text" name="date_end" value="{{ date_end }}" placeholder="{{ text_format }}: yy-mm-dd" data-date-format="YYYY-MM-DD" class="form-control" />
     38                   <span class="input-group-btn">
     39                   <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
     40                   </span></div>
     41               </div>
     42             </div>
     43             <h3>{{ entry_transaction }}</h3>
     44             <div class="form-group">
     45               <label class="col-sm-2 control-label">{{ entry_transaction_type }}</label>
     46               <div class="col-sm-10">
     47                 <select name="transaction_class" class="form-control">
     48                   <option value="All">{{ entry_trans_all }}</option>
     49                   <option value="Sent">{{ entry_trans_sent }}</option>
     50                   <option value="Received">{{ entry_trans_received }}</option>
     51                   <option value="MassPay">{{ entry_trans_masspay }}</option>
     52                   <option value="MoneyRequest">{{ entry_trans_money_req }}</option>
     53                   <option value="FundsAdded">{{ entry_trans_funds_add }}</option>
     54                   <option value="FundsWithdrawn">{{ entry_trans_funds_with }}</option>
     55                   <option value="Referral">{{ entry_trans_referral }}</option>
     56                   <option value="Fee">{{ entry_trans_fee }}</option>
     57                   <option value="Subscription">{{ entry_trans_subscription }}</option>
     58                   <option value="Dividend">{{ entry_trans_dividend }}</option>
     59                   <option value="Billpay">{{ entry_trans_billpay }}</option>
     60                   <option value="Refund">{{ entry_trans_refund }}</option>
     61                   <option value="CurrencyConversions">{{ entry_trans_conv }}</option>
     62                   <option value="BalanceTransfer">{{ entry_trans_bal_trans }}</option>
     63                   <option value="Reversal">{{ entry_trans_reversal }}</option>
     64                   <option value="Shipping">{{ entry_trans_shipping }}</option>
     65                   <option value="BalanceAffecting">{{ entry_trans_bal_affect }}</option>
     66                   <option value="ECheck">{{ entry_trans_echeque }}</option>
     67                 </select>
     68               </div>
     69             </div>
     70             <div class="form-group">
     71               <label class="col-sm-2 control-label">{{ entry_email }} ({{ entry_email_buyer }})</label>
     72               <div class="col-sm-10">
     73                 <input type="text" name="buyer_email" value="" placeholder="{{ entry_email_buyer }}" class="form-control" />
     74               </div>
     75             </div>
     76             <div class="form-group">
     77               <label class="col-sm-2 control-label">{{ entry_email }} ({{ entry_email_merchant }})</label>
     78               <div class="col-sm-10">
     79                 <input type="text" name="merchant_email" value="" placeholder="{{ entry_email_merchant }}" class="form-control" />
     80               </div>
     81             </div>
     82             <div class="form-group">
     83               <label class="col-sm-2 control-label">{{ entry_receipt }}</label>
     84               <div class="col-sm-10">
     85                 <input type="text" name="receipt_id" value="" placeholder="{{ entry_receipt }}" class="form-control" />
     86               </div>
     87             </div>
     88             <div class="form-group">
     89               <label class="col-sm-2 control-label">{{ entry_transaction_id }}</label>
     90               <div class="col-sm-10">
     91                 <input type="text" name="transaction_id" value="" placeholder="{{ entry_transaction_id }}" class="form-control" />
     92               </div>
     93             </div>
     94             <div class="form-group">
     95               <label class="col-sm-2 control-label">{{ entry_invoice_no }}</label>
     96               <div class="col-sm-10">
     97                 <input type="text" name="invoice_number" value="" placeholder="{{ entry_invoice_no }}" class="form-control" />
     98               </div>
     99             </div>
    100             <div class="form-group">
    101               <label class="col-sm-2 control-label">{{ entry_auction }}</label>
    102               <div class="col-sm-10">
    103                 <input type="text" name="auction_item_number" value="" placeholder="{{ entry_auction }}" class="form-control" />
    104               </div>
    105             </div>
    106             <div class="form-group">
    107               <label class="col-sm-2 control-label">{{ entry_amount }}</label>
    108               <div class="col-sm-10">
    109                 <input type="text" name="amount" value="" placeholder="{{ entry_amount }}" class="form-control" />
    110                 <br />
    111                 <select name="currency_code" class="form-control">
    112                   {% for code in currency_codes %}
    113                   <option {% if code == default_currency  %} 'selected' {% endif %}>{{ code }}</option>
    114                   {% endfor %}
    115                 </select>
    116               </div>
    117             </div>
    118             <div class="form-group">
    119               <label class="col-sm-2 control-label">{{ entry_recurring_id }}</label>
    120               <div class="col-sm-10">
    121                 <input type="text" name="recurring_id" value="" placeholder="{{ entry_recurring_id }}" class="form-control" />
    122               </div>
    123             </div>
    124             <h3>{{ text_buyer_info }}</h3>
    125             <div class="form-group">
    126               <label class="col-sm-2 control-label">{{ entry_salutation }}</label>
    127               <div class="col-sm-10">
    128                 <input type="text" name="name_salutation" value="" placeholder="{{ entry_salutation }}" class="form-control" />
    129               </div>
    130             </div>
    131             <div class="form-group">
    132               <label class="col-sm-2 control-label">{{ entry_firstname }}</label>
    133               <div class="col-sm-10">
    134                 <input type="text" name="name_first" value="" placeholder="{{ entry_firstname }}" class="form-control" />
    135               </div>
    136             </div>
    137             <div class="form-group">
    138               <label class="col-sm-2 control-label">{{ entry_middlename }}</label>
    139               <div class="col-sm-10">
    140                 <input type="text" name="name_middle" value="" placeholder="{{ entry_middlename }}" class="form-control" />
    141               </div>
    142             </div>
    143             <div class="form-group">
    144               <label class="col-sm-2 control-label">{{ entry_lastname }}</label>
    145               <div class="col-sm-10">
    146                 <input type="text" name="name_last" value="" placeholder="{{ entry_lastname }}" class="form-control" />
    147               </div>
    148             </div>
    149             <div class="form-group">
    150               <label class="col-sm-2 control-label">{{ entry_suffix }}</label>
    151               <div class="col-sm-10">
    152                 <input type="text" name="name_suffix" value="" placeholder="{{ entry_suffix }}" class="form-control" />
    153               </div>
    154             </div>
    155           </form>
    156         </div>
    157         <div id="search-box" style="display:none;">
    158           <div id="searching"><i class="fa fa-circle-o-notch fa-spin fa-lg"></i> {{ text_searching }}</div>
    159           <div style="display:none;" id="error" class="alert alert-danger"></div>
    160           <table id="search_results" style="display:none;" class="table table-striped table-bordered" >
    161           </table>
    162         </div>
    163       </div>
    164     </div>
    165   </div>
    166   <script type="text/javascript"><!--
    167 $('#button-search').on('click', function() {
    168   var html = '';
    169 
    170 	$.ajax({
    171 		url: 'index.php?route=extension/payment/pp_express/doSearch&user_token={{ user_token }}',
    172 		type: 'POST',
    173 		dataType: 'json',
    174 		data: $('#form').serialize(),
    175 		beforeSend: function () {
    176 			$('#search-input').hide();
    177 			$('#search-box').show();
    178 			$('#button-search').hide();
    179 			$('#button-edit').show();
    180 		},
    181 		success: function (data) {
    182 			if (data.error == true) {
    183 				$('#searching').hide();
    184 				$('#error').html('<i class="fa fa-exclamation-circle"></i> ' + data.error_msg).fadeIn();
    185 			} else {
    186 				if (data.result != '') {
    187 					html += '<thead><tr>';
    188 					html += '<td class="left">{{ column_date }}</td>';
    189 					html += '<td class="left">{{ column_type }}</td>';
    190 					html += '<td class="left">{{ column_email }}</td>';
    191 					html += '<td class="left">{{ column_name }}</td>';
    192 					html += '<td class="left">{{ column_transid }}</td>';
    193 					html += '<td class="left">{{ column_status }}</td>';
    194 					html += '<td class="left">{{ column_currency }}</td>';
    195 					html += '<td class="right">{{ column_amount }}</td>';
    196 					html += '<td class="right">{{ column_fee }}</td>';
    197 					html += '<td class="right">{{ column_netamt }}</td>';
    198 					html += '<td class="center">{{ column_action }}</td>';
    199 					html += '</tr></thead>';
    200 				
    201           $.each(data.result, function (k, v) {
    202             if ("L_LONGMESSAGE" in v) {
    203               $('#error').text(v.L_LONGMESSAGE).fadeIn();
    204             } else {
    205               if (!("L_EMAIL" in v)) {
    206                 v.L_EMAIL = '';
    207               }
    208 
    209               html += '<tr>';
    210               html += '<td class="left">' + v.L_TIMESTAMP + '</td>';
    211               html += '<td class="left">' + v.L_TYPE + '</td>';
    212               html += '<td class="left">' + v.L_EMAIL + '</td>';
    213               html += '<td class="left">' + v.L_NAME + '</td>';
    214               html += '<td class="left">' + v.L_TRANSACTIONID + '</td>';
    215               html += '<td class="left">' + v.L_STATUS + '</td>';
    216               html += '<td class="left">' + v.L_CURRENCYCODE + '</td>';
    217               html += '<td class="right">' + v.L_AMT + '</td>';
    218               html += '<td class="right">' + v.L_FEEAMT + '</td>';
    219               html += '<td class="right">' + v.L_NETAMT + '</td>';
    220               html += '<td class="center">';
    221               html += '<a href="{{ view_link }}&transaction_id=' + v.L_TRANSACTIONID + '">{{ text_view }}</a>';
    222               html += '</td>';
    223               html += '</tr>';
    224             }
    225           });
    226 	
    227           $('#searching').hide();
    228           $('#search_results').append(html).fadeIn();
    229 	      } else {
    230 	        $('#searching').hide();
    231 	        $('#error').html('<i class="fa fa-exclamation-circle"></i> {{ text_no_results }}').fadeIn();
    232 	      }
    233 	    }
    234 	  }
    235 	});
    236 });
    237 
    238 $('#button-edit').on('click', function() {
    239   $('#search-box').hide();
    240   $('#search-input').show();
    241   $('#button-edit').hide();
    242   $('#button-search').show();
    243   $('#searching').show();
    244   $('#search_results').empty().hide();
    245   $('#error').empty().hide();
    246 });
    247 
    248 $('.date').datetimepicker({
    249 	language: '{{ datepicker }}',
    250 	pickTime: false
    251 });
    252 
    253 $('.time').datetimepicker({
    254 	language: '{{ datepicker }}',
    255 	pickDate: false
    256 });
    257 
    258 $('.datetime').datetimepicker({
    259 	language: '{{ datepicker }}',
    260 	pickDate: true,
    261 	pickTime: true
    262 });
    263 //--></script></div>
    264 {{ footer }}