feat: signups can now be enabled/disabled from portal settings
This commit is contained in:
@@ -27,8 +27,9 @@
|
||||
"signup_settings_tab",
|
||||
"signup_settings_section",
|
||||
"column_break_9",
|
||||
"custom_signup_content",
|
||||
"user_category",
|
||||
"disable_signup",
|
||||
"custom_signup_content",
|
||||
"sidebar_tab",
|
||||
"items_in_sidebar_section",
|
||||
"courses",
|
||||
@@ -104,7 +105,7 @@
|
||||
"default": "0",
|
||||
"fieldname": "user_category",
|
||||
"fieldtype": "Check",
|
||||
"label": "Ask User Category during Signup"
|
||||
"label": "Identify User Persona"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
@@ -365,12 +366,19 @@
|
||||
"fieldtype": "Link",
|
||||
"label": "Payment Reminder Template",
|
||||
"options": "Email Template"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "disable_signup",
|
||||
"fieldtype": "Check",
|
||||
"label": "Disable Signup"
|
||||
}
|
||||
],
|
||||
"grid_page_length": 50,
|
||||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2025-02-11 11:29:43.412897",
|
||||
"modified": "2025-04-07 18:05:52.000651",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "LMS Settings",
|
||||
@@ -394,8 +402,9 @@
|
||||
"share": 1
|
||||
}
|
||||
],
|
||||
"row_format": "Dynamic",
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ from frappe.utils import get_url_to_list
|
||||
class LMSSettings(Document):
|
||||
def validate(self):
|
||||
self.validate_google_settings()
|
||||
self.validate_signup()
|
||||
|
||||
def validate_google_settings(self):
|
||||
if self.send_calendar_invite_for_evaluations:
|
||||
@@ -40,6 +41,10 @@ class LMSSettings(Document):
|
||||
)
|
||||
)
|
||||
|
||||
def validate_signup(self):
|
||||
if self.has_value_changed("disable_signup"):
|
||||
frappe.db.set_single_value("Website Settings", "disable_signup", self.disable_signup)
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
def check_payments_app():
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<label class="form-label sr-only"> {{ _("User Category") }} </label>
|
||||
<div class="control-input-wrapper">
|
||||
<div class="control-input flex align-center">
|
||||
<select type="text" id="user_category" data-fieldname="user_category" style="color: var(--text-muted)"
|
||||
<select type="text" id="user_category" data-fieldname="user_category" style="color: var(--text-light)"
|
||||
class="input-with-feedback form-control ellipsis" data-fieldtype="Select" required>
|
||||
<option value=""> {{ _("Category") }} </option>
|
||||
<option value="Business Owner"> {{ _("Business Owner") }} </option>
|
||||
|
||||
Reference in New Issue
Block a user