mirror of
https://github.com/ansible/awx.git
synced 2026-02-22 21:46:00 -03:30
remove Organization label from RHSM/Sat6 license form
This commit is contained in:
@@ -234,7 +234,6 @@ class ApiV2AttachView(APIView):
|
|||||||
def post(self, request):
|
def post(self, request):
|
||||||
data = request.data.copy()
|
data = request.data.copy()
|
||||||
pool_id = data.get('pool_id', None)
|
pool_id = data.get('pool_id', None)
|
||||||
# org = data.get('org', None) # if we want allow to user to specify the org, we will need to pass this
|
|
||||||
if not pool_id:
|
if not pool_id:
|
||||||
return Response({"error": _("No subscription pool ID provided.")}, status=status.HTTP_400_BAD_REQUEST)
|
return Response({"error": _("No subscription pool ID provided.")}, status=status.HTTP_400_BAD_REQUEST)
|
||||||
user = getattr(settings, 'SUBSCRIPTIONS_USERNAME', None)
|
user = getattr(settings, 'SUBSCRIPTIONS_USERNAME', None)
|
||||||
|
|||||||
@@ -72,11 +72,6 @@ export default
|
|||||||
$scope.subscriptionCreds.password = subscriptionCreds.SUBSCRIPTIONS_PASSWORD;
|
$scope.subscriptionCreds.password = subscriptionCreds.SUBSCRIPTIONS_PASSWORD;
|
||||||
$scope.showPlaceholderPassword = true;
|
$scope.showPlaceholderPassword = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subscriptionCreds.ORGANIZATION_ID && subscriptionCreds.ORGANIZATION_ID !== "") {
|
|
||||||
$scope.subscriptionCreds.organization_id = subscriptionCreds.ORGANIZATION_ID;
|
|
||||||
$scope.showPlaceholderPassword = true;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateSubscriptionCreds = (config) => {
|
const updateSubscriptionCreds = (config) => {
|
||||||
@@ -93,10 +88,6 @@ export default
|
|||||||
$scope.subscriptionCreds.password = data.SUBSCRIPTIONS_PASSWORD;
|
$scope.subscriptionCreds.password = data.SUBSCRIPTIONS_PASSWORD;
|
||||||
$scope.showPlaceholderPassword = true;
|
$scope.showPlaceholderPassword = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.ENTITLEMENT_CONSUMER && data.ENTITLEMENT_CONSUMER.org && data.ENTITLEMENT_CONSUMER.org !== "") {
|
|
||||||
$scope.subscriptionCreds.organization_id = data.ENTITLEMENT_CONSUMER.org;
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
initVars(config);
|
initVars(config);
|
||||||
});
|
});
|
||||||
@@ -194,7 +185,6 @@ export default
|
|||||||
payload.manifest = $scope.newLicense.manifest;
|
payload.manifest = $scope.newLicense.manifest;
|
||||||
} else if ($scope.selectedLicense.fullLicense) {
|
} else if ($scope.selectedLicense.fullLicense) {
|
||||||
payload.pool_id = $scope.selectedLicense.fullLicense.pool_id;
|
payload.pool_id = $scope.selectedLicense.fullLicense.pool_id;
|
||||||
payload.org = $scope.subscriptionCreds.organization_id;
|
|
||||||
attach = true;
|
attach = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,10 +140,6 @@
|
|||||||
<input id="rh-password" class="form-control Form-textInput" type="password" ng-model="subscriptionCreds.password" ng-disabled="!user_is_superuser || newLicense.file" />
|
<input id="rh-password" class="form-control Form-textInput" type="password" ng-model="subscriptionCreds.password" ng-disabled="!user_is_superuser || newLicense.file" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="License-rhCredField">
|
|
||||||
<label class="License-label d-block" translate>(OPTIONAL) ORGANIZATION LABEL</label>
|
|
||||||
<input class="form-control Form-textInput" type="text" ng-model="subscriptionCreds.organization_id" ng-disabled="!user_is_superuser || newLicense.file" />
|
|
||||||
</div>
|
|
||||||
<div class="License-getLicensesButton">
|
<div class="License-getLicensesButton">
|
||||||
<span ng-click="lookupLicenses()" class="btn btn-primary" ng-disabled="!subscriptionCreds.username || !subscriptionCreds.password" translate>GET LICENSES</button>
|
<span ng-click="lookupLicenses()" class="btn btn-primary" ng-disabled="!subscriptionCreds.username || !subscriptionCreds.password" translate>GET LICENSES</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -56,10 +56,6 @@ export default {
|
|||||||
subscriptionCreds.SUBSCRIPTIONS_PASSWORD = data.SUBSCRIPTIONS_PASSWORD;
|
subscriptionCreds.SUBSCRIPTIONS_PASSWORD = data.SUBSCRIPTIONS_PASSWORD;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.ENTITLEMENT_CONSUMER && data.ENTITLEMENT_CONSUMER.org && data.ENTITLEMENT_CONSUMER.org !== "") {
|
|
||||||
subscriptionCreds.ORGANIZATION_ID = data.ENTITLEMENT_CONSUMER.org;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subscriptionCreds;
|
return subscriptionCreds;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
Reference in New Issue
Block a user