Skip to content

Instantly share code, notes, and snippets.

@GaretJax
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save GaretJax/d8e86ecee79b3d12778e to your computer and use it in GitHub Desktop.

Select an option

Save GaretJax/d8e86ecee79b3d12778e to your computer and use it in GitHub Desktop.
{% load i18n standard_form %}
{% if input_type == 'radiocheck' %}
{% if not no_label %}<label class="empty">&nbsp;</label>{% endif %}
<div class="field">
<label>
{% if not no_error_text %}{% for error in field.errors %}<span class="text-error">{{ error }}</span> {% endfor %}{% endif %}
{% standard_widget field options custom_class=custom_class placeholder=placeholder input_type=input_type %}
{{ field.label }}{% if not no_required_helper and field.field.required %}<abbr title="{% trans 'required' %}">*</abbr>{% endif %}
{% if not no_help_text and field.help_text %}<span class="text-info">{{ field.help_text }}</span> {% endif %}
</label>
</div>
{% else %}
<div class="field {{ field_classes }}">
<label for="id_{{ field.html_name }}">{% if not no_label %}{{ field.label }}{% endif %}{% if not no_required_helper and field.field.required %}<abbr title="{% trans 'required' %}">*</abbr>{% endif %}</label>
{% if not no_error_text %}{% for error in field.errors %}<span class="text-error">{{ error }}</span> {% endfor %}{% endif %}
{% standard_widget field options custom_class=custom_class placeholder=placeholder input_type=input_type %}
{% if not no_help_text and field.help_text %}<span class="text-info">{{ field.help_text }}</span> {% endif %}
</div>
{% endif %}
@GaretJax

Copy link
Copy Markdown
Author

div.container {}
div.label-class label {}
div.input-class input {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment