feat: course web form

This commit is contained in:
Jannat Patel
2022-03-07 18:21:11 +05:30
parent f8784afd72
commit 5e973b21ae
5 changed files with 148 additions and 2 deletions

View File

@@ -10,7 +10,7 @@
"allow_guest_to_view": 1,
"allow_import": 1,
"allow_rename": 1,
"creation": "2022-02-08 16:34:42.721203",
"creation": "2022-02-22 15:28:26.091549",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
@@ -174,7 +174,7 @@
"link_fieldname": "course"
}
],
"modified": "2022-02-16 11:50:20.661085",
"modified": "2022-03-07 14:47:51.745509",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Course",
@@ -191,6 +191,19 @@
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"email": 1,
"export": 1,
"if_owner": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "All",
"select": 1,
"share": 1,
"write": 1
}
],
"search_fields": "title",

View File

View File

@@ -0,0 +1,3 @@
frappe.ready(function() {
// bind events here
})

View File

@@ -0,0 +1,125 @@
{
"accept_payment": 0,
"allow_comments": 0,
"allow_delete": 0,
"allow_edit": 1,
"allow_incomplete": 0,
"allow_multiple": 1,
"allow_print": 0,
"amount": 0.0,
"amount_based_on_field": 0,
"apply_document_permissions": 1,
"button_label": "Save",
"creation": "2022-03-07 14:40:41.262163",
"custom_css": "",
"doc_type": "LMS Course",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"is_multi_step_form": 0,
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2022-03-07 14:48:04.889844",
"modified_by": "Administrator",
"module": "LMS",
"name": "course",
"owner": "Administrator",
"payment_button_label": "Buy Now",
"published": 1,
"route": "course",
"route_to_success_link": 0,
"show_attachments": 0,
"show_in_grid": 0,
"show_sidebar": 0,
"sidebar_items": [],
"success_url": "/course",
"title": "Course",
"web_form_fields": [
{
"allow_read_on_all_link_options": 0,
"fieldname": "title",
"fieldtype": "Data",
"hidden": 0,
"label": "Title",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "video_link",
"fieldtype": "Data",
"hidden": 0,
"label": "Video Embed Link",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "image",
"fieldtype": "Attach Image",
"hidden": 0,
"label": "Preview Image",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "tags",
"fieldtype": "Data",
"hidden": 0,
"label": "Tags",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "short_introduction",
"fieldtype": "Small Text",
"hidden": 0,
"label": "Short Introduction",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "description",
"fieldtype": "Data",
"hidden": 0,
"label": "Description",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "chapters",
"fieldtype": "Table",
"hidden": 0,
"label": "Chapters",
"max_length": 0,
"max_value": 0,
"options": "Chapter Reference",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
}
]
}

View File

@@ -0,0 +1,5 @@
import frappe
def get_context(context):
# do your magic here
pass