Skip to content

Commit 190cf6b

Browse files
committed
Pass with_forms to leaflet_draw_i18n template
1 parent 347f902 commit 190cf6b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

leaflet/templatetags/leaflet_tags.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ def leaflet_map(name, callback=None, fitextent=True, creatediv=True,
116116
}
117117

118118

119-
@register.inclusion_tag('leaflet/leaflet_draw_i18n.html')
120-
def leaflet_draw_i18n():
119+
@register.inclusion_tag('leaflet/leaflet_draw_i18n.html', takes_context=True)
120+
def leaflet_draw_i18n(context):
121121
return {
122122
"Control_ResetView_TITLE": _("Reset view"),
123-
# with_forms
123+
"with_forms": context["with_forms"],
124124
"draw_toolbar_actions_title": _("Cancel drawing"),
125125
"draw_toolbar_actions_text": _("Cancel"),
126126
"draw_toolbar_undo_title": _("Delete last point drawn"),

0 commit comments

Comments
 (0)