Malik Kashmiri
Malik Kashmiri

Reputation: 5851

API Management Portal Template Customization.

I am using Azure API Management Portal now for some reasons I want to disable Subscribe button from Product Page when User hit it to subscribe after the approval from the manager it will subscribe the product and subscribe button will be hide. Right Now when the user hit the subscribe button and its status is IsPending it still shows on the client side. Now tell me how I can achieve this thing.

Image 1

enter image description here

Upvotes: 0

Views: 137

Answers (1)

Anton Babadjanov
Anton Babadjanov

Reputation: 106

You can edit the template of the Product page to modify the behavior of the Subscribe button. At the bottom of that template you will find this:

{% if CannotAddBecauseSubscriptionNumberLimitReached %}
<b>{% localized "ProductDetailsStrings|TextblockSubscriptionLimitReached" %}</b>
{% elsif CannotAddBecauseMultipleSubscriptionsNotAllowed == false %}
<subscribe-button></subscribe-button>
{% endif %}

You can check if the SubscriptionState variable equals 3 then a request has been submitted and the button should not be shown.

All states of that variable are documented here: https://msdn.microsoft.com/en-us/library/azure/mt697541.aspx#Subscription

Upvotes: 2

Related Questions