fix: minor issues
This commit is contained in:
@@ -195,7 +195,7 @@ def submit_for_review(course):
|
|||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def save_course(tags, title, short_introduction, video_link, image, description, course):
|
def save_course(tags, title, short_introduction, video_link, description, course, image=None):
|
||||||
if course:
|
if course:
|
||||||
doc = frappe.get_doc("LMS Course", course)
|
doc = frappe.get_doc("LMS Course", course)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -1620,3 +1620,13 @@ li {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.preview-video-header {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-info {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: -30px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
|
|
||||||
<label class="preview">
|
<label class="preview">
|
||||||
<input {% if lesson.include_in_preview %} checked {% endif %} type="checkbox"
|
<input {% if lesson.include_in_preview %} checked {% endif %} type="checkbox"
|
||||||
id="preview"> {{ _("Show preview of this lesson") }}
|
id="preview"> {{ _("Show preview of this lesson to Guest users.") }}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<button class="btn btn-secondary btn-sm btn-question"> {{ _("New Question") }} </button>
|
<button class="btn btn-secondary btn-sm btn-question"> {{ _("New Question") }} </button>
|
||||||
<button class="btn btn-primary btn-sm btn-save-question ml-2
|
<button class="btn btn-primary btn-sm btn-save-question ml-2
|
||||||
{% if not quiz.name %} hide {% endif %}"> {{ _("Save") }} </button>
|
{% if not quiz.name %} hide {% endif %}"> {{ _("Save Quiz") }} </button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|||||||
@@ -82,15 +82,22 @@
|
|||||||
{% endif %} id="intro" >{% if course.short_introduction %} {{ course.short_introduction }} {% endif %}</div>
|
{% endif %} id="intro" >{% if course.short_introduction %} {{ course.short_introduction }} {% endif %}</div>
|
||||||
|
|
||||||
{% if course.edit_mode %}
|
{% if course.edit_mode %}
|
||||||
<div class="d-block mt-1" contenteditable="true" id="video-link"
|
<div class="preview-video-header">
|
||||||
data-placeholder=" {{ _('Preview Video Link') }} ">{% if course.video_link %}{{ course.video_link }}{% endif %}</div>
|
<div class="d-block mt-1" contenteditable="true" id="video-link"
|
||||||
|
data-placeholder=" {{ _('Preview Video Link') }} ">{% if course.video_link %}{{ course.video_link }}{% endif %}</div>
|
||||||
|
<svg class="icon icon-md preview-info">
|
||||||
|
<title>{{ _("If you have a video that provides a teaser or preview of the course, you can add it here. Upload the video on youtube. When you share a youtube video, it shows an option called Embed. On clicking it, it provides an iframe. Copy the source of the iframe and paste it here.") }}</title>
|
||||||
|
<use href="#icon-solid-info"></use>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{% if course.image %}
|
||||||
<div class="course-image-attachment {% if not course.image %} hide {% endif %} ">
|
<div class="course-image-attachment {% if not course.image %} hide {% endif %} ">
|
||||||
<a href="{{ course.image }}" id="image" target="_blank"> {{ course.image }} </a>
|
<a href="{{ course.image }}" id="image" target="_blank"> {{ course.image }} </a>
|
||||||
<button class="btn btn-sm btn-default btn-clear ml-4"> {{ _("Clear") }} </button>
|
<button class="btn btn-sm btn-default btn-clear ml-4"> {{ _("Clear") }} </button>
|
||||||
</div>
|
</div>
|
||||||
|
{% else %}
|
||||||
{% if not course.image %}
|
|
||||||
<a class="btn btn-default btn-sm btn-attach mt-1 {% if course.image %} hide {% endif %}"> {{ _("Attach Image") }} </a>
|
<a class="btn btn-default btn-sm btn-attach mt-1 {% if course.image %} hide {% endif %}"> {{ _("Attach Image") }} </a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user