feat: default home setting
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
"field_order": [
|
||||
"search_placeholder",
|
||||
"portal_course_creation",
|
||||
"default_home",
|
||||
"is_onboarding_complete",
|
||||
"column_break_2",
|
||||
"custom_certificate_template",
|
||||
@@ -145,12 +146,18 @@
|
||||
"fieldtype": "Check",
|
||||
"label": "Is Onboarding Complete",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "default_home",
|
||||
"fieldtype": "Check",
|
||||
"label": "Make LMS the default home"
|
||||
}
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2022-12-20 11:44:06.317159",
|
||||
"modified": "2023-02-07 19:53:46.073914",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "LMS Settings",
|
||||
|
||||
@@ -294,7 +294,9 @@ def get_country_code():
|
||||
|
||||
|
||||
def on_session_creation(login_manager):
|
||||
if frappe.db.get_single_value("System Settings", "setup_complete"):
|
||||
if frappe.db.get_single_value(
|
||||
"System Settings", "setup_complete"
|
||||
) and frappe.db.get_single_value("LMS Settings", "default_home"):
|
||||
frappe.local.response["home_page"] = "/courses"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user