codecombat/app/core/contact.coffee
Scott Erickson f0fa88206d Add Enrollment start/end dates, remove self-serve
* Refactor several related endpoints and views
* Redesign EnrollmentView, add TeacherContactModal
* Add "Enrollment Status" tab to TeacherClassView
* Delete PurchaseCoursesView and related files
* Style-flatten RemoveStudentModal
* Fix error handling in ActivateLicensesModal
* TeacherCoursesView loads faster by only loading course campaigns, and not load prepaids
2016-05-24 14:07:28 -07:00

19 lines
543 B
CoffeeScript

module.exports = {
sendContactMessage: (contactMessageObject, modal) ->
# deprecated
modal?.find('.sending-indicator').show()
return $.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
send: (options={}) ->
options.type = 'POST'
options.url = '/contact'
$.ajax(options)
}