Skip to content

Commit 5f38f3d

Browse files
committed
Fixed bug in datepicker template code
1 parent 0acee03 commit 5f38f3d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

bootstrap_toolkit/templates/bootstrap_toolkit/field_default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% if field.field.widget.bootstrap %}
2-
{% with bootstrap as field.field.widget.bootstrap %}
2+
{% with bootstrap=field.field.widget.bootstrap %}
33
{% with prepend=prepend|default:bootstrap.prepend|default:"" append=append|default:bootstrap.append|default:"" %}
44
{% include "bootstrap_toolkit/field_prepend_append.html" %}
55
{% endwith %}

bootstrap_toolkit/templates/bootstrap_toolkit/pagination.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<div class="pagination">
44
{% spaceless %}
55
<ul>
6-
<li class="prev{% if page.number == 1 %} disabled{% endif %}"><a href="?page=1">&larr; {% trans "First" %}</a></li>
6+
<li class="prev{% if page.number == 1 %} disabled{% endif %}"><a href="?page=1">&larr; {% trans "first"|capfirst %}</a></li>
77
{% for p in page.paginator.page_range %}
88
{% if p|add:5 >= page.number and p|add:-5 <= page.number %}
99
<li{% if p == page.number %} class="active"{% endif %}><a href="?page={{ p }}">{{ p }}</a></li>
1010
{% endif %}
1111
{% endfor %}
12-
<li class="next{% if page.number == page.paginator.num_pages %} disabled{% endif %}"><a href="?page={{ page.paginator.num_pages }}">{% trans "Last" %} &rarr;</a></li>
12+
<li class="next{% if page.number == page.paginator.num_pages %} disabled{% endif %}"><a href="?page={{ page.paginator.num_pages }}">{% trans "last"|capfirst %} &rarr;</a></li>
1313
</ul>
1414
{% endspaceless %}
1515
</div>

test_project/test_bootstrap/forms.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
from bootstrap_toolkit.widgets import BootstrapDateInput
44

55
class TestForm(forms.Form):
6+
date = forms.DateField(
7+
widget=BootstrapDateInput(),
8+
)
69
title = forms.CharField(
710
max_length=100,
811
help_text=u'This is the standard text input',

0 commit comments

Comments
 (0)