fix: tabs to space, moved js to widget, removed unrelated changes

This commit is contained in:
pateljannat
2021-05-03 15:14:11 +05:30
parent 565787eeb6
commit 5fdecb708e
11 changed files with 175 additions and 173 deletions

View File

@@ -111,11 +111,11 @@
{% endfor %}
</div>
<a class="btn btn-primary add-batch margin-bottom" href="/add-a-new-batch?new=1&course={{course.title}}">Add a new batch</a>
<a class="btn btn-primary add-batch margin-bottom" href="/add-a-new-batch?new=1&course={{course.name}}">Add a new batch</a>
{% else %}
<div class="mentor_message">
<p> You are a mentor for this course. </p>
<a class="btn btn-primary" href="/add-a-new-batch?new=1&course={{course.title}}" >Create your first batch</a>
<a class="btn btn-primary" href="/add-a-new-batch?new=1&course={{course.name}}" >Create your first batch</a>
</div>
{% endif %}
{% endmacro %}

View File

@@ -1,19 +0,0 @@
frappe.ready(() => {
$("#submit").click(function () {
frappe.call({
method: "community.lms.doctype.invite_request.invite_request.create_invite_request",
args: {
invite_email: $("#invite_email").val()
},
callback: (data) => {
if (data.message == "OK") {
$("#invite-request-form").hide();
var message = `<div>
<p class="lead">Thanks for your interest in Mon School. We have recorded your interest and we will get back to you shortly.</p>
</div>`;
$(".jumbotron").append(message);
}
}
})
})
})

View File

@@ -1,5 +1,5 @@
import frappe
from community.lms.models import Sketch
from ...lms.doctype.lms_sketch.lms_sketch import get_recent_sketches
def get_context(context):
context.no_cache = 1
@@ -8,7 +8,7 @@ def get_context(context):
if not context.member:
context.template = "www/404.html"
else:
context.sketches = Sketch.get_recent_sketches(context.member.email)
context.sketches = list(filter(lambda x: x.owner == context.member.email, get_recent_sketches()))
def get_member(username):
try: