mirror of https://github.com/portainer/portainer
feat(support): make support type dynamic (#3621)
parent
a11a348893
commit
2c400eb3b4
|
@ -45,8 +45,8 @@
|
|||
</div>
|
||||
|
||||
<div style="margin-top: 10px; margin-bottom: 95px;">
|
||||
<label for="endpoint_count" class="col-sm-7 control-label text-left"
|
||||
style="margin-top: 7px;">Hosts</label>
|
||||
<label for="endpoint_count" class="col-sm-7 control-label text-left" style="margin-top: 7px;">No. of
|
||||
{{ state.supportType }}(s)</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="number" class="form-control" ng-model="formValues.hostCount" id="endpoint_count"
|
||||
placeholder="{{ state.placeholder }}" min="{{ state.minHosts }}">
|
||||
|
|
|
@ -8,7 +8,8 @@ angular.module('portainer.app')
|
|||
|
||||
$scope.state = {
|
||||
minHosts: 0,
|
||||
placeholder: 0
|
||||
placeholder: 0,
|
||||
supportType: ''
|
||||
};
|
||||
|
||||
$scope.isBuyButtonEnabled = function () {
|
||||
|
@ -22,16 +23,19 @@ angular.module('portainer.app')
|
|||
$scope.formValues.hostCount = 1;
|
||||
$scope.state.minHosts = 1;
|
||||
$scope.state.placeholder = 1;
|
||||
$scope.state.supportType = 'Person';
|
||||
}
|
||||
if ($scope.product.Id == 2 || $scope.product.Id == 3) {
|
||||
$scope.formValues.hostCount = 4;
|
||||
$scope.state.minHosts = 4;
|
||||
$scope.state.placeholder = 4;
|
||||
$scope.state.supportType = 'Host';
|
||||
}
|
||||
if ($scope.product.Id == 4 || $scope.product.Id == 5) {
|
||||
$scope.formValues.hostCount = 10;
|
||||
$scope.state.minHosts = 10;
|
||||
$scope.state.placeholder = 10;
|
||||
$scope.state.supportType = 'Host'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue