mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
25 lines
709 B
CoffeeScript
25 lines
709 B
CoffeeScript
ModalView = require 'views/core/ModalView'
|
|
template = require 'templates/core/diplomat-suggestion'
|
|
{me} = require 'core/auth'
|
|
forms = require 'core/forms'
|
|
|
|
module.exports = class DiplomatSuggestionModal 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()
|
|
noty {
|
|
text: $.i18n.t 'account_settings.saved'
|
|
layout: 'topCenter'
|
|
timeout: 5000
|
|
type: 'information'
|
|
}
|
|
Backbone.Mediator.publish 'router:navigate',
|
|
route: "/contribute/diplomat"
|