forked from encode/django-rest-framework
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable HTML inputs for dict/list fields (encode#5702)
- Loading branch information
Ryan P Kilby
authored and
Pierre Chiquet
committed
Mar 24, 2020
1 parent
5751d58
commit 2c5476e
Showing
7 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
rest_framework/templates/rest_framework/horizontal/dict_field.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="form-group"> | ||
{% if field.label %} | ||
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}"> | ||
{{ field.label }} | ||
</label> | ||
{% endif %} | ||
|
||
<div class="col-sm-10"> | ||
<p class="form-control-static">Dictionaries are not currently supported in HTML input.</p> | ||
</div> | ||
</div> |
11 changes: 11 additions & 0 deletions
11
rest_framework/templates/rest_framework/horizontal/list_field.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="form-group"> | ||
{% if field.label %} | ||
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}"> | ||
{{ field.label }} | ||
</label> | ||
{% endif %} | ||
|
||
<div class="col-sm-10"> | ||
<p class="form-control-static">Lists are not currently supported in HTML input.</p> | ||
</div> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
rest_framework/templates/rest_framework/inline/dict_field.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="form-group"> | ||
{% if field.label %} | ||
<label class="sr-only"> | ||
{{ field.label }} | ||
</label> | ||
{% endif %} | ||
|
||
<p class="form-control-static">Dictionaries are not currently supported in HTML input.</p> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
rest_framework/templates/rest_framework/inline/list_field.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="form-group"> | ||
{% if field.label %} | ||
<label class="sr-only"> | ||
{{ field.label }} | ||
</label> | ||
{% endif %} | ||
|
||
<p class="form-control-static">Lists are not currently supported in HTML input.</p> | ||
</div> |
7 changes: 7 additions & 0 deletions
7
rest_framework/templates/rest_framework/vertical/dict_field.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div class="form-group"> | ||
{% if field.label %} | ||
<label {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label> | ||
{% endif %} | ||
|
||
<p class="form-control-static">Dictionaries are not currently supported in HTML input.</p> | ||
</div> |
7 changes: 7 additions & 0 deletions
7
rest_framework/templates/rest_framework/vertical/list_field.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div class="form-group"> | ||
{% if field.label %} | ||
<label {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label> | ||
{% endif %} | ||
|
||
<p class="form-control-static">Lists are not currently supported in HTML input.</p> | ||
</div> |