Compare commits
7 Commits
cleanup
...
fix-only-s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a3e31f021 | ||
|
|
9be8a1af0b | ||
|
|
b9cac20613 | ||
|
|
e6d5e6d37b | ||
|
|
0abfcac7da | ||
|
|
b70e8b9acc | ||
|
|
3b1e1aa3c3 |
@@ -30,10 +30,13 @@ class InviteRequest(Document):
|
|||||||
return user
|
return user
|
||||||
|
|
||||||
def send_email(self):
|
def send_email(self):
|
||||||
subject = _("Your request has been approved.")
|
site_name = "Mon.School"
|
||||||
|
subject = _("Welcome to {0}!").format(site_name)
|
||||||
|
|
||||||
args = {
|
args = {
|
||||||
"full_name": self.full_name,
|
"full_name": self.full_name,
|
||||||
"signup_form_link": "/new-sign-up?invite_code={0}".format(self.name),
|
"signup_form_link": "/new-sign-up?invite_code={0}".format(self.name),
|
||||||
|
"site_name": site_name,
|
||||||
"site_url": frappe.utils.get_url()
|
"site_url": frappe.utils.get_url()
|
||||||
}
|
}
|
||||||
frappe.sendmail(
|
frappe.sendmail(
|
||||||
@@ -42,7 +45,8 @@ class InviteRequest(Document):
|
|||||||
subject=subject,
|
subject=subject,
|
||||||
header=[subject, "green"],
|
header=[subject, "green"],
|
||||||
template = "lms_invite_request_approved",
|
template = "lms_invite_request_approved",
|
||||||
args=args)
|
args=args,
|
||||||
|
now=True)
|
||||||
|
|
||||||
@frappe.whitelist(allow_guest=True)
|
@frappe.whitelist(allow_guest=True)
|
||||||
def create_invite_request(invite_email):
|
def create_invite_request(invite_email):
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
<div>
|
<div>
|
||||||
{% set site_link = "<a href='" + site_url + "'>" + site_url + "</a>" %}
|
{% set site_link = "<a href='" + site_url + "'>" + site_name + "</a>" %}
|
||||||
<p>{{_("Dear Community Member,")}}</p>
|
<p>{{_("Hi,")}}</p>
|
||||||
<p>{{_("Your Invite Request to be a part of {0} has
|
<p>{{_("Welcome to {0}!").format(site_name)}}</p>
|
||||||
been approved.").format(site_link)}}</p>
|
<p>Click on the link below to complete your sign up and set a new password</p>
|
||||||
<p>Click on the link below to complete your Sign up and set a new password</p>
|
|
||||||
<p style="margin: 15px 0px;">
|
<p style="margin: 15px 0px;">
|
||||||
<a href="{{ signup_form_link }}" rel="nofollow" class="btn btn-primary">{{ _("Complete Sign Up") }}</a>
|
<a href="{{ signup_form_link }}" rel="nofollow" class="btn btn-primary">{{ _("Complete Sign Up") }}</a>
|
||||||
</p>
|
</p>
|
||||||
@@ -14,5 +13,5 @@
|
|||||||
</p>
|
</p>
|
||||||
<br>
|
<br>
|
||||||
<p>Thanks and Regards,</p>
|
<p>Thanks and Regards,</p>
|
||||||
<p>Your Community.</p>
|
<p>{{site_name}}</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -5,7 +5,7 @@ def get_context(context):
|
|||||||
context.courses = get_courses()
|
context.courses = get_courses()
|
||||||
|
|
||||||
def get_courses():
|
def get_courses():
|
||||||
course_names = frappe.get_all("LMS Course", pluck="name")
|
course_names = frappe.get_all("LMS Course", filters={"is_published": True}, pluck="name")
|
||||||
courses = []
|
courses = []
|
||||||
for course in course_names:
|
for course in course_names:
|
||||||
courses.append(frappe.get_doc("LMS Course", course))
|
courses.append(frappe.get_doc("LMS Course", course))
|
||||||
|
|||||||
Reference in New Issue
Block a user