mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Drop template includes
This commit is contained in:
parent
faa5bd9f53
commit
e558f806c0
|
@ -1 +0,0 @@
|
|||
name="{{ field.name }}" {% if field.style.placeholder %}placeholder="{{ field.style.placeholder }}"{% endif %} {% if field.style.rows %}rows="{{ field.style.rows }}"{% endif %}
|
|
@ -1,7 +1,9 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/horizontal/label.html" %}
|
||||
{% if field.label %}
|
||||
<label class="col-sm-2 control-label {% if field.style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<div class="col-sm-10">
|
||||
<input type="{{ input_type }}" class="form-control" {% include "rest_framework/fields/attrs.html" %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
||||
<input name="{{ field.name }}" type="{{ input_type }}" class="form-control" {% if field.style.placeholder %}placeholder="{{ field.style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
||||
{% if field.help_text %}<p class="help-block">{{ field.help_text }}</p>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{% if field.label %}<label class="col-sm-2 control-label {% if field.style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>{% endif %}
|
|
@ -1,10 +1,12 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/horizontal/label.html" %}
|
||||
{% if field.label %}
|
||||
<label class="col-sm-2 control-label {% if field.style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" name="{{ field.name }}">
|
||||
{% for key, text in field.choices.items %}
|
||||
{% for key, text in field.choices.items %}
|
||||
<option value="{{ key }}" {% if key == field.value %}selected{% endif %}>{{ text }}</option>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/horizontal/label.html" %}
|
||||
{% if field.label %}
|
||||
<label class="col-sm-2 control-label {% if field.style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<div class="col-sm-10">
|
||||
{% if field.style.inline %}
|
||||
{% for key, text in field.choices.items %}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/horizontal/label.html" %}
|
||||
{% if field.label %}
|
||||
<label class="col-sm-2 control-label {% if field.style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<div class="col-sm-10">
|
||||
<select multiple class="form-control" name="{{ field.name }}">
|
||||
{% for key, text in field.choices.items %}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/horizontal/label.html" %}
|
||||
{% if field.label %}
|
||||
<label class="col-sm-2 control-label {% if field.style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<div class="col-sm-10">
|
||||
{% if field.style.inline %}
|
||||
{% for key, text in field.choices.items %}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/horizontal/label.html" %}
|
||||
{% if field.label %}
|
||||
<label class="col-sm-2 control-label {% if field.style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" {% include "rest_framework/fields/attrs.html" %}>{% if field.value %}{{ field.value }}{% endif %}</textarea>
|
||||
<textarea name="{{ field.name }}" class="form-control" {% if field.style.placeholder %}placeholder="{{ field.style.placeholder }}"{% endif %} {% if field.style.rows %}rows="{{ field.style.rows }}"{% endif %}>{% if field.value %}{{ field.value }}{% endif %}</textarea>
|
||||
{% if field.help_text %}<p class="help-block">{{ field.help_text }}</p>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/inline/label.html" %}
|
||||
<input type="{{ input_type }}" class="form-control" {% include "rest_framework/fields/attrs.html" %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
||||
{% if field.label %}
|
||||
<label class="sr-only">{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<input name="{{ field.name }}" type="{{ input_type }}" class="form-control" {% if field.style.placeholder %}placeholder="{{ field.style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
||||
</div>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{% if field.label %}<label class="sr-only">{{ field.label }}</label>{% endif %}
|
|
@ -1,5 +1,7 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/inline/label.html" %}
|
||||
{% if field.label %}
|
||||
<label class="sr-only">{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<select class="form-control" name="{{ field.name }}">
|
||||
{% for key, text in field.choices.items %}
|
||||
<option value="{{ key }}" {% if key == field.value %}selected{% endif %}>{{ text }}</option>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/inline/label.html" %}
|
||||
{% if field.label %}
|
||||
<label class="sr-only">{{ field.label }}</label>
|
||||
{% endif %}
|
||||
{% for key, text in field.choices.items %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/inline/label.html" %}
|
||||
{% if field.label %}
|
||||
<label class="sr-only">{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<select multiple class="form-control" name="{{ field.name }}">
|
||||
{% for key, text in field.choices.items %}
|
||||
<option value="{{ key }}" {% if key in field.value %}selected{% endif %}>{{ text }}</option>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/inline/label.html" %}
|
||||
{% if field.label %}
|
||||
<label class="sr-only">{{ field.label }}</label>
|
||||
{% endif %}
|
||||
{% for key, text in field.choices.items %}
|
||||
<div class="radio">
|
||||
<label>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/inline/label.html" %}
|
||||
<textarea class="form-control" {% include "rest_framework/fields/attrs.html" %}>{% if field.value %}{{ field.value }}{% endif %}</textarea>
|
||||
{% if field.label %}
|
||||
<label class="sr-only">{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<textarea name="{{ field.name }}" class="form-control" {% if field.style.placeholder %}placeholder="{{ field.style.placeholder }}"{% endif %} {% if field.style.rows %}rows="{{ field.style.rows }}"{% endif %}>{% if field.value %}{{ field.value }}{% endif %}</textarea>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/vertical/label.html" %}
|
||||
<input type="{{ input_type }}" class="form-control" {% include "rest_framework/fields/attrs.html" %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
||||
{% if field.label %}
|
||||
<label {% if field.style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<input name="{{ field.name }}" type="{{ input_type }}" class="form-control" {% if field.style.placeholder %}placeholder="{{ field.style.placeholder }}"{% endif %} {% if field.style.rows %}rows="{{ field.style.rows }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
||||
{% if field.help_text %}<p class="help-block">{{ field.help_text }}</p>{% endif %}
|
||||
</div>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{% if field.label %}<label {% if field.style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>{% endif %}
|
|
@ -1,5 +1,7 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/vertical/label.html" %}
|
||||
{% if field.label %}
|
||||
<label {% if field.style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<select class="form-control" name="{{ field.name }}">
|
||||
{% for key, text in field.choices.items %}
|
||||
<option value="{{ key }}" {% if key == field.value %}selected{% endif %}>{{ text }}</option>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/vertical/label.html" %}
|
||||
{% if field.label %}
|
||||
<label {% if field.style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
||||
{% endif %}
|
||||
{% if field.style.inline %}
|
||||
<div>
|
||||
{% for key, text in field.choices.items %}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/vertical/label.html" %}
|
||||
{% if field.label %}
|
||||
<label {% if field.style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<select multiple class="form-control" name="{{ field.name }}">
|
||||
{% for key, text in field.choices.items %}
|
||||
<option value="{{ key }}" {% if key in field.value %}selected{% endif %}>{{ text }}</option>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/vertical/label.html" %}
|
||||
{% if field.label %}
|
||||
<label {% if field.style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
||||
{% endif %}
|
||||
{% if field.style.inline %}
|
||||
<div>
|
||||
{% for key, text in field.choices.items %}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<div class="form-group">
|
||||
{% include "rest_framework/fields/vertical/label.html" %}
|
||||
<textarea class="form-control" {% include "rest_framework/fields/attrs.html" %}>{% if field.value %}{{ field.value }}{% endif %}</textarea>
|
||||
{% if field.label %}
|
||||
<label {% if field.style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
||||
{% endif %}
|
||||
<textarea name="{{ field.name }}" class="form-control" {% if field.style.placeholder %}placeholder="{{ field.style.placeholder }}"{% endif %} {% if field.style.rows %}rows="{{ field.style.rows }}"{% endif %}>{% if field.value %}{{ field.value }}{% endif %}</textarea>
|
||||
{% if field.help_text %}<p class="help-block">{{ field.help_text }}</p>{% endif %}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user