From b36bd41783e229c52a9a7a41bb5703fd9613dd61 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 12 Jan 2024 15:30:03 +0700 Subject: [PATCH] add: enable password field for PDF imports --- basxbread/contrib/customforms/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basxbread/contrib/customforms/views.py b/basxbread/contrib/customforms/views.py index fb589475..306fe4f1 100644 --- a/basxbread/contrib/customforms/views.py +++ b/basxbread/contrib/customforms/views.py @@ -92,7 +92,7 @@ def formview(request, pk): def pdfimportview(request, pk): class UploadForm(forms.Form): importfile = forms.FileField(required=False) - password = forms.CharField(required=False) + password = forms.CharField(required=False, label=_("PDF password")) form = UploadForm() pdfimporter = get_object_or_404(models.PDFImport, pk=pk) @@ -169,6 +169,7 @@ def custom_layout(layout): layout.forms.Form( form, layout.forms.FormField("importfile"), + layout.forms.FormField("password"), layout.forms.helpers.Submit(label=_("Import")), ), )