mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 19:06:59 -05:00
Sticks the level submission data into the contact form's message attribute
This commit is contained in:
parent
8347c8247f
commit
42efe6264b
1 changed files with 6 additions and 2 deletions
|
@ -32,9 +32,13 @@ module.exports = class ArtisanGuideModal extends ModalView
|
||||||
levelSubmit: ->
|
levelSubmit: ->
|
||||||
@playSound 'menu-button-click'
|
@playSound 'menu-button-click'
|
||||||
forms.clearFormAlerts @$el
|
forms.clearFormAlerts @$el
|
||||||
contactMessage = forms.formToObject @$el
|
results = forms.formToObject @$el
|
||||||
res = tv4.validateMultiple contactMessage, contactSchema
|
res = tv4.validateMultiple results, contactSchema
|
||||||
return forms.applyErrorsToForm @$el, res.errors unless res.valid
|
return forms.applyErrorsToForm @$el, res.errors unless res.valid
|
||||||
|
contactMessage = {message:"""Name: #{results.creditName}
|
||||||
|
Purpose: #{results.levelPurpose}
|
||||||
|
Inspiration: #{results.levelInspiration}
|
||||||
|
Location: #{results.levelLocation}"""}
|
||||||
@populateBrowserData contactMessage
|
@populateBrowserData contactMessage
|
||||||
contactMessage = _.merge contactMessage, @options
|
contactMessage = _.merge contactMessage, @options
|
||||||
contactMessage.country = me.get('country')
|
contactMessage.country = me.get('country')
|
||||||
|
|
Loading…
Reference in a new issue