s/InvoiceNagForm/InvoiceEmailForm/
This commit is contained in:
parent
06fe8a8ffa
commit
479bdd36a3
2 changed files with 3 additions and 3 deletions
|
@ -413,7 +413,7 @@ def staff_products_formset_factory(user):
|
|||
return forms.formset_factory(form_type)
|
||||
|
||||
|
||||
class InvoiceNagForm(forms.Form):
|
||||
class InvoiceEmailForm(forms.Form):
|
||||
|
||||
ACTION_PREVIEW = 1
|
||||
ACTION_SEND = 2
|
||||
|
|
|
@ -932,7 +932,7 @@ def nag_unpaid(request):
|
|||
category = request.GET.getlist("category", [])
|
||||
product = request.GET.getlist("product", [])
|
||||
|
||||
form = forms.InvoiceNagForm(
|
||||
form = forms.InvoiceEmailForm(
|
||||
request.POST or None,
|
||||
category=category,
|
||||
product=product,
|
||||
|
@ -954,7 +954,7 @@ def nag_unpaid(request):
|
|||
recipient_list = [invoice.user.email]
|
||||
emails.append(Email(subject, body, from_email, recipient_list))
|
||||
|
||||
if form.cleaned_data["action"] == forms.InvoiceNagForm.ACTION_SEND:
|
||||
if form.cleaned_data["action"] == forms.InvoiceEmailForm.ACTION_SEND:
|
||||
# Send e-mails *ONLY* if we're sending.
|
||||
send_mass_mail(emails)
|
||||
messages.info(request, "The e-mails have been sent.")
|
||||
|
|
Loading…
Reference in a new issue