mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
22 lines
No EOL
478 B
CoffeeScript
22 lines
No EOL
478 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
App.controller "AnnualUpgradeController", ($scope, $http, $modal) ->
|
|
|
|
MESSAGES_URL = "/user/subscription/upgrade-annual"
|
|
|
|
$scope.upgradeComplete = false
|
|
|
|
$scope.completeAnnualUpgrade = ->
|
|
body =
|
|
planName: $scope.planName
|
|
_csrf : window.csrfToken
|
|
|
|
$scope.inflight = true
|
|
|
|
|
|
$http.post(MESSAGES_URL, body)
|
|
.success ->
|
|
$scope.upgradeComplete = true
|
|
.error ->
|
|
console.log "something went wrong changing plan" |