Drop template includes

This commit is contained in:
Tom Christie 2014-10-15 10:04:01 +01:00
parent faa5bd9f53
commit e558f806c0
22 changed files with 62 additions and 30 deletions

View File

@ -1 +0,0 @@
name="{{ field.name }}" {% if field.style.placeholder %}placeholder="{{ field.style.placeholder }}"{% endif %} {% if field.style.rows %}rows="{{ field.style.rows }}"{% endif %}

View File

@ -1,7 +1,9 @@
<div class="form-group"> <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"> <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 %} {% if field.help_text %}<p class="help-block">{{ field.help_text }}</p>{% endif %}
</div> </div>
</div> </div>

View File

@ -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 %}

View File

@ -1,5 +1,7 @@
<div class="form-group"> <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"> <div class="col-sm-10">
<select class="form-control" name="{{ field.name }}"> <select class="form-control" name="{{ field.name }}">
{% for key, text in field.choices.items %} {% for key, text in field.choices.items %}

View File

@ -1,5 +1,7 @@
<div class="form-group"> <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"> <div class="col-sm-10">
{% if field.style.inline %} {% if field.style.inline %}
{% for key, text in field.choices.items %} {% for key, text in field.choices.items %}

View File

@ -1,5 +1,7 @@
<div class="form-group"> <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"> <div class="col-sm-10">
<select multiple class="form-control" name="{{ field.name }}"> <select multiple class="form-control" name="{{ field.name }}">
{% for key, text in field.choices.items %} {% for key, text in field.choices.items %}

View File

@ -1,5 +1,7 @@
<div class="form-group"> <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"> <div class="col-sm-10">
{% if field.style.inline %} {% if field.style.inline %}
{% for key, text in field.choices.items %} {% for key, text in field.choices.items %}

View File

@ -1,7 +1,9 @@
<div class="form-group"> <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"> <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 %} {% if field.help_text %}<p class="help-block">{{ field.help_text }}</p>{% endif %}
</div> </div>
</div> </div>

View File

@ -1,4 +1,6 @@
<div class="form-group"> <div class="form-group">
{% include "rest_framework/fields/inline/label.html" %} {% if field.label %}
<input type="{{ input_type }}" class="form-control" {% include "rest_framework/fields/attrs.html" %} {% if field.value %}value="{{ field.value }}"{% endif %}> <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> </div>

View File

@ -1 +0,0 @@
{% if field.label %}<label class="sr-only">{{ field.label }}</label>{% endif %}

View File

@ -1,5 +1,7 @@
<div class="form-group"> <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 }}"> <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> <option value="{{ key }}" {% if key == field.value %}selected{% endif %}>{{ text }}</option>

View File

@ -1,5 +1,7 @@
<div class="form-group"> <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 %} {% for key, text in field.choices.items %}
<div class="checkbox"> <div class="checkbox">
<label> <label>

View File

@ -1,5 +1,7 @@
<div class="form-group"> <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 }}"> <select multiple 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 in field.value %}selected{% endif %}>{{ text }}</option> <option value="{{ key }}" {% if key in field.value %}selected{% endif %}>{{ text }}</option>

View File

@ -1,5 +1,7 @@
<div class="form-group"> <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 %} {% for key, text in field.choices.items %}
<div class="radio"> <div class="radio">
<label> <label>

View File

@ -1,4 +1,6 @@
<div class="form-group"> <div class="form-group">
{% include "rest_framework/fields/inline/label.html" %} {% if field.label %}
<textarea class="form-control" {% include "rest_framework/fields/attrs.html" %}>{% if field.value %}{{ field.value }}{% endif %}</textarea> <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> </div>

View File

@ -1,5 +1,7 @@
<div class="form-group"> <div class="form-group">
{% include "rest_framework/fields/vertical/label.html" %} {% if field.label %}
<input type="{{ input_type }}" class="form-control" {% include "rest_framework/fields/attrs.html" %} {% if field.value %}value="{{ field.value }}"{% endif %}> <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 %} {% if field.help_text %}<p class="help-block">{{ field.help_text }}</p>{% endif %}
</div> </div>

View File

@ -1 +0,0 @@
{% if field.label %}<label {% if field.style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>{% endif %}

View File

@ -1,5 +1,7 @@
<div class="form-group"> <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 }}"> <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> <option value="{{ key }}" {% if key == field.value %}selected{% endif %}>{{ text }}</option>

View File

@ -1,5 +1,7 @@
<div class="form-group"> <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 %} {% if field.style.inline %}
<div> <div>
{% for key, text in field.choices.items %} {% for key, text in field.choices.items %}

View File

@ -1,5 +1,7 @@
<div class="form-group"> <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 }}"> <select multiple 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 in field.value %}selected{% endif %}>{{ text }}</option> <option value="{{ key }}" {% if key in field.value %}selected{% endif %}>{{ text }}</option>

View File

@ -1,5 +1,7 @@
<div class="form-group"> <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 %} {% if field.style.inline %}
<div> <div>
{% for key, text in field.choices.items %} {% for key, text in field.choices.items %}

View File

@ -1,5 +1,7 @@
<div class="form-group"> <div class="form-group">
{% include "rest_framework/fields/vertical/label.html" %} {% if field.label %}
<textarea class="form-control" {% include "rest_framework/fields/attrs.html" %}>{% if field.value %}{{ field.value }}{% endif %}</textarea> <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 %} {% if field.help_text %}<p class="help-block">{{ field.help_text }}</p>{% endif %}
</div> </div>