Only show plan selection UI for caas

This commit is contained in:
Johannes Zellner
2016-07-04 15:58:47 +02:00
parent 3f5d974c0c
commit fb5467d1cd
2 changed files with 8 additions and 5 deletions

View File

@@ -118,13 +118,13 @@
</div>
</div>
<div class="section-header" ng-show="user.admin">
<div class="section-header" ng-show="config.provider === 'caas' && user.admin">
<div class="text-left">
<h3>Plans</h3>
</div>
</div>
<div class="card" style="margin-bottom: 15px;" ng-show="user.admin">
<div class="card" style="margin-bottom: 15px;" ng-show="config.provider === 'caas' && user.admin">
<div class="row">
<div class="col-xs-10 plans" style="margin-left: 20px">
<div ng-repeat="plan in availablePlans">

View File

@@ -311,10 +311,13 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
Client.onReady(function () {
fetchBackups();
getPlans();
$scope.currentPlan = $scope.config.plan;
$scope.currency = $scope.config.currency === 'eur' ? '€' : '$';
if ($scope.config.provider === 'caas') {
getPlans();
$scope.currentPlan = $scope.config.plan;
$scope.currency = $scope.config.currency === 'eur' ? '€' : '$';
}
});
// setup all the dialog focus handling