2012-01-25 13:18:46 +00:00
|
|
|
import json, webnotes
|
|
|
|
|
2012-02-13 11:20:52 +00:00
|
|
|
@webnotes.whitelist()
|
2012-01-25 13:18:46 +00:00
|
|
|
def send(args):
|
|
|
|
"""create support ticket"""
|
|
|
|
args = json.loads(args)
|
|
|
|
|
|
|
|
from webnotes.model.doc import Document
|
|
|
|
d = Document('Support Ticket')
|
|
|
|
d.raised_by = args['email']
|
|
|
|
d.description = 'From: ' + args['name'] + '\n\n' + args['message']
|
|
|
|
d.subject = 'Website Query'
|
|
|
|
d.status = 'Open'
|
|
|
|
d.owner = 'Guest'
|
|
|
|
d.save(1)
|
|
|
|
webnotes.msgprint("Thank you for your query. We will respond as soon as we can.")
|