mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
24 lines
633 B
CoffeeScript
24 lines
633 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
|
|
App.controller 'UniverstiesContactController', ($scope, $modal) ->
|
|
|
|
$scope.form = {}
|
|
$scope.sent = false
|
|
$scope.sending = false
|
|
$scope.contactUs = ->
|
|
if !$scope.form.email?
|
|
console.log "email not set"
|
|
return
|
|
$scope.sending = true
|
|
params =
|
|
name: $scope.form.name || $scope.form.email
|
|
email: $scope.form.email
|
|
labels: $scope.form.source
|
|
message: "Please contact me with more details"
|
|
subject: $scope.form.subject
|
|
about : "#{$scope.form.position || ''} #{$scope.form.university || ''}"
|
|
|
|
Groove.createTicket params, (err, json)->
|
|
$scope.sent = true
|