Compare commits

..

11 Commits

Author SHA1 Message Date
Anand Chitipothu
7f371aa7a9 fix: remove references to old styles in the hooks
Old styles were removed in #157, but a reference to it was hanging
around in the hooks.
2021-07-19 17:40:30 +05:30
Rushabh Mehta
79eb381a41 Merge pull request #157 from rmehta/remove-old-styles
fix(cleanup): remove old styles
2021-07-19 17:19:54 +05:30
Rushabh Mehta
44f9c0dfd3 fix(minor): remove old styles 2021-07-19 17:14:52 +05:30
Jannat Patel
0ca4cd724e Merge pull request #156 from fossunited/fix-only-show-published-courses
fix: only show the published courses on All Courses page
2021-07-19 17:11:03 +05:30
Anand Chitipothu
8a3e31f021 fix: only show the published courses on All Courses page
Closes #155
2021-07-19 17:03:38 +05:30
Jannat Patel
9be8a1af0b Merge pull request #154 from fossunited/fix-invite-email
Fix invite email
2021-07-19 13:43:36 +05:30
Anand Chitipothu
b9cac20613 fix: the delay in sending signup email 2021-07-19 13:32:18 +05:30
Anand Chitipothu
e6d5e6d37b fix: "Hello None" in the signup email
We were trying to show the full_name, but invite request only knows the email.
2021-07-19 13:31:44 +05:30
Jannat Patel
0abfcac7da Merge pull request #153 from fossunited/improve-email-templates
fix: fixed the email message sent out on signup
2021-07-19 13:23:55 +05:30
Anand Chitipothu
b70e8b9acc fix: fixed the email message sent out on signup
Currently updated keeping Mon.School in mind.
2021-07-19 13:14:13 +05:30
Jannat Patel
3b1e1aa3c3 Merge pull request #152 from fossunited/cleanup
fix: Cleanup
2021-07-19 12:49:22 +05:30
6 changed files with 13 additions and 319 deletions

View File

@@ -19,7 +19,6 @@ app_license = "AGPL"
# app_include_js = "/assets/community/js/community.js"
# include js, css files in header of web template
web_include_css = "community.bundle.css"
# web_include_css = "/assets/community/css/community.css"
# web_include_js = "/assets/community/js/community.js"

View File

@@ -30,10 +30,13 @@ class InviteRequest(Document):
return user
def send_email(self):
subject = _("Your request has been approved.")
site_name = "Mon.School"
subject = _("Welcome to {0}!").format(site_name)
args = {
"full_name": self.full_name,
"signup_form_link": "/new-sign-up?invite_code={0}".format(self.name),
"site_name": site_name,
"site_url": frappe.utils.get_url()
}
frappe.sendmail(
@@ -42,7 +45,8 @@ class InviteRequest(Document):
subject=subject,
header=[subject, "green"],
template = "lms_invite_request_approved",
args=args)
args=args,
now=True)
@frappe.whitelist(allow_guest=True)
def create_invite_request(invite_email):

View File

@@ -1,4 +1,3 @@
@import "./style.css";
@import "./vars.css";
@import "./style.less";

View File

@@ -1,307 +0,0 @@
h2 {
margin: 20px 0px;
color: black;
}
.teaser {
background: white;
border-radius: 9px;
border: 1px solid #C4C4C4;
.teaser-body {
padding: 20px;
box-shadow: 0px 5px 10px rgb(0 0 0 / 10%)
}
.teaser-footer {
padding: 20px;
}
}
.sketch-teaser {
.teaser();
width: 220px;
margin-bottom: 30px;
margin-top: 30px;
svg {
width: 200px;
height: 200px;
}
.sketch-image {
padding: 10px;
}
.sketch-footer {
border-top: 1px solid#C4C4C4;
padding: 10px;
background: #F6F6F6;
border-radius: 0px 0px 10px 10px;
}
}
.course-teaser {
.teaser();
color: #444;
margin-bottom: 20px;
margin-top: 20px;
h3, h4 {
color: black;
font-weight: bold;
}
.course-body, .course-footer {
padding: 20px;
}
.course-body {
min-height: 8em;
}
.course-footer {
border-top: 1px solid #ddd;
}
a, a:hover {
color: inherit;
text-decoration: none;
}
}
.anchor_style {
color: inherit;
}
.anchor_style:hover {
text-decoration: none
}
section {
padding: 60px 0px;
}
section h2 {
margin-bottom: 40px;
font-size: 48px;
line-height: 58px;
font-weight: bold;
}
section.lightgray {
background: #F6F6F6;
}
#hero .jumbotron {
background: inherit;
}
.chapter-teaser {
.teaser();
color: #444;
margin: 20px 0px;
h3, h4 {
color: black;
font-weight: bold;
}
}
.field-width {
width: 40%;
display: inline-block;
}
.footer-grouped-links {
display: none;
}
.footer-info {
border-top: 0px;
margin-top: 0px;
.footer-col-right {
padding-top: 1.8rem;
}
}
.web-footer {
border-top: 1px solid #E2E6E9;
padding: 0px;
padding: 2rem 0px;
margin-top: 2rem;
}
.course-type {
text-transform: uppercase;
font-size: 1.0em;
font-weight: bold;
color: var(--tag-color);
}
.instructor-title {
color: black;
}
.instructor-subtitle {
font-size: 0.8em;
color: var(--text-color);
}
// .mentors-wrapper {
// .gray-section();
// }
.chapter-number {
background: var(--text-color);
color: white;
height: 24px;
min-width: 24px;
margin-right: 5px;
}
.sidebar {
background: var(--sidebar-bg);
border: 1px solid var(--sidebar-border);
margin: 20px 0px;
border-radius: 10px;
padding: 1px 20px 20px 20px;
}
.sidebar h3 {
margin-top: 20px;
color: black;
}
.sidebar-batch {
background: var(--sidebar-bg);
color: var(--text-color);
position: fixed;
left: 0;
height: 100%;
}
.sidebar-batch a {
padding: 16px 8px 8px 16px;
display: block;
}
.sidebar .notice {
margin-top: 10px;
padding: 10px;
border-radius: 10px;
border: 1px dashed var(--text-color);
}
.sidebar .notice a {
color: inherit;
text-decoration: underline;
}
// LiveCode editor
.livecode-editor {
.CodeMirror {
border: 1px solid #ddd;
background: #ffe;
height: auto;
}
.CodeMirror-scroll {
max-height: 310px;
min-height: 310px;
}
.controls {
padding: 10px 0px;
}
canvas {
border: 5px solid #ddd;
position: relative;
z-index: 0;
}
.output {
position: absolute;
z-index: 1;
width: 300px;
left: 0px;
top: 0px;
background-color: rgba(255, 255, 255, 0);
max-height: 300px;
white-space: pre-wrap;
word-wrap: break-word;
margin: 0px;
margin-left: 20px;
padding: 4px;
color: #888;
}
@media (max-width: 768px) {
.canvas-wrapper {
padding-top: 10px;
}
.code-wrapper {
min-height: 50px;
}
.CodeMirror {
min-height: 50px;
}
}
}
.sketch-header {
input#sketch-title {
font-weight: bold;
}
}
.lesson-teaser {
line-height: 40px;
}
#hero h1 {
color: black !important;
}
.lesson-page {
margin: 20px 0px;
}
.exercise-image svg {
width: 200px;
height: 200px;
border: 1px solid #ddd;
margin-bottom: 20px;
}
.svg-200 svg {
width: 200px;
height: 200px;
}
.livecode-editor-small .livecode-editor {
.CodeMirror-scroll {
max-height: 160px;
min-height: 160px;
}
canvas {
width: 150px;
height: 150px;
}
}
.mentor-dashboard {
margin-top: 20px;
.submission {
margin: 40px 0px 0px 20px;
}
}
.no-preview-message {
width: fit-content;
margin: 50px 0px 50px;
color: black;
}

View File

@@ -1,9 +1,8 @@
<div>
{% set site_link = "<a href='" + site_url + "'>" + site_url + "</a>" %}
<p>{{_("Dear Community Member,")}}</p>
<p>{{_("Your Invite Request to be a part of {0} has
been approved.").format(site_link)}}</p>
<p>Click on the link below to complete your Sign up and set a new password</p>
{% set site_link = "<a href='" + site_url + "'>" + site_name + "</a>" %}
<p>{{_("Hi,")}}</p>
<p>{{_("Welcome to {0}!").format(site_name)}}</p>
<p>Click on the link below to complete your sign up and set a new password</p>
<p style="margin: 15px 0px;">
<a href="{{ signup_form_link }}" rel="nofollow" class="btn btn-primary">{{ _("Complete Sign Up") }}</a>
</p>
@@ -14,5 +13,5 @@
</p>
<br>
<p>Thanks and Regards,</p>
<p>Your Community.</p>
</div>
<p>{{site_name}}</p>
</div>

View File

@@ -5,7 +5,7 @@ def get_context(context):
context.courses = 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 = []
for course in course_names:
courses.append(frappe.get_doc("LMS Course", course))