Browse Source

Merge pull request #912 from nabinhait/hotfix

Hotfix
version-14
Nabin Hait 10 years ago
parent
commit
1f994d31b8
1 changed files with 7 additions and 9 deletions
  1. +7
    -9
      frappe/core/doctype/communication/communication.py

+ 7
- 9
frappe/core/doctype/communication/communication.py View File

@@ -167,14 +167,12 @@ def set_portal_link(sent_via, comm):


footer = "" footer = ""


if is_signup_enabled() and hasattr(sent_via, "get_portal_page"):
portal_page = sent_via.get_portal_page()
if portal_page:
is_valid_recipient = cstr(sent_via.get("email") or sent_via.get("email_id") or
sent_via.get("contact_email")) in comm.recipients
if is_valid_recipient:
url = "%s/%s?name=%s" % (get_url(), portal_page, urllib.quote(sent_via.name))
footer = """<!-- Portal Link -->
<p><a href="%s" target="_blank">View this on our website</a></p>""" % url
if is_signup_enabled():
is_valid_recipient = cstr(sent_via.get("email") or sent_via.get("email_id") or
sent_via.get("contact_email")) in comm.recipients
if is_valid_recipient:
url = "%s/%s/%s" % (get_url(), urllib.quote(sent_via.doctype), urllib.quote(sent_via.name))
footer = """<!-- Portal Link -->
<p><a href="%s" target="_blank">View this on our website</a></p>""" % url


return footer return footer

Loading…
Cancel
Save