diff --git a/webadmin/src/index.html b/webadmin/src/index.html index b85e11bef..d05d93040 100644 --- a/webadmin/src/index.html +++ b/webadmin/src/index.html @@ -159,6 +159,28 @@ + + +
diff --git a/webadmin/src/js/main.js b/webadmin/src/js/main.js index e40b2c9da..5c1a6c1bd 100644 --- a/webadmin/src/js/main.js +++ b/webadmin/src/js/main.js @@ -32,17 +32,27 @@ angular.module('Application').controller('MainController', ['$scope', '$route', window.location.href = '/error.html'; }; + $scope.showUpdateModalFromVersion1Modal = function () { + $('#version1Modal').modal('hide'); + $('#updateModal').modal('show'); + }; + $scope.showUpdateModal = function (form) { + $scope.update.error.generic = null; + $scope.update.error.password = null; + $scope.update.password = ''; + + form.$setPristine(); + form.$setUntouched(); + + if ($scope.currentSubscription.plan && $scope.currentSubscription.plan.id === 'free') { - $('#setupSubscriptionModal').modal('show'); + if ($scope.config.update.box.version === '1.0.0') { + $('#version1Modal').modal('show'); + } else { + $('#setupSubscriptionModal').modal('show'); + } } else { - $scope.update.error.generic = null; - $scope.update.error.password = null; - $scope.update.password = ''; - - form.$setPristine(); - form.$setUntouched(); - $('#updateModal').modal('show'); } };