Merge pull request #6855 from jumpserver/pr@dev@ticket_notice_bug

fix: ticket_notice_bug
pull/6859/head
feng626 2021-09-14 22:33:42 +08:00 committed by GitHub
commit d14c5c58ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

View File

@ -13,13 +13,15 @@ EMAIL_TEMPLATE = '''
<div> <div>
<p> <p>
{title} {title}
<a href={ticket_detail_url}>
<strong>{ticket_detail_url_description}</strong>
</a>
</p> </p>
<div> <div>
{body} {body}
</div> </div>
<div>
<a href={ticket_detail_url}>
<strong>{ticket_detail_url_description}</strong>
</a>
</div>
</div> </div>
''' '''
@ -36,13 +38,12 @@ class BaseTicketMessage(UserMessage):
def get_text_msg(self) -> dict: def get_text_msg(self) -> dict:
message = """ message = """
{title}: {ticket_detail_url} -> {ticket_detail_url_description} {title}: {ticket_detail_url}
{body} {body}
""".format( """.format(
title=self.content_title, title=self.content_title,
ticket_detail_url=self.ticket_detail_url, ticket_detail_url=self.ticket_detail_url,
ticket_detail_url_description=_('click here to review'), body=self.ticket.body.replace('<div style="margin-left: 20px;">', '').replace('</div>', '')
body=self.ticket.body
) )
return { return {
'subject': self.subject, 'subject': self.subject,