Skip to content

Commit 0c13b9d

Browse files
authored
Pass with_forms to leaflet_draw_i18n template (#387)
1 parent 8efe275 commit 0c13b9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

leaflet/templatetags/leaflet_tags.py

+3-3
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.get("with_forms", False),
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)