added option to add status in Support Ticket created through website
This commit is contained in:
parent
3382aee301
commit
e47ceae4b0
@ -14,6 +14,7 @@ erpnext.send_message = function(opts) {
|
||||
cmd: "website.send_message",
|
||||
subject: opts.subject,
|
||||
sender: opts.sender,
|
||||
status: opts.status,
|
||||
message: typeof opts.message == "string"
|
||||
? opts.message
|
||||
: JSON.stringify(opts.message)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user