codecombat/app/core/contact.coffee

11 lines
391 B
CoffeeScript
Raw Normal View History

2014-01-03 13:32:13 -05:00
module.exports.sendContactMessage = (contactMessageObject, modal) ->
modal?.find('.sending-indicator').show()
jqxhr = $.post '/contact', contactMessageObject, (response) ->
return unless modal
modal.find('.sending-indicator').hide()
2014-06-30 22:16:26 -04:00
modal.find('#contact-message').val('Thanks!')
_.delay ->
2014-06-30 22:16:26 -04:00
modal.find('#contact-message').val('')
modal.modal 'hide'
, 1000