Disable allocate IP button if the current number of floating IP is equal

or larger than the amount allowed by the quota.

Fix bug 1109098.

Change-Id: I0841da494252618aef8b20c7c67429fddd0278f4
This commit is contained in:
Brooklyn Chen
2013-02-01 17:10:44 +08:00
parent b6dac7c6c4
commit 11e16f88a7

View File

@@ -28,6 +28,6 @@
{% endblock %}
{% block modal-footer %}
<input class="btn btn-primary pull-right {% ifequal usages.floating_ips.used usages.floating_ips.quota %}disabled" type="button"{% else %}" type="submit"{% endifequal %} value="{% trans "Allocate IP" %}" />
<input class="btn btn-primary pull-right {% if usages.floating_ips.used >= usages.floating_ips.quota %}disabled" type="button"{% else %}" type="submit"{% endif %} value="{% trans "Allocate IP" %}" />
<a href="{% url horizon:project:access_and_security:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>
{% endblock %}