fix: ui for course creation

This commit is contained in:
Jannat Patel
2022-08-10 19:45:58 +05:30
parent a4534d8f3e
commit 301664ce93
10 changed files with 144 additions and 70 deletions

View File

@@ -307,7 +307,8 @@ data-placeholder="Description">{% if course.description %}{{ frappe.utils.md_to_
{% macro Save(course) %}
{% if course.edit_mode %}
<div>
<button class="btn btn-primary btn-md btn-save-course my-4"> {{ _("Save") }} </button>
<button class="btn btn-primary btn-md btn-save-course my-4">
{{ _("Save Course Details") }} </button>
</div>
{% endif %}
{% endmacro %}

View File

@@ -322,7 +322,7 @@ const clear_image = () => {
const add_tag = (e) => {
$(`<div class="course-card-pills" contenteditable="true"
data-placeholder="${__('Tags')}"></div>`).insertBefore(`.btn-tag`);
data-placeholder="${__('Tag')}"></div>`).insertBefore(`.btn-tag`);
};

View File

@@ -1,6 +1,6 @@
import frappe
from lms.lms.doctype.lms_settings.lms_settings import check_profile_restriction
from lms.lms.utils import get_membership, is_instructor, is_certified, get_evaluation_details
from lms.lms.utils import get_membership, is_instructor, is_certified, get_evaluation_details, redirect_to_courses_list
def get_context(context):
context.no_cache = 1
@@ -72,8 +72,3 @@ def get_user_interest(course):
def show_start_learing_cta(course, membership, restriction):
return not course.disable_self_learning and not membership and not course.upcoming and not restriction.get("restrict") and not is_instructor(course.name)
def redirect_to_courses_list():
frappe.local.flags.redirect_location = "/courses"
raise frappe.Redirect