2017-02-09 11:46:58 +01:00
|
|
|
<div class="modal fade" id="paymentRefundModal" tabindex="-1" role="dialog" aria-labelledby="paymentRefundModalLabel" aria-hidden="true">
|
|
|
|
<div class="modal-dialog" style="min-width:150px">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
<h4 class="modal-title" id="paymentRefundModalLabel">{{ trans('texts.refund_payment') }}</h4>
|
|
|
|
</div>
|
|
|
|
|
2017-02-18 22:20:03 +01:00
|
|
|
<div class="container" style="width: 100%; padding-bottom: 0px !important">
|
2017-03-26 10:45:17 +02:00
|
|
|
<div class="panel panel-default">
|
2017-02-18 22:20:03 +01:00
|
|
|
<div class="panel-body">
|
2017-02-09 11:46:58 +01:00
|
|
|
<div class="form-horizontal">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="refundAmount" class="col-sm-offset-2 col-sm-2 control-label">{{ trans('texts.amount') }}</label>
|
|
|
|
<div class="col-sm-4">
|
|
|
|
<div class="input-group">
|
|
|
|
<span class="input-group-addon" id="refundCurrencySymbol"></span>
|
2017-02-09 13:34:26 +01:00
|
|
|
<input type="number" class="form-control" id="refundAmount" name="refund_amount" step="0.01" min="0.01" placeholder="{{ trans('texts.amount') }}">
|
2017-02-09 11:46:58 +01:00
|
|
|
</div>
|
|
|
|
<div class="help-block">{{ trans('texts.refund_max') }} <span id="refundMax"></span></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-02-18 22:20:03 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-02-09 11:46:58 +01:00
|
|
|
|
2017-02-20 11:27:26 +01:00
|
|
|
<div class="modal-footer" style="margin-top: 2px">
|
2017-02-09 11:46:58 +01:00
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.cancel') }}</button>
|
|
|
|
<button type="button" class="btn btn-primary" id="completeRefundButton">{{ trans('texts.refund') }}</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
var paymentId = null;
|
|
|
|
function showRefundModal(id, amount, formatted, symbol) {
|
|
|
|
paymentId = id;
|
|
|
|
$('#refundCurrencySymbol').text(symbol);
|
|
|
|
$('#refundMax').text(formatted);
|
|
|
|
$('#refundAmount').val(amount).attr('max', amount);
|
|
|
|
$('#paymentRefundModal').modal('show');
|
|
|
|
}
|
|
|
|
|
|
|
|
function handleRefundClicked(){
|
|
|
|
submitForm_payment('refund', paymentId);
|
|
|
|
}
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
$('#completeRefundButton').click(handleRefundClicked);
|
|
|
|
})
|
|
|
|
|
|
|
|
</script>
|