added option to add status in Support Ticket created through website

This commit is contained in:
Anand Doshi
2012-12-24 19:50:15 +05:30
parent 3382aee301
commit e47ceae4b0
2 changed files with 3 additions and 2 deletions

View File

@@ -11,13 +11,13 @@ max_tickets_per_hour = 200
@webnotes.whitelist(allow_guest=True)
def send_message():
from webnotes.model.doc import Document
args = webnotes.form_dict
d = Document('Support Ticket')
d.subject = webnotes.form_dict.get('subject', 'Website Query')
d.description = webnotes.form_dict.get('message')
d.raised_by = webnotes.form_dict.get('sender')
d.status = webnotes.form_dict.get("status") or "Open"
if not d.description:
webnotes.response["message"] = 'Please write something'
return