Update Stripe's jquery.payment, and change KO field binding type

This uses `textInput` for better handling of text field operations like pasting and
autofill. This should allow for card numbers to be pasted in on payment forms.
spam
Anthony Johnson 2015-10-21 13:09:26 -07:00
parent 5c6c4af34f
commit 2ae3f787ea
4 changed files with 6 additions and 6 deletions

View File

@ -19,7 +19,7 @@
"readthedocs-client": "https://github.com/agjohnson/readthedocs-client-js.git",
"sphinx-rtd-theme": "https://github.com/snide/sphinx-rtd-theme.git#0.1.9",
"knockout": "~3.3.0",
"jquery.payment": "~1.2.3",
"jquery.payment": "~1.3.0",
"jquery-migrate": "~1.2.1",
"jquery-ui": "1.8.23"
},

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -82,7 +82,7 @@ class StripeModelForm(forms.ModelForm):
label=_('Card number'),
widget=forms.TextInput(attrs={
'data-bind': ('valueInit: cc_number, '
'value: cc_number, '
'textInput: cc_number, '
'''css: {'field-error': error_cc_number() != null}''')
}),
max_length=25,
@ -91,7 +91,7 @@ class StripeModelForm(forms.ModelForm):
label=_('Card expiration'),
widget=forms.TextInput(attrs={
'data-bind': ('valueInit: cc_expiry, '
'value: cc_expiry, '
'textInput: cc_expiry, '
'''css: {'field-error': error_cc_expiry() != null}''')
}),
max_length=10,
@ -100,7 +100,7 @@ class StripeModelForm(forms.ModelForm):
label=_('Card CVV'),
widget=forms.TextInput(attrs={
'data-bind': ('valueInit: cc_cvv, '
'value: cc_cvv, '
'textInput: cc_cvv, '
'''css: {'field-error': error_cc_cvv() != null}'''),
'autocomplete': 'off',
}),