X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/4cadef92cdc776f7da86edfd1bd3547f4d91c816..98b2c09ef1f1c8288a31517f61423264c6b3291c:/src/contact/widgets.py diff --git a/src/contact/widgets.py b/src/contact/widgets.py new file mode 100644 index 000000000..785e019fd --- /dev/null +++ b/src/contact/widgets.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from django import forms +from django.forms.util import flatatt +from django.utils.html import format_html + + +class HeaderWidget(forms.widgets.Widget): + def render(self, name, value, attrs=None): + attrs.update(self.attrs) + return format_html('', flatatt(attrs))