MCPcopy Create free account
hub / github.com/codecombat/codecombat / constructor

Method constructor

app/views/teachers/RequestQuoteView.js:71–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69 getTitle () { return $.i18n.t('new_home.request_quote') }
70
71 constructor () {
72 super(...arguments)
73 this.trialRequest = new TrialRequest()
74 this.trialRequests = new TrialRequests()
75 this.trialRequests.fetchOwn()
76 this.supermodel.trackCollection(this.trialRequests)
77 this.formChanged = false
78 if (window.tracker) {
79 window.tracker.trackEvent('Teachers Request Demo Loaded', { category: 'Teachers' })
80 }
81 this.state = new State({
82 suggestedNameText: '...',
83 checkEmailState: 'standby', // 'checking', 'exists', 'available'
84 checkEmailValue: null,
85 checkEmailPromise: null,
86 checkNameState: 'standby', // same
87 checkNameValue: null,
88 checkNamePromise: null,
89 authModalInitialValues: {},
90 showUsaStateDropdown: true,
91 stateValue: null
92 })
93 this.countries = countryList.getNames()
94 this.usaStates = new UsaStates().states
95 this.usaStatesAbbreviations = new UsaStates().arrayOf('abbreviations')
96 this.listenTo(this.state, 'change:checkEmailState', function () { return this.renderSelectors('.email-check') })
97 this.listenTo(this.state, 'change:checkNameState', function () { return this.renderSelectors('.name-check') })
98 this.listenTo(this.state, 'change:error', function () { return this.renderSelectors('.error-area') })
99 this.listenTo(this.state, 'change:showUsaStateDropdown', function () { return this.renderSelectors('.state') })
100 this.listenTo(this.state, 'change:stateValue', function () { return this.renderSelectors('.state') })
101 }
102
103 onLeaveMessage () {
104 if (this.formChanged) {

Callers

nothing calls this directly

Calls 2

fetchOwnMethod · 0.80
trackEventMethod · 0.45

Tested by

no test coverage detected