Skip to content

Commit 5f580ca

Browse files
committed
Remove class='form-control' for file inputs. Closes #2065.
1 parent 4e03518 commit 5f580ca

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

rest_framework/templates/rest_framework/horizontal/input.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>
44
{% endif %}
55
<div class="col-sm-10">
6-
<input name="{{ field.name }}" class="form-control" type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
6+
<input name="{{ field.name }}" {% if style.input_type != "file" %}class="form-control"{% endif %} type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
77
{% if field.errors %}
88
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
99
{% endif %}

rest_framework/templates/rest_framework/inline/input.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
{% if field.label %}
33
<label class="sr-only">{{ field.label }}</label>
44
{% endif %}
5-
<input name="{{ field.name }}" class="form-control" type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
5+
<input name="{{ field.name }}" {% if style.input_type != "file" %}class="form-control"{% endif %} type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
66
</div>

rest_framework/templates/rest_framework/vertical/input.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% if field.label %}
33
<label {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
44
{% endif %}
5-
<input name="{{ field.name }}" class="form-control" type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
5+
<input name="{{ field.name }}" {% if style.input_type != "file" %}class="form-control"{% endif %} type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
66
{% if field.errors %}
77
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
88
{% endif %}

0 commit comments

Comments
 (0)