mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-07 10:34:46 -04:00
Clear NCES data if complete data is manually edited.
This commit is contained in:
parent
e64d585841
commit
8d61c4387d
1 changed files with 9 additions and 1 deletions
|
@ -20,6 +20,10 @@ module.exports = class RequestQuoteView extends RootView
|
|||
events:
|
||||
'change #request-form': 'onChangeRequestForm'
|
||||
'submit #request-form': 'onSubmitRequestForm'
|
||||
'change input[name="city"]': 'invalidateNCES'
|
||||
'change input[name="state"]': 'invalidateNCES'
|
||||
'change input[name="district"]': 'invalidateNCES'
|
||||
'change input[name="country"]': 'invalidateNCES'
|
||||
'click #email-exists-login-link': 'onClickEmailExistsLoginLink'
|
||||
'submit #signup-form': 'onSubmitSignupForm'
|
||||
'click #logout-link': -> me.logout()
|
||||
|
@ -39,6 +43,10 @@ module.exports = class RequestQuoteView extends RootView
|
|||
window.tracker?.trackEvent 'View Trial Request', category: 'Teachers', label: 'View Trial Request', ['Mixpanel']
|
||||
super()
|
||||
|
||||
invalidateNCES: ->
|
||||
for key in NCES_KEYS
|
||||
@$('input[name="nces_' + key + '"]').val ''
|
||||
|
||||
afterRender: ->
|
||||
super()
|
||||
|
||||
|
@ -82,7 +90,7 @@ module.exports = class RequestQuoteView extends RootView
|
|||
for key in NCES_KEYS
|
||||
@$('input[name="nces_' + key + '"]').val suggestion[key]
|
||||
|
||||
|
||||
@onChangeRequestForm()
|
||||
|
||||
onChangeRequestForm: ->
|
||||
# save changes to local storage
|
||||
|
|
Loading…
Add table
Reference in a new issue