support: Disable adding discount for fixed price plans.

Discount is applied relative to the price per license of our normal
plans. For fixed price plans, the concept of discount doesn't make
any sense since we manually assign a price for the entire realm
irrespective of the number of users in the realm.
This commit is contained in:
Vishnu KS 2020-12-02 20:19:24 +05:30 committed by Tim Abbott
parent 4b99f9e407
commit 023a33dc49
1 changed files with 5 additions and 0 deletions

View File

@ -64,8 +64,13 @@
<b>Discount (use 85 for nonprofits)</b>:<br> <b>Discount (use 85 for nonprofits)</b>:<br>
{{ csrf_input }} {{ csrf_input }}
<input type="hidden" name="realm_id" value="{{ realm.id }}" /> <input type="hidden" name="realm_id" value="{{ realm.id }}" />
{% if realm.current_plan and realm.current_plan.fixed_price %}
<input type="number" name="discount" value="{{ get_discount_for_realm(realm) }}" disabled>
<button type="submit" class="button rounded small support-submit-button" disabled>Update</button>
{% else %}
<input type="number" name="discount" value="{{ get_discount_for_realm(realm) }}" required> <input type="number" name="discount" value="{{ get_discount_for_realm(realm) }}" required>
<button type="submit" class="button rounded small support-submit-button">Update</button> <button type="submit" class="button rounded small support-submit-button">Update</button>
{% endif %}
</form> </form>
{% if realm.current_plan %} {% if realm.current_plan %}
<div class="current-plan-details"> <div class="current-plan-details">