{include file='admin/settings/header.html'}
<!-- Add PaymentTypes Button and Dialog Box -->
- <div id="newPaymentTypeButton" class="button button-primary glm-right">Add a PaymentType</div>
+ <div id="newPaymentTypeButton" class="button button-primary glm-right">Add a Payment Type</div>
<div id="newPaymentTypeDialog" class="glm-dialog-box" title="Enter a New PaymentType">
<form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data">
<input type="hidden" name="glm_action" value="paymentTypes">
<input type="hidden" name="option" value="addNew">
<table class="glm-admin-table">
<tr>
- <th class="glm-required">PaymentType Name:</th>
+ <th class="glm-required">Payment Type Name:</th>
<td>
<input type="text" name="name" class="glm-form-text-input" required>
</td>
</td>
</tr>
<tr>
- <th class="glm-required">Amount:</th>
+ <th class="glm-required">Amount:Numbers only (999.99)</th>
<td>
<input type="text" name="amount" class="glm-form-text-input" required>
</td>
<tr>
<th>Dynamic Amount:</th>
<td>
- <input type="checkbox" name="dynamic_amount" class="glm-form-text-input">
+ <input type="hidden" name="dynamic_amount" class="glm-form-text-input" value="0">
+ <input type="checkbox" name="dynamic_amount" class="glm-form-text-input" value="1">
</td>
</tr>
<tr>
</table>
<p><span class="glm-required">*</span> Required</p>
<a id="newPaymentTypeCancel" class="button button-primary glm-right">Cancel</a>
- <input type="submit" value="Add new PaymentType" class="button button-primary">
+ <input type="submit" value="Add new Payment Type" class="button button-primary">
</form>
</div>
<input id="editPaymentTypeID" type="hidden" name="id" value="">
<table class="glm-admin-table">
<tr>
- <th class="glm-required">PaymentType Name:</th>
+ <th class="glm-required">Payment Type Name:</th>
<td>
<input id="editPaymentTypeName" type="text" name="name" class="glm-form-text-input" required>
</td>
</td>
</tr>
<tr>
- <th class="glm-required">Dynamic Amount:</th>
+ <th>Dynamic Amount:</th>
<td>
- <input id="editPaymentTypeDynamicAmount" type="checkbox" name="dynamic_amount" class="glm-form-text-input">
+ <input type="hidden" name="dynamic_amount" class="glm-form-text-input" value="0">
+ <input id="editPaymentTypeDynamicAmount" type="checkbox" name="dynamic_amount" class="glm-form-text-input" value="1">
</td>
</tr>
<tr>
</table>
<p><span class="glm-required">*</span> Required</p>
<a id="editPaymentTypeCancel" class="button button-primary glm-right">Cancel</a>
- <input type="submit" value="Update this PaymentType">
+ <input type="submit" value="Update this Payment Type">
</form>
</div>
$("#newPaymentTypeDialog").dialog("open");
});
$('.editPaymentType').click( function() {
+ $('#editPaymentTypeDynamicAmount').prop( 'checked', false );
var paymentTypeID = $(this).data('paymenttypeid');
var paymentTypeName = $(this).data('paymenttypename');
$('#editPaymentTypeQCode').val( paymentTypeQCode );
$('#editPaymentTypeCategory').val( paymentTypeCategory );
$('#editPaymentTypeAmount').val( paymentTypeAmount );
- $('#editPaymentTypeDynamicAmount').val( paymentTypeDynamicAmount );
+ if ( paymentTypeDynamicAmount === 1 ) {
+ $('#editPaymentTypeDynamicAmount').prop( 'checked', true );
+ }
$('#editPaymentTypeNotes').val( paymentTypeNotes );
$("#editPaymentTypeDialog").dialog("open");