From 04834bbea2984400b3a3d33ed4e32fc04affff1f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 6 Jul 2023 11:34:33 +0200 Subject: 🚧 work on autofocus fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_operations/widgets.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'archaeological_operations') diff --git a/archaeological_operations/widgets.py b/archaeological_operations/widgets.py index f2a2d3d66..7519bf0a8 100644 --- a/archaeological_operations/widgets.py +++ b/archaeological_operations/widgets.py @@ -66,6 +66,11 @@ class OAWidget(forms.TextInput): def render(self, name, value, attrs=None, renderer=None): if not value: value = "" + attrs.update(self.attrs) + if "class" not in attrs: + attrs["class"] = "widget-oa" + else: + attrs["class"] += " widget-oa" final_attrs = flatatt(self.build_attrs(attrs, {"name": name, "value": value})) oa_prefix = get_current_profile(force=False).operation_prefix or "" dct = { -- cgit v1.2.3