69 lines
2.2 KiB
PHP
69 lines
2.2 KiB
PHP
<div class="panel-heading">
|
|
<h6><b>Generate Coupons</b> </h6>
|
|
</div>
|
|
<form name="resonform">
|
|
<div class="table-responsive">
|
|
<table class="table">
|
|
<tbody>
|
|
<tr>
|
|
<td >
|
|
<table class="table">
|
|
<tr>
|
|
<td>
|
|
<select class="form-select" name="amount" id="amount">
|
|
<option value="1000">1000 Naira</option>
|
|
<option value="5000">5000 Naira</option>
|
|
<option value="10000">10,000 Naira</option>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<select class="form-select" name="quantity" id="quantity">
|
|
<option value="10">10 Coupons</option>
|
|
<option value="20">20 Coupons</option>
|
|
<option value="40">40 Coupons</option>
|
|
</select>
|
|
</td>
|
|
<td style="width: 80px;">
|
|
<button id='acc<?=$page_id?>' class="btn btn-info" onclick="generateCoupons();">Generate</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td >
|
|
<div id="reason_msg"></div>
|
|
------
|
|
</td>
|
|
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<script type="text/javascript">
|
|
<!--
|
|
|
|
function generateCoupons() {
|
|
|
|
var amount = document.getElementById('amount').value;
|
|
var quantity = document.getElementById('quantity').value;
|
|
|
|
//alert(amount);
|
|
|
|
$('#reason_msg').html('Processing...');
|
|
//$('#acc' + page_id).prop('disabled', true);
|
|
$.ajax({
|
|
url: "/confg/addCoupons?amount=" + amount + "&quantity=" + quantity
|
|
}).done(function (data) {
|
|
$('#reason_msg').html(data);
|
|
// $('#acc' + page_id).prop('disabled', false);
|
|
});
|
|
return false;
|
|
}
|
|
|
|
// -->
|
|
</script> |