Skip to content

Commit

Permalink
add: enable password field for PDF imports
Browse files Browse the repository at this point in the history
  • Loading branch information
saemideluxe committed Jan 12, 2024
1 parent 6a7d93e commit b36bd41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion basxbread/contrib/customforms/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")),
),
)

0 comments on commit b36bd41

Please sign in to comment.