mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 06:05:30 -05:00
Get free trial button working in share modal
This commit is contained in:
parent
be48ab2a30
commit
08f702a7c5
2 changed files with 10 additions and 1 deletions
|
@ -50,7 +50,10 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
|
||||||
) Share
|
) Share
|
||||||
div.text-center(ng-hide="canAddCollaborators")
|
div.text-center(ng-hide="canAddCollaborators")
|
||||||
p You need to upgrade your account to add more collaborators.
|
p You need to upgrade your account to add more collaborators.
|
||||||
a.btn.btn-info(href) Start Free Trial
|
p
|
||||||
|
a.btn.btn-info(href, ng-click="startFreeTrial()") Start Free Trial
|
||||||
|
p.small(ng-show="state.startedFreeTrial")
|
||||||
|
| Please refresh this page after starting your free trial.
|
||||||
|
|
||||||
.modal-footer
|
.modal-footer
|
||||||
.modal-footer-left
|
.modal-footer-left
|
||||||
|
|
|
@ -9,6 +9,7 @@ define [
|
||||||
$scope.state = {
|
$scope.state = {
|
||||||
error: null
|
error: null
|
||||||
inflight: false
|
inflight: false
|
||||||
|
startedFreeTrial: false
|
||||||
}
|
}
|
||||||
|
|
||||||
$modalInstance.opened.then () ->
|
$modalInstance.opened.then () ->
|
||||||
|
@ -52,6 +53,11 @@ define [
|
||||||
$scope.state.inflight = false
|
$scope.state.inflight = false
|
||||||
$scope.state.error = "Sorry, something went wrong :("
|
$scope.state.error = "Sorry, something went wrong :("
|
||||||
|
|
||||||
|
$scope.startFreeTrial = () ->
|
||||||
|
ga?('send', 'event', 'subscription-funnel', 'upgraded-free-trial', "projectMembers")
|
||||||
|
window.open("/user/subscription/plans")
|
||||||
|
$scope.state.startedFreeTrial = true
|
||||||
|
|
||||||
$scope.done = () ->
|
$scope.done = () ->
|
||||||
$modalInstance.close()
|
$modalInstance.close()
|
||||||
]
|
]
|
Loading…
Reference in a new issue