Include attrs.html in form instance template

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-12-12 19:30:47 -04:00
parent 16e95ffc42
commit 3c5811dacb
2 changed files with 2 additions and 1 deletions

View File

@@ -53,7 +53,7 @@
{% if field|widget_type == 'checkboxinput' %}
<div class="checkbox">
<label>
<input {% if field.value %}checked="checked"{% endif %} name="{% if form.prefix %}{{ form.prefix }}-{% endif %}{{ field.name }}" type="checkbox">
<input {% if field.value %}checked="checked"{% endif %} name="{% if form.prefix %}{{ form.prefix }}-{% endif %}{{ field.name }}" type="checkbox" {% include 'django/forms/widgets/attrs.html' with widget=field.field.widget %} />
{% if not hide_labels %}{{ field.label }}{% if field.field.required and not read_only %} ({% trans 'required' %}){% endif %}{% endif %}
</label>
</div>

View File

@@ -55,6 +55,7 @@ INSTALLED_APPS = (
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.sites',
'django.forms',
# Allow using WhiteNoise in development
'whitenoise.runserver_nostatic',
'django.contrib.staticfiles',