codecombat/app/views/modal/diplomat_suggestion_modal.coffee
2014-07-17 17:22:26 -07:00

18 lines
499 B
CoffeeScript

ModalView = require 'views/kinds/ModalView'
template = require 'templates/modal/diplomat_suggestion'
{me} = require 'lib/auth'
forms = require 'lib/forms'
module.exports = class DiplomatSuggestionView extends ModalView
id: 'diplomat-suggestion-modal'
template: template
events:
'click #subscribe-button': 'subscribeAsDiplomat'
subscribeAsDiplomat: ->
me.setEmailSubscription 'diplomatNews', true
me.patch()
$('#email_translator').prop('checked', 1)
@hide()
return