Let feedback forms define their own email key
so multiple recipient options may be presented to user, e.g. in public frontend
This commit is contained in:
parent
8884d28306
commit
90af8f91b8
2 changed files with 6 additions and 2 deletions
|
@ -104,7 +104,8 @@ class CommonView(APIView):
|
|||
data['user_url'] = '#' # TODO: could get from config?
|
||||
|
||||
data['client_ip'] = self.request.client_addr
|
||||
send_email(self.rattail_config, self.feedback_email_key, data=data)
|
||||
email_key = data['email_key'] or self.feedback_email_key
|
||||
send_email(self.rattail_config, email_key, data=data)
|
||||
return {'ok': True}
|
||||
|
||||
return {'error': "Form did not validate!"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue