Rushabh Mehta | 949496c | 2012-01-25 18:48:46 +0530 | [diff] [blame] | 1 | import json, webnotes |
| 2 | |
Rushabh Mehta | aa848be | 2012-02-17 12:06:33 +0530 | [diff] [blame] | 3 | @webnotes.whitelist(allow_guest=True) |
Rushabh Mehta | 949496c | 2012-01-25 18:48:46 +0530 | [diff] [blame] | 4 | def send(args): |
| 5 | """create support ticket""" |
| 6 | args = json.loads(args) |
| 7 | |
| 8 | from webnotes.model.doc import Document |
| 9 | d = Document('Support Ticket') |
| 10 | d.raised_by = args['email'] |
| 11 | d.description = 'From: ' + args['name'] + '\n\n' + args['message'] |
| 12 | d.subject = 'Website Query' |
| 13 | d.status = 'Open' |
| 14 | d.owner = 'Guest' |
| 15 | d.save(1) |
| 16 | webnotes.msgprint("Thank you for your query. We will respond as soon as we can.") |