fix: renamed signup hook and moved default form to a template

This commit is contained in:
Jannat Patel
2021-12-20 11:06:51 +05:30
parent 4edf4936c1
commit 45e3964285
2 changed files with 6 additions and 1 deletions

View File

@@ -189,6 +189,6 @@ page_renderer = [
# set this to "/" to have profiles on the top-level
profile_url_prefix = "/users/"
custom_signup_form = "school/templates/signup-form.html" if frappe.db.get_single_value("LMS Settings", "verify_age") else None
signup_form_template = "school.plugins.show_custom_signup"
on_login = "school.overrides.user.set_country_from_ip"

View File

@@ -109,3 +109,8 @@ def youtube_video_renderer(video_id):
def video_renderer(src):
return "<video controls width='100%'><source src={0} type='video/mp4'></video>".format(src)
def show_custom_signup():
if frappe.db.get_single_value("LMS Settings", "verify_age"):
return "school/templates/signup-form.html"
return None