mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 19:49:18 +00:00
compose support ticket reply using markdown
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
erpnext.updates = [
|
erpnext.updates = [
|
||||||
|
["22nd November 2012", [
|
||||||
|
"Support Ticket: Compose a reply using Markdown",
|
||||||
|
]],
|
||||||
["21st November 2012", [
|
["21st November 2012", [
|
||||||
"Tree Report: Added missing expand / collapse buttons.",
|
"Tree Report: Added missing expand / collapse buttons.",
|
||||||
"List View: Do not show restricted records, as defined in Permission Manager.",
|
"List View: Do not show restricted records, as defined in Permission Manager.",
|
||||||
@@ -6,7 +9,7 @@ erpnext.updates = [
|
|||||||
"Customer Link Field: Show only ID in auto-suggest \
|
"Customer Link Field: Show only ID in auto-suggest \
|
||||||
if ID created using Customer Name (as defined in Global Defaults)",
|
if ID created using Customer Name (as defined in Global Defaults)",
|
||||||
"Letter Head: Fixed bug causing cursor position to reset in Content",
|
"Letter Head: Fixed bug causing cursor position to reset in Content",
|
||||||
],
|
]],
|
||||||
["20th November 2012", [
|
["20th November 2012", [
|
||||||
"Auto-suggest: Show main label in bold",
|
"Auto-suggest: Show main label in bold",
|
||||||
"Data Import Tool: Fixed #Name error faced by MS Excel users in import template",
|
"Data Import Tool: Fixed #Name error faced by MS Excel users in import template",
|
||||||
|
|||||||
@@ -36,16 +36,19 @@ class DocType(TransactionBase):
|
|||||||
if not self.doc.new_response:
|
if not self.doc.new_response:
|
||||||
webnotes.msgprint("Please write something as a response", raise_exception=1)
|
webnotes.msgprint("Please write something as a response", raise_exception=1)
|
||||||
|
|
||||||
|
import markdown2
|
||||||
|
self.doc.new_response = markdown2.markdown(self.doc.new_response)
|
||||||
|
|
||||||
subject = '[' + self.doc.name + '] ' + (self.doc.subject or 'No Subject Specified')
|
subject = '[' + self.doc.name + '] ' + (self.doc.subject or 'No Subject Specified')
|
||||||
|
|
||||||
response = self.doc.new_response + '\n\n[Please do not change the subject while responding.]'
|
response = self.doc.new_response + '<p>[Please do not change the subject while responding.]</p>'
|
||||||
|
|
||||||
# add last response to new response
|
# add last response to new response
|
||||||
response += self.last_response()
|
response += self.last_response()
|
||||||
|
|
||||||
signature = webnotes.conn.get_value('Email Settings',None,'support_signature')
|
signature = webnotes.conn.get_value('Email Settings',None,'support_signature')
|
||||||
if signature:
|
if signature:
|
||||||
response += '\n\n' + signature
|
response += '<p>' + signature + '</p>'
|
||||||
|
|
||||||
from webnotes.utils.email_lib import sendmail
|
from webnotes.utils.email_lib import sendmail
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user