mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 10:06:08 -05:00
10 lines
391 B
CoffeeScript
10 lines
391 B
CoffeeScript
module.exports.sendContactMessage = (contactMessageObject, modal) ->
|
|
modal?.find('.sending-indicator').show()
|
|
jqxhr = $.post '/contact', contactMessageObject, (response) ->
|
|
return unless modal
|
|
modal.find('.sending-indicator').hide()
|
|
modal.find('#contact-message').val('Thanks!')
|
|
_.delay ->
|
|
modal.find('#contact-message').val('')
|
|
modal.modal 'hide'
|
|
, 1000
|