mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 22:27:31 -05:00 
			
		
		
		
	Adjustments for autofill
This commit is contained in:
		
							parent
							
								
									63d0bbb9ae
								
							
						
					
					
						commit
						9b1cc121cd
					
				@ -76,7 +76,21 @@
 | 
			
		||||
@push('footer')
 | 
			
		||||
<script defer>
 | 
			
		||||
 
 | 
			
		||||
// $(function() {
 | 
			
		||||
$(function() {
 | 
			
		||||
 | 
			
		||||
document.getElementsByClassName("expiry")[0].addEventListener('change', function() {
 | 
			
		||||
 | 
			
		||||
str = document.getElementsByClassName("expiry")[0].value.replace(/\s/g, '');
 | 
			
		||||
const myArray = str.split("/");
 | 
			
		||||
 | 
			
		||||
document.getElementsByName('expiry-month')[0].value = myArray[0];
 | 
			
		||||
document.getElementsByName('expiry-year')[0].value = myArray[1];
 | 
			
		||||
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//  var myCard = $('#my-card');
 | 
			
		||||
//  myCard.EXPIRY_USE_DROPDOWNS = true;
 | 
			
		||||
 | 
			
		||||
@ -89,7 +103,7 @@
 | 
			
		||||
// document.getElementsByName('expiry-year')[0].setAttribute("autocompletetype", "cc-exp-year");
 | 
			
		||||
// document.getElementsByName('expiry-year')[0].setAttribute("autocomplete", "on");
 | 
			
		||||
 | 
			
		||||
// });
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
@endpush
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user