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",
|
cmd: "website.send_message",
|
||||||
subject: opts.subject,
|
subject: opts.subject,
|
||||||
sender: opts.sender,
|
sender: opts.sender,
|
||||||
|
status: opts.status,
|
||||||
message: typeof opts.message == "string"
|
message: typeof opts.message == "string"
|
||||||
? opts.message
|
? opts.message
|
||||||
: JSON.stringify(opts.message)
|
: JSON.stringify(opts.message)
|
||||||
|
@ -11,12 +11,12 @@ max_tickets_per_hour = 200
|
|||||||
@webnotes.whitelist(allow_guest=True)
|
@webnotes.whitelist(allow_guest=True)
|
||||||
def send_message():
|
def send_message():
|
||||||
from webnotes.model.doc import Document
|
from webnotes.model.doc import Document
|
||||||
args = webnotes.form_dict
|
|
||||||
|
|
||||||
d = Document('Support Ticket')
|
d = Document('Support Ticket')
|
||||||
d.subject = webnotes.form_dict.get('subject', 'Website Query')
|
d.subject = webnotes.form_dict.get('subject', 'Website Query')
|
||||||
d.description = webnotes.form_dict.get('message')
|
d.description = webnotes.form_dict.get('message')
|
||||||
d.raised_by = webnotes.form_dict.get('sender')
|
d.raised_by = webnotes.form_dict.get('sender')
|
||||||
|
d.status = webnotes.form_dict.get("status") or "Open"
|
||||||
|
|
||||||
if not d.description:
|
if not d.description:
|
||||||
webnotes.response["message"] = 'Please write something'
|
webnotes.response["message"] = 'Please write something'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user