aboutsummaryrefslogtreecommitdiffstats
path: root/servo/templates/form_field_snippet.html
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-08-04 10:11:24 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-08-04 10:11:24 +0300
commit63b0fc6269b38edf7234b9f151b80d81f614c0a3 (patch)
tree555de3068f33f8dddb4619349bbea7d9b7c822fd /servo/templates/form_field_snippet.html
downloadServo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.gz
Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.bz2
Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.zip
Initial commit
First public commit
Diffstat (limited to 'servo/templates/form_field_snippet.html')
-rwxr-xr-xservo/templates/form_field_snippet.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/servo/templates/form_field_snippet.html b/servo/templates/form_field_snippet.html
new file mode 100755
index 0000000..c4d1ab7
--- /dev/null
+++ b/servo/templates/form_field_snippet.html
@@ -0,0 +1,30 @@
+{% load i18n %}
+{% load servo_tags %}
+<div class="control-group{% for e in field.errors %} error{% endfor %} {{ classes }}">
+{% if field|widget_is:"CheckboxInput" %}
+ <div class="controls">
+ <label class="checkbox" for="{{ field.id }}">
+ {{ field }} {% trans field.label %}
+ {% if field.help_text %}
+ <span class="help-block">{% trans field.help_text %}</span>
+ {% endif %}
+ </label>
+ </div>
+{% elif field|widget_is:"CheckboxSelectMultiple" %}
+ <label class="control-label {{ field.css_classes }}">{% trans field.label %}</label>
+ <div class="controls">
+ {{ field }}
+ </div>
+{% else %}
+ <label class="control-label {{ field.css_classes }}" for="{{ field.id }}">{% trans field.label %}</label>
+ <div class="controls">
+ {{ field }}
+ {% if field.help_text %}
+ <span class="help-block">{% trans field.help_text %}</span>
+ {% endif %}
+ {% for e in field.errors %}
+ <span class="help-inline">{{ e }}</span>
+ {% endfor %}
+ </div>
+{% endif %}
+</div>