add paypar acc for nfc
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<div class="col-lg-4 col-md-4 col-sm-4" style="min-height:600px; max-height:600px; overflow-x:scroll">
|
||||
|
||||
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
|
||||
|
||||
<span class="patch_method"></span>
|
||||
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
||||
|
||||
@@ -15,6 +13,14 @@
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Paypar Account No:</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="paypar_account_no" name="customer[paypar_account_no]" readonly/>
|
||||
<div class="input-group-addon"><span class="fa fa-credit-card"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Salutation :</label><br>
|
||||
<label>Mr</label>
|
||||
@@ -107,11 +113,40 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.button :submit, "Submit",:class => 'btn btn-primary ', :id => 'submit_customer' %>
|
||||
<%= f.button :submit, "Update",:class => 'btn btn-primary ', :disabled =>'', :id => 'update_customer' %>
|
||||
<%= f.button :button, "Reset",:class => 'btn btn-danger ', :id => 'reset' %>
|
||||
</div>
|
||||
<%end%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sxModal">
|
||||
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
// Read Card Reader
|
||||
$("#paypar_account_no").on('focus', function(e){
|
||||
$("#sxModal").show();
|
||||
setTimeout(function(){
|
||||
getCardNo();
|
||||
$("#sxModal").hide();
|
||||
},100);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// Read NFC card no from java
|
||||
function getCardNo(){
|
||||
code2lab.readNFC();
|
||||
}
|
||||
|
||||
// get CardNo from Java
|
||||
function setCardNo(cardNo){
|
||||
if(cardNo.length == 16){
|
||||
$("#paypar_account_no").val(cardNo);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user