fix: replaced some dialogs with alerts
This commit is contained in:
@@ -105,7 +105,7 @@ def sanitize_html(html, macro):
|
||||
any broken tags. This makes sures that all those things are fixed
|
||||
before passing to the etree parser.
|
||||
"""
|
||||
soup = BeautifulSoup(html, features="lxml")
|
||||
soup = BeautifulSoup(html, features="html5lib")
|
||||
nodes = soup.body.children
|
||||
classname = ""
|
||||
if macro == "YouTubeVideo":
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
frappe.ready(function() {
|
||||
frappe.web_form.after_save = () => {
|
||||
frappe.msgprint(__("Chapter has been saved successfully. Go back to the course and add this chapter to the chapters table."))
|
||||
frappe.show_alert({
|
||||
message:__("Chapter has been saved successfully. Go back to the course and add this chapter to the chapters table."),
|
||||
indicator:'green'
|
||||
}, 3);
|
||||
setTimeout(() => {
|
||||
window.location.href = `/courses/${frappe.web_form.doc.course}`;
|
||||
}, 3000);
|
||||
|
||||
@@ -49,10 +49,13 @@ const show_upload_modal = () => {
|
||||
};
|
||||
|
||||
const show_success_message = () => {
|
||||
frappe.msgprint(__(`Lesson has been saved successfully. Go back to the chapter and add this lesson to the lessons table.`));
|
||||
frappe.show_alert({
|
||||
message: __(`Lesson has been saved successfully. Go back to the chapter and add this lesson to the lessons table.`),
|
||||
indicator:'green'
|
||||
}, 3);
|
||||
setTimeout(() => {
|
||||
window.location.href = `/courses/${this.course}`;
|
||||
}, 2000);
|
||||
}, 3000);
|
||||
};
|
||||
|
||||
const add_file_upload_component = () => {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"is_standard": 1,
|
||||
"login_required": 1,
|
||||
"max_attachment_size": 0,
|
||||
"modified": "2022-02-23 09:32:37.352930",
|
||||
"modified": "2022-06-06 10:38:37.784113",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "profile",
|
||||
@@ -83,7 +83,7 @@
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"reqd": 1,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
@@ -244,7 +244,7 @@
|
||||
"max_value": 0,
|
||||
"options": "Work Experience",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
|
||||
@@ -29,13 +29,12 @@
|
||||
{% if membership or lesson.include_in_preview %}
|
||||
<a class="lesson-links" href="{{ get_lesson_url(course.name, lesson.number) }}{{course.query_parameter}}"
|
||||
data-course="{{ course.name }}">
|
||||
<svg class="icon icon-md mr-2">
|
||||
<svg class="icon icon-sm mr-2">
|
||||
<use class="" href="#{{ lesson.icon }}">
|
||||
</svg>
|
||||
{{ lesson.title }}
|
||||
|
||||
<span>{{ lesson.title }}</span>
|
||||
{% if membership %}
|
||||
<svg class="icon icon-md lesson-progress-tick {{ get_progress(course.name, lesson.name) != 'Complete' and 'hide' }}">
|
||||
<svg class="icon icon-sm lesson-progress-tick {{ get_progress(course.name, lesson.name) != 'Complete' and 'hide' }}">
|
||||
<use class="" href="#icon-green-check">
|
||||
</svg>
|
||||
{% endif %}
|
||||
@@ -48,7 +47,7 @@
|
||||
href="{{ get_lesson_url(course.name, lesson.number) }}{{course.query_parameter}}"
|
||||
data-course="{{ course.name }}">
|
||||
|
||||
<svg class="icon icon-md">
|
||||
<svg class="icon icon-sm">
|
||||
<use class="" href="#icon-lock">
|
||||
</svg>
|
||||
<div>{{ lesson.title }}</div>
|
||||
@@ -57,7 +56,7 @@
|
||||
{% else %}
|
||||
<div class="no-preview" title="This lesson is not available for preview" data-course="{{ course.name }}">
|
||||
<div class="lesson-links">
|
||||
<svg class="icon icon-md">
|
||||
<svg class="icon icon-sm">
|
||||
<use class="" href="#icon-lock-gray">
|
||||
</svg>
|
||||
<div>{{ lesson.title }}</div>
|
||||
|
||||
Reference in New Issue
Block a user