summaryrefslogtreecommitdiff
path: root/ishtar_common/widgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/widgets.py')
-rw-r--r--ishtar_common/widgets.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py
index 2bcc598bf..131051077 100644
--- a/ishtar_common/widgets.py
+++ b/ishtar_common/widgets.py
@@ -757,7 +757,6 @@ class JQueryAutoComplete(forms.TextInput):
)
else:
dynamic_limit.append("id_" + lim.replace("_", ""))
-
dct = {
"source": mark_safe(source),
"field_id": field_id,
@@ -765,6 +764,8 @@ class JQueryAutoComplete(forms.TextInput):
"modify": self.modify,
"dynamic_limit": dynamic_limit,
}
+ if self.attrs.get("autofocus", False):
+ dct["autofocus"] = True
if self.associated_model:
model_name = self.associated_model._meta.object_name.lower()
dct["model_name"] = model_name