diff --git a/community/fixtures/custom_field.json b/community/fixtures/custom_field.json new file mode 100644 index 00000000..d3bb2124 --- /dev/null +++ b/community/fixtures/custom_field.json @@ -0,0 +1,108 @@ +[ + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "User", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "linkedin", + "fieldtype": "Data", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "mobile_no", + "label": "LinkedIn ID", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-30 14:46:55.834145", + "name": "User-linkedin", + "no_copy": 0, + "non_negative": 0, + "options": null, + "parent": null, + "parentfield": null, + "parenttype": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "translatable": 1, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "User", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "github", + "fieldtype": "Data", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "linkedin", + "label": "Github ID", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-30 14:46:55.834145", + "name": "User-github", + "no_copy": 0, + "non_negative": 0, + "options": null, + "parent": null, + "parentfield": null, + "parenttype": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "translatable": 1, + "unique": 0, + "width": null + } +] diff --git a/community/hooks.py b/community/hooks.py index dbf8f2a2..f6a8b4ab 100644 --- a/community/hooks.py +++ b/community/hooks.py @@ -104,6 +104,8 @@ doc_events = { # ] #} +fixtures = ["Custom Field"] + # Testing # ------- @@ -166,7 +168,7 @@ whitelist = [ "/new-sign-up", "/message", "/about", - "/lms-course-review" + "/review" ] whitelist_rules = [{"from_route": p, "to_route": p[1:]} for p in whitelist] diff --git a/community/lms/web_form/profile/__init__.py b/community/lms/web_form/profile/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/community/lms/web_form/profile/profile.js b/community/lms/web_form/profile/profile.js new file mode 100644 index 00000000..699703c5 --- /dev/null +++ b/community/lms/web_form/profile/profile.js @@ -0,0 +1,3 @@ +frappe.ready(function() { + // bind events here +}) \ No newline at end of file diff --git a/community/lms/web_form/profile/profile.json b/community/lms/web_form/profile/profile.json new file mode 100644 index 00000000..c4962a94 --- /dev/null +++ b/community/lms/web_form/profile/profile.json @@ -0,0 +1,125 @@ +{ + "accept_payment": 0, + "allow_comments": 0, + "allow_delete": 0, + "allow_edit": 1, + "allow_incomplete": 0, + "allow_multiple": 0, + "allow_print": 0, + "amount": 0.0, + "amount_based_on_field": 0, + "apply_document_permissions": 0, + "breadcrumbs": "", + "button_label": "Save", + "creation": "2021-06-30 13:48:13.682851", + "doc_type": "User", + "docstatus": 0, + "doctype": "Web Form", + "idx": 0, + "is_standard": 1, + "login_required": 1, + "max_attachment_size": 0, + "modified": "2021-06-30 15:53:20.967466", + "modified_by": "Administrator", + "module": "LMS", + "name": "profile", + "owner": "Administrator", + "payment_button_label": "Buy Now", + "published": 1, + "route": "profile", + "route_to_success_link": 0, + "show_attachments": 0, + "show_in_grid": 0, + "show_sidebar": 0, + "sidebar_items": [], + "success_url": "/profile", + "title": "Profile", + "web_form_fields": [ + { + "allow_read_on_all_link_options": 0, + "fieldname": "first_name", + "fieldtype": "Data", + "hidden": 0, + "label": "First Name", + "max_length": 0, + "max_value": 0, + "read_only": 0, + "reqd": 1, + "show_in_filter": 0 + }, + { + "allow_read_on_all_link_options": 0, + "fieldname": "middle_name", + "fieldtype": "Data", + "hidden": 0, + "label": "Middle Name (Optional)", + "max_length": 0, + "max_value": 0, + "read_only": 0, + "reqd": 0, + "show_in_filter": 0 + }, + { + "allow_read_on_all_link_options": 0, + "fieldname": "last_name", + "fieldtype": "Data", + "hidden": 0, + "label": "Last Name", + "max_length": 0, + "max_value": 0, + "read_only": 0, + "reqd": 0, + "show_in_filter": 0 + }, + { + "allow_read_on_all_link_options": 0, + "description": "Get your globally recognized avatar from Gravatar.com", + "fieldname": "user_image", + "fieldtype": "Attach Image", + "hidden": 0, + "label": "User Image", + "max_length": 0, + "max_value": 0, + "read_only": 0, + "reqd": 0, + "show_in_filter": 0 + }, + { + "allow_read_on_all_link_options": 0, + "fieldname": "username", + "fieldtype": "Data", + "hidden": 0, + "label": "Username", + "max_length": 0, + "max_value": 0, + "read_only": 0, + "reqd": 0, + "show_in_filter": 0 + }, + { + "allow_read_on_all_link_options": 0, + "fieldname": "mobile_no", + "fieldtype": "Data", + "hidden": 0, + "label": "Mobile No", + "max_length": 0, + "max_value": 0, + "options": "Phone", + "read_only": 0, + "reqd": 0, + "show_in_filter": 0 + }, + { + "allow_read_on_all_link_options": 0, + "fieldname": "bio", + "fieldtype": "Small Text", + "hidden": 0, + "label": "Bio", + "max_length": 0, + "max_value": 0, + "read_only": 0, + "reqd": 0, + "show_in_filter": 0 + } + ] +} \ No newline at end of file diff --git a/community/lms/web_form/profile/profile.py b/community/lms/web_form/profile/profile.py new file mode 100644 index 00000000..e1ada619 --- /dev/null +++ b/community/lms/web_form/profile/profile.py @@ -0,0 +1,5 @@ +import frappe + +def get_context(context): + # do your magic here + pass diff --git a/community/lms/widgets/Reviews.html b/community/lms/widgets/Reviews.html index 9e0cf18b..962ad6fb 100644 --- a/community/lms/widgets/Reviews.html +++ b/community/lms/widgets/Reviews.html @@ -7,7 +7,7 @@ {% endif %} -