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

Method contact

app/views/core/ContactModal.js:54–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52 }
53
54 contact () {
55 this.playSound('menu-button-click')
56 forms.clearFormAlerts(this.$el)
57 let contactMessage = forms.formToObject(this.$el)
58 const res = tv4.validateMultiple(contactMessage, contactSchema)
59 if (!res.valid) { return forms.applyErrorsToForm(this.$el, res.errors) }
60 this.populateBrowserData(contactMessage)
61 contactMessage = _.merge(contactMessage, this.options)
62 contactMessage.country = me.get('country')
63 if (window.tracker != null) {
64 window.tracker.trackEvent('Sent Feedback', { message: contactMessage })
65 }
66 sendContactMessage(contactMessage, this.$el)
67 return $.post(`/db/user/${me.id}/track/contact_codecombat`)
68 }
69
70 populateBrowserData (context) {
71 if ($.browser) {

Callers

nothing calls this directly

Calls 4

populateBrowserDataMethod · 0.95
sendContactMessageFunction · 0.85
getMethod · 0.45
trackEventMethod · 0.45

Tested by

no test coverage detected