mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -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: ->
|
||||
@playSound 'menu-button-click'
|
||||
forms.clearFormAlerts @$el
|
||||
contactMessage = forms.formToObject @$el
|
||||
res = tv4.validateMultiple contactMessage, contactSchema
|
||||
results = forms.formToObject @$el
|
||||
res = tv4.validateMultiple results, contactSchema
|
||||
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
|
||||
contactMessage = _.merge contactMessage, @options
|
||||
contactMessage.country = me.get('country')
|
||||
|
|
Loading…
Reference in a new issue