diff --git a/backup/static/backup/backup.js b/backup/static/backup/backup.js index 1500147a8..83ac2daec 100755 --- a/backup/static/backup/backup.js +++ b/backup/static/backup/backup.js @@ -2049,6 +2049,56 @@ app.controller('backupPlanNowOneClick', function ($scope, $http, $window) { $scope.cyberpanelLoading = true; $scope.sftpHide = true; $scope.localHide = true; + $scope.verificationCodeSent = false; + $scope.emailVerified = false; + + $scope.sendVerificationCode = function() { + $scope.cyberpanelLoading = true; + + $http.post('https://platform.cyberpersons.com/Billing/SendBackupVerificationCode', { + email: $scope.verificationEmail + }).then(function(response) { + if (response.data.status == 1) { + $scope.verificationCodeSent = true; + } else { + alert(response.data.error_message); + } + $scope.cyberpanelLoading = false; + }); + }; + + $scope.verifyCode = function() { + $scope.cyberpanelLoading = true; + + $http.post('https://platform.cyberpersons.com/Billing/VerifyBackupCode', { + email: $scope.verificationEmail, + code: $scope.verificationCode + }).then(function(response) { + if (response.data.status == 1) { + $scope.emailVerified = true; + // Fetch backup plans after successful verification + $scope.fetchBackupPlans(); + } else { + alert(response.data.error_message); + } + $scope.cyberpanelLoading = false; + }); + }; + + $scope.fetchBackupPlans = function() { + $scope.cyberpanelLoading = true; + + $http.post('https://platform.cyberpersons.com/Billing/FetchBackupPlans', { + email: $scope.verificationEmail + }).then(function(response) { + if (response.data.status == 1) { + $scope.plans = response.data.plans; + } else { + alert(response.data.error_message); + } + $scope.cyberpanelLoading = false; + }); + }; $scope.BuyNowBackupP = function (planName, monthlyPrice, yearlyPrice, months) { diff --git a/backup/templates/backup/oneClickBackups.html b/backup/templates/backup/oneClickBackups.html index 902572294..0828ebb27 100755 --- a/backup/templates/backup/oneClickBackups.html +++ b/backup/templates/backup/oneClickBackups.html @@ -5,7 +5,6 @@ {% load static %} - {% get_current_language as LANGUAGE_CODE %} @@ -22,160 +21,183 @@
- You have successfully purchased a backup plan.
+{% trans "Please enter the email address used for your backup subscription to access your backup plans." %}
Your purchase was not successful.
{{ message }} + +| {% trans "Account" %} | -{% trans "Plan Name" %} | -{% trans "Subscription" %} | -{% trans "Billing Cycle" %} | -{% trans "Purchase Date" %} | -{% trans "Actions" %} | -
|---|
-
+ | {% trans "Plan Name" %} | -{% trans "Monthly Price" %} | -{% trans "Yearly Price" %} | -{% trans "Actions" %} | -
|---|
| {{ plan.name }} | -${{ plan.monthlyPrice }} | -${{ plan.yearlyPrice }} | -- {% if plan.name != '100GB' %} - - {% endif %} - - {% if plan.name != '100GB' %} - - {% endif %} - - | - +{% trans "Plan Name" %} | +{% trans "Monthly Price" %} | +{% trans "Yearly Price" %} | +{% trans "Actions" %} |
|---|