Explorar o código

got better logic and copy for upgrade annual plans, needs i18n next

Henry Oswald %!s(int64=12) %!d(string=hai) anos
pai
achega
e67d3889f9

+ 16 - 11
services/web/app/views/subscriptions/upgradeToAnnual.jade

@@ -10,17 +10,22 @@ block content
 						.page-header
 							h1.text-centered Move to Annual Billing
 						div(ng-hide="upgradeComplete")
-							span(ng-show="planName == 'student'")
-								| Upgarde from Student to Student Annual and save 20% equivilent to $19.2
-
-							span(ng-show="planName == 'collaborator'")
-								| Upgarde from Collaborator to Collaborator Annual and save 20% equivilent to $36
-
-
-							button.btn.btn-success(ng-click="completeAnnualUpgrade()", ng-disabled="inflight")
-								span(ng-show="inflight") #{translate("processing")}
-								span(ng-hide="inflight") Move to annual billing now
+							.row
+								div.col-md-12
+									| Change to Annual Billing and save 
+									strong 20% 
+									| equivilent to 
+									strong ${{yearlySaving}} 
+									| per year.
+							.row  
+									
+							.row
+								div.col-md-12
+									center
+										button.btn.btn-success(ng-click="completeAnnualUpgrade()", ng-disabled="inflight")
+											span(ng-show="inflight") #{translate("processing")}
+											span(ng-hide="inflight") Move to annual billing now
 						div(ng-show="upgradeComplete")
-							span Upgrade to annual Complete
+							h3  Annual billing enabled, #{translate("thank_you")}.
 
 

+ 7 - 2
services/web/public/coffee/main/annual-upgrade.coffee

@@ -5,8 +5,13 @@ define [
 
 		MESSAGES_URL = "/user/subscription/upgrade-annual"
 
-		$scope.upgradeComplete = false
-		
+		$scope.upgradeComplete = true
+		savings = 
+			student:"19.2"
+			collaborator:"36"
+		$scope.$watch $scope.planName, ->
+			$scope.yearlySaving = savings[$scope.planName]
+
 		$scope.completeAnnualUpgrade = ->
 			body = 
 				planName: $scope.planName