Auto-disable button when sending email preview
This commit is contained in:
parent
29e023096b
commit
f17d7355e0
2 changed files with 4 additions and 5 deletions
|
@ -280,9 +280,7 @@ class EmailPreview(View):
|
|||
def email_template(self):
|
||||
recipient = self.request.POST.get('recipient')
|
||||
if recipient:
|
||||
keys = [key for key in self.request.POST.keys()
|
||||
if key.startswith('send_')]
|
||||
key = keys[0][5:] if keys else None
|
||||
key = self.request.POST.get('email_key')
|
||||
if key:
|
||||
email = mail.get_email(self.rattail_config, key)
|
||||
data = email.sample_data(self.request)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue