Only show request format dropdown when there are multiple formats

This commit is contained in:
Jeroen De Dauw 2014-08-21 04:43:44 +02:00
parent a1ec98376b
commit 83fc7d08bc

View File

@ -24,11 +24,13 @@
{% if 'json' in bodyFormats %}<option value="json"{{ defaultBodyFormat == 'json' ? ' selected' : '' }}>JSON</option>{% endif %} {% if 'json' in bodyFormats %}<option value="json"{{ defaultBodyFormat == 'json' ? ' selected' : '' }}>JSON</option>{% endif %}
</select> </select>
{% endif %} {% endif %}
{% if bodyFormats|length > 0 %}
request format: request format:
<select id="request_format"> <select id="request_format">
{% for format, header in requestFormats %} {% for format, header in requestFormats %}
<option value="{{ header }}"{{ defaultRequestFormat == format ? ' selected' : '' }}>{{ format }}</option> <option value="{{ header }}"{{ defaultRequestFormat == format ? ' selected' : '' }}>{{ format }}</option>
{% endfor %} {% endfor %}
{% endif %}
</select> </select>
{% if authentication %} {% if authentication %}
{% if authentication.delivery == 'http' and authentication.type == 'basic' %} {% if authentication.delivery == 'http' and authentication.type == 'basic' %}