diff --git a/community/event_management/doctype/attendee_registration/__init__.py b/community/event_management/doctype/attendee/__init__.py similarity index 100% rename from community/event_management/doctype/attendee_registration/__init__.py rename to community/event_management/doctype/attendee/__init__.py diff --git a/community/event_management/doctype/attendee_registration/attendee_registration.js b/community/event_management/doctype/attendee/attendee.js similarity index 84% rename from community/event_management/doctype/attendee_registration/attendee_registration.js rename to community/event_management/doctype/attendee/attendee.js index 7b934f0b..ffd0ce8e 100644 --- a/community/event_management/doctype/attendee_registration/attendee_registration.js +++ b/community/event_management/doctype/attendee/attendee.js @@ -1,7 +1,7 @@ // Copyright (c) 2021, FOSS United and contributors // For license information, please see license.txt -frappe.ui.form.on('Attendee Registration', { +frappe.ui.form.on('Attendee', { onload: function (frm) { frm.set_query('user', function (doc) { return { diff --git a/community/event_management/doctype/attendee_registration/attendee_registration.json b/community/event_management/doctype/attendee/attendee.json similarity index 85% rename from community/event_management/doctype/attendee_registration/attendee_registration.json rename to community/event_management/doctype/attendee/attendee.json index 7b048c79..c055dcc0 100644 --- a/community/event_management/doctype/attendee_registration/attendee_registration.json +++ b/community/event_management/doctype/attendee/attendee.json @@ -8,11 +8,11 @@ "attendee_info_section", "user", "full_name", - "email", "phone_number", "occupation", "company", - "what_are_you_hoping_to_learn" + "what_are_you_hoping_to_learn", + "is_paid" ], "fields": [ { @@ -20,13 +20,6 @@ "fieldtype": "Section Break", "label": "Attendee Info" }, - { - "fetch_from": "user.email", - "fieldname": "email", - "fieldtype": "Data", - "label": "Email", - "read_only": 1 - }, { "fieldname": "phone_number", "fieldtype": "Data", @@ -53,7 +46,8 @@ "fieldname": "user", "fieldtype": "Link", "label": "User", - "options": "User" + "options": "User", + "read_only": 1 }, { "fetch_from": "user.full_name", @@ -61,14 +55,20 @@ "fieldtype": "Data", "label": "Full Name", "read_only": 1 + }, + { + "default": "0", + "fieldname": "is_paid", + "fieldtype": "Check", + "label": "is_paid" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-08-19 15:25:03.305762", + "modified": "2021-08-20 13:40:25.690440", "modified_by": "Administrator", "module": "Event Management", - "name": "Attendee Registration", + "name": "Attendee", "owner": "Administrator", "permissions": [ { diff --git a/community/event_management/doctype/attendee_registration/attendee_registration.py b/community/event_management/doctype/attendee/attendee.py similarity index 81% rename from community/event_management/doctype/attendee_registration/attendee_registration.py rename to community/event_management/doctype/attendee/attendee.py index ccff65df..e883ee2a 100644 --- a/community/event_management/doctype/attendee_registration/attendee_registration.py +++ b/community/event_management/doctype/attendee/attendee.py @@ -4,5 +4,5 @@ # import frappe from frappe.model.document import Document -class AttendeeRegistration(Document): +class Attendee(Document): pass diff --git a/community/event_management/doctype/attendee_registration/test_attendee_registration.py b/community/event_management/doctype/attendee/test_attendee.py similarity index 68% rename from community/event_management/doctype/attendee_registration/test_attendee_registration.py rename to community/event_management/doctype/attendee/test_attendee.py index 3e3922c8..92678d90 100644 --- a/community/event_management/doctype/attendee_registration/test_attendee_registration.py +++ b/community/event_management/doctype/attendee/test_attendee.py @@ -4,5 +4,5 @@ # import frappe import unittest -class TestAttendeeRegistration(unittest.TestCase): +class TestAttendee(unittest.TestCase): pass diff --git a/community/event_management/doctype/event_ticket/event_ticket.json b/community/event_management/doctype/event_ticket/event_ticket.json index ae5d99a3..5709601c 100644 --- a/community/event_management/doctype/event_ticket/event_ticket.json +++ b/community/event_management/doctype/event_ticket/event_ticket.json @@ -19,7 +19,7 @@ "fieldname": "attendee", "fieldtype": "Link", "label": "attendee", - "options": "Attendee Registration" + "options": "Attendee" }, { "fieldname": "event", @@ -30,7 +30,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-08-18 09:51:14.654098", + "modified": "2021-08-20 13:38:28.688115", "modified_by": "Administrator", "module": "Event Management", "name": "Event Ticket", diff --git a/community/event_management/doctype/exhibitor_registration/__init__.py b/community/event_management/doctype/exhibitor/__init__.py similarity index 100% rename from community/event_management/doctype/exhibitor_registration/__init__.py rename to community/event_management/doctype/exhibitor/__init__.py diff --git a/community/event_management/doctype/exhibitor_registration/exhibitor_registration.js b/community/event_management/doctype/exhibitor/exhibitor.js similarity index 75% rename from community/event_management/doctype/exhibitor_registration/exhibitor_registration.js rename to community/event_management/doctype/exhibitor/exhibitor.js index 530cf64b..598b4d31 100644 --- a/community/event_management/doctype/exhibitor_registration/exhibitor_registration.js +++ b/community/event_management/doctype/exhibitor/exhibitor.js @@ -1,7 +1,7 @@ // Copyright (c) 2021, FOSS United and contributors // For license information, please see license.txt -frappe.ui.form.on('Exhibitor Registration', { +frappe.ui.form.on('Exhibitor', { // refresh: function(frm) { // } diff --git a/community/event_management/doctype/exhibitor_registration/exhibitor_registration.json b/community/event_management/doctype/exhibitor/exhibitor.json similarity index 74% rename from community/event_management/doctype/exhibitor_registration/exhibitor_registration.json rename to community/event_management/doctype/exhibitor/exhibitor.json index 8be120d4..9f210ecd 100644 --- a/community/event_management/doctype/exhibitor_registration/exhibitor_registration.json +++ b/community/event_management/doctype/exhibitor/exhibitor.json @@ -8,7 +8,9 @@ "field_order": [ "full_name", "company", - "logo" + "logo", + "description", + "is_paid" ], "fields": [ { @@ -25,14 +27,25 @@ "fieldname": "logo", "fieldtype": "Attach Image", "label": "Logo" + }, + { + "fieldname": "description", + "fieldtype": "Text Editor", + "label": "Description" + }, + { + "default": "0", + "fieldname": "is_paid", + "fieldtype": "Check", + "label": "is_paid" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-08-18 20:08:31.591935", + "modified": "2021-08-20 13:38:07.709658", "modified_by": "Administrator", "module": "Event Management", - "name": "Exhibitor Registration", + "name": "Exhibitor", "owner": "Administrator", "permissions": [ { diff --git a/community/event_management/doctype/exhibitor_registration/exhibitor_registration.py b/community/event_management/doctype/exhibitor/exhibitor.py similarity index 81% rename from community/event_management/doctype/exhibitor_registration/exhibitor_registration.py rename to community/event_management/doctype/exhibitor/exhibitor.py index 3c1c70e4..d75e2e20 100644 --- a/community/event_management/doctype/exhibitor_registration/exhibitor_registration.py +++ b/community/event_management/doctype/exhibitor/exhibitor.py @@ -4,5 +4,5 @@ # import frappe from frappe.model.document import Document -class ExhibitorRegistration(Document): +class Exhibitor(Document): pass diff --git a/community/event_management/doctype/exhibitor_registration/test_exhibitor_registration.py b/community/event_management/doctype/exhibitor/test_exhibitor.py similarity index 67% rename from community/event_management/doctype/exhibitor_registration/test_exhibitor_registration.py rename to community/event_management/doctype/exhibitor/test_exhibitor.py index f0970dde..9c391d62 100644 --- a/community/event_management/doctype/exhibitor_registration/test_exhibitor_registration.py +++ b/community/event_management/doctype/exhibitor/test_exhibitor.py @@ -4,5 +4,5 @@ # import frappe import unittest -class TestExhibitorRegistration(unittest.TestCase): +class TestExhibitor(unittest.TestCase): pass diff --git a/community/event_management/doctype/speaker/speaker.js b/community/event_management/doctype/speaker/speaker.js index 8e32bd50..1b1da984 100644 --- a/community/event_management/doctype/speaker/speaker.js +++ b/community/event_management/doctype/speaker/speaker.js @@ -2,13 +2,7 @@ // For license information, please see license.txt frappe.ui.form.on('Speaker', { - onload: function (frm) { - frm.set_query('user', function (doc) { - return { - filters: { - "ignore_user_type": 1, - } - }; - }); - } + // refresh: function(frm) { + + // } }); diff --git a/community/event_management/doctype/speaker/speaker.json b/community/event_management/doctype/speaker/speaker.json index e6bc0cf4..f0aa389f 100644 --- a/community/event_management/doctype/speaker/speaker.json +++ b/community/event_management/doctype/speaker/speaker.json @@ -7,9 +7,9 @@ "engine": "InnoDB", "field_order": [ "speaker_info_section", + "event", "user", "full_name", - "email", "phone_number", "job_title", "company", @@ -24,10 +24,19 @@ "label": "Speaker Info" }, { - "fetch_from": "user.email", - "fieldname": "email", + "fieldname": "user", + "fieldtype": "Link", + "in_list_view": 1, + "label": "User", + "options": "User", + "read_only": 1 + }, + { + "fetch_from": "user.full_name", + "fieldname": "full_name", "fieldtype": "Data", - "label": "Email", + "in_list_view": 1, + "label": "Full Name", "read_only": 1 }, { @@ -52,6 +61,11 @@ "reqd": 1 }, { + "fieldname": "column_break_8", + "fieldtype": "Column Break" + }, + { + "fetch_from": "user.banner_image", "fieldname": "picture", "fieldtype": "Attach Image", "label": "Profile Image", @@ -63,27 +77,16 @@ "label": "Bio" }, { - "fieldname": "column_break_8", - "fieldtype": "Column Break" - }, - { - "fetch_from": "user.full_name", - "fieldname": "full_name", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Full Name", - "read_only": 1 - }, - { - "fieldname": "user", + "fieldname": "event", "fieldtype": "Link", - "label": "User", - "options": "User" + "label": "Event", + "options": "Event Details", + "read_only": 1 } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-08-19 15:19:27.351589", + "modified": "2021-08-20 12:06:54.852070", "modified_by": "Administrator", "module": "Event Management", "name": "Speaker", diff --git a/community/event_management/doctype/speaker/speaker.py b/community/event_management/doctype/speaker/speaker.py index a39bbf37..fb99b3d5 100644 --- a/community/event_management/doctype/speaker/speaker.py +++ b/community/event_management/doctype/speaker/speaker.py @@ -1,10 +1,8 @@ # Copyright (c) 2021, FOSS United and contributors # For license information, please see license.txt -import frappe +# import frappe from frappe.model.document import Document class Speaker(Document): - - def on_update(self): - pass + pass diff --git a/community/event_management/doctype/talk/talk.json b/community/event_management/doctype/talk/talk.json index 9ecbbaab..05b21732 100644 --- a/community/event_management/doctype/talk/talk.json +++ b/community/event_management/doctype/talk/talk.json @@ -7,7 +7,7 @@ "engine": "InnoDB", "field_order": [ "event", - "speaker", + "company", "topic", "title", "about", @@ -15,7 +15,8 @@ "url", "thumbnail", "name_of_the_speaker", - "status" + "status", + "speaker" ], "fields": [ { @@ -47,12 +48,12 @@ { "fieldname": "topic", "fieldtype": "Data", - "label": "Topic" + "label": "Category" }, { "fieldname": "about", "fieldtype": "Text", - "label": "About" + "label": "About the Talk" }, { "fieldname": "attachment", @@ -62,6 +63,7 @@ { "fieldname": "speaker", "fieldtype": "Link", + "hidden": 1, "label": "Speaker", "options": "Speaker" }, @@ -72,11 +74,16 @@ "in_list_view": 1, "label": "Status", "options": "Applied\nPending\nApproved\nRejected\nPrevious Talk" + }, + { + "fieldname": "company", + "fieldtype": "Data", + "label": "Company" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-08-19 16:44:58.181528", + "modified": "2021-08-20 12:08:11.304322", "modified_by": "Administrator", "module": "Event Management", "name": "Talk", diff --git a/community/event_management/doctype/talk/talk.py b/community/event_management/doctype/talk/talk.py index 74c006d0..b877bc3a 100644 --- a/community/event_management/doctype/talk/talk.py +++ b/community/event_management/doctype/talk/talk.py @@ -1,8 +1,27 @@ # Copyright (c) 2021, FOSS United and contributors # For license information, please see license.txt -# import frappe +import frappe from frappe.model.document import Document + class Talk(Document): - pass + def before_save(self): + exists = frappe.db.exists({ + 'doctype': 'Speaker', + 'user': frappe.session.user + }) + speaker = None + + if(exists): + speaker = frappe.db.get_value( + 'Speaker', {'user': frappe.session.user}) + + elif(not exists): + speaker = frappe.get_doc(dict( + event=self.event, + user=frappe.session.user, + company=self.company, + )).insert(ignore_permissions=True) + + self.speaker = speaker diff --git a/community/event_management/web_form/attendee_registration/attendee_registration.js b/community/event_management/web_form/attendee_registration/attendee_registration.js index 699703c5..52fc3614 100644 --- a/community/event_management/web_form/attendee_registration/attendee_registration.js +++ b/community/event_management/web_form/attendee_registration/attendee_registration.js @@ -1,3 +1,7 @@ -frappe.ready(function() { - // bind events here +frappe.ready(function () { + frappe.web_form.after_save = () => { + setTimeout(function () { + window.location.href = '/event/conference2021/about'; + }, 2000); + } }) \ No newline at end of file diff --git a/community/event_management/web_form/attendee_registration/attendee_registration.json b/community/event_management/web_form/attendee_registration/attendee_registration.json index 9a962f3e..208d4150 100644 --- a/community/event_management/web_form/attendee_registration/attendee_registration.json +++ b/community/event_management/web_form/attendee_registration/attendee_registration.json @@ -11,6 +11,7 @@ "apply_document_permissions": 0, "button_label": "Get Ticket", "creation": "2021-08-19 15:26:56.594526", + "custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}", "doc_type": "Attendee Registration", "docstatus": 0, "doctype": "Web Form", @@ -18,20 +19,20 @@ "is_standard": 1, "login_required": 1, "max_attachment_size": 0, - "modified": "2021-08-19 15:34:04.871127", + "modified": "2021-08-19 22:03:24.454348", "modified_by": "Administrator", "module": "Event Management", "name": "attendee-registration", "owner": "Administrator", "payment_button_label": "Buy Now", "published": 1, - "route": "event/conference/attendee-registration", + "route": "event/conference2021/attendee-registration", "route_to_success_link": 1, "show_attachments": 0, "show_in_grid": 0, "show_sidebar": 0, "sidebar_items": [], - "success_url": "/attendee-registration", + "success_url": "/event/conference2021/about", "title": "Attendee Registration", "web_form_fields": [ { diff --git a/community/event_management/web_form/exhibitor_registration/exhibitor_registration.js b/community/event_management/web_form/exhibitor_registration/exhibitor_registration.js index 699703c5..52fc3614 100644 --- a/community/event_management/web_form/exhibitor_registration/exhibitor_registration.js +++ b/community/event_management/web_form/exhibitor_registration/exhibitor_registration.js @@ -1,3 +1,7 @@ -frappe.ready(function() { - // bind events here +frappe.ready(function () { + frappe.web_form.after_save = () => { + setTimeout(function () { + window.location.href = '/event/conference2021/about'; + }, 2000); + } }) \ No newline at end of file diff --git a/community/event_management/web_form/exhibitor_registration/exhibitor_registration.json b/community/event_management/web_form/exhibitor_registration/exhibitor_registration.json index 0e08f2ca..f3be6172 100644 --- a/community/event_management/web_form/exhibitor_registration/exhibitor_registration.json +++ b/community/event_management/web_form/exhibitor_registration/exhibitor_registration.json @@ -11,14 +11,15 @@ "apply_document_permissions": 0, "button_label": "Save", "creation": "2021-08-16 16:27:06.566564", - "doc_type": "Exhibitor Registration", + "custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}", + "doc_type": "Exhibitor", "docstatus": 0, "doctype": "Web Form", "idx": 0, "is_standard": 1, "login_required": 1, "max_attachment_size": 0, - "modified": "2021-08-17 11:51:02.929819", + "modified": "2021-08-19 22:05:16.609246", "modified_by": "Administrator", "module": "Event Management", "name": "exhibitor-registration", @@ -69,6 +70,18 @@ "read_only": 0, "reqd": 0, "show_in_filter": 0 + }, + { + "allow_read_on_all_link_options": 0, + "fieldname": "description", + "fieldtype": "Text Editor", + "hidden": 0, + "label": "Description", + "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/event_management/web_form/purpose_a_talk/purpose_a_talk.js b/community/event_management/web_form/purpose_a_talk/purpose_a_talk.js index 699703c5..52fc3614 100644 --- a/community/event_management/web_form/purpose_a_talk/purpose_a_talk.js +++ b/community/event_management/web_form/purpose_a_talk/purpose_a_talk.js @@ -1,3 +1,7 @@ -frappe.ready(function() { - // bind events here +frappe.ready(function () { + frappe.web_form.after_save = () => { + setTimeout(function () { + window.location.href = '/event/conference2021/about'; + }, 2000); + } }) \ No newline at end of file diff --git a/community/event_management/web_form/purpose_a_talk/purpose_a_talk.json b/community/event_management/web_form/purpose_a_talk/purpose_a_talk.json index aefcb8ba..4972e2c3 100644 --- a/community/event_management/web_form/purpose_a_talk/purpose_a_talk.json +++ b/community/event_management/web_form/purpose_a_talk/purpose_a_talk.json @@ -10,7 +10,9 @@ "amount_based_on_field": 0, "apply_document_permissions": 0, "button_label": "Submit", + "client_script": "", "creation": "2021-08-19 15:16:22.341723", + "custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}", "doc_type": "Talk", "docstatus": 0, "doctype": "Web Form", @@ -18,19 +20,20 @@ "is_standard": 1, "login_required": 1, "max_attachment_size": 0, - "modified": "2021-08-19 15:22:37.040442", + "modified": "2021-08-20 13:33:49.508780", "modified_by": "Administrator", "module": "Event Management", "name": "purpose-a-talk", "owner": "Administrator", "payment_button_label": "Buy Now", "published": 1, - "route": "event/conference/purpose-a-talk", + "route": "propose-talk", "route_to_success_link": 0, "show_attachments": 0, "show_in_grid": 0, "show_sidebar": 0, "sidebar_items": [], + "success_message": "Talk Submitted!", "success_url": "/purpose-a-talk", "title": "Purpose a Talk", "web_form_fields": [ @@ -49,13 +52,12 @@ }, { "allow_read_on_all_link_options": 0, - "fieldname": "speaker", - "fieldtype": "Link", + "fieldname": "company", + "fieldtype": "Data", "hidden": 0, - "label": "Speaker", + "label": "Company", "max_length": 0, "max_value": 0, - "options": "Speaker", "read_only": 0, "reqd": 0, "show_in_filter": 0 @@ -65,11 +67,11 @@ "fieldname": "topic", "fieldtype": "Data", "hidden": 0, - "label": "Topic", + "label": "Category", "max_length": 0, "max_value": 0, "read_only": 0, - "reqd": 0, + "reqd": 1, "show_in_filter": 0 }, { @@ -81,7 +83,7 @@ "max_length": 0, "max_value": 0, "read_only": 0, - "reqd": 0, + "reqd": 1, "show_in_filter": 0 }, { @@ -93,7 +95,7 @@ "max_length": 0, "max_value": 0, "read_only": 0, - "reqd": 0, + "reqd": 1, "show_in_filter": 0 }, { diff --git a/community/event_management/web_form/speaker_registration/speaker_registration.js b/community/event_management/web_form/speaker_registration/speaker_registration.js index 699703c5..a50c3b37 100644 --- a/community/event_management/web_form/speaker_registration/speaker_registration.js +++ b/community/event_management/web_form/speaker_registration/speaker_registration.js @@ -1,3 +1,7 @@ -frappe.ready(function() { - // bind events here +frappe.ready(function () { + frappe.web_form.after_save = () => { + setTimeout(function () { + window.location.href = '/event/conference2021/propose-talk'; + }, 2000); + } }) \ No newline at end of file diff --git a/community/event_management/web_form/speaker_registration/speaker_registration.json b/community/event_management/web_form/speaker_registration/speaker_registration.json index b5f11134..e70e0a04 100644 --- a/community/event_management/web_form/speaker_registration/speaker_registration.json +++ b/community/event_management/web_form/speaker_registration/speaker_registration.json @@ -11,6 +11,7 @@ "apply_document_permissions": 0, "button_label": "Register", "creation": "2021-08-19 15:29:01.167930", + "custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}", "doc_type": "Speaker", "docstatus": 0, "doctype": "Web Form", @@ -18,14 +19,14 @@ "is_standard": 1, "login_required": 1, "max_attachment_size": 0, - "modified": "2021-08-19 15:30:59.041817", + "modified": "2021-08-20 11:24:52.350955", "modified_by": "Administrator", "module": "Event Management", "name": "speaker-registration", "owner": "Administrator", "payment_button_label": "Buy Now", "published": 1, - "route": "event/conference/speaker-registration", + "route": "speaker-registration", "route_to_success_link": 1, "show_attachments": 0, "show_in_grid": 0, @@ -36,6 +37,19 @@ "web_form_fields": [ { "allow_read_on_all_link_options": 0, + "fieldname": "event", + "fieldtype": "Link", + "hidden": 0, + "label": "Event", + "max_length": 0, + "max_value": 0, + "options": "Event Details", + "read_only": 1, + "reqd": 0, + "show_in_filter": 0 + }, + { + "allow_read_on_all_link_options": 1, "fieldname": "user", "fieldtype": "Link", "hidden": 0, @@ -59,18 +73,6 @@ "reqd": 0, "show_in_filter": 0 }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "email", - "fieldtype": "Data", - "hidden": 0, - "label": "Email", - "max_length": 0, - "max_value": 0, - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, { "allow_read_on_all_link_options": 0, "fieldname": "phone_number", diff --git a/community/event_management/web_template/exhibitor_section/exhibitor_section.html b/community/event_management/web_template/exhibitor_section/exhibitor_section.html index c0fc31f6..60e6fadd 100644 --- a/community/event_management/web_template/exhibitor_section/exhibitor_section.html +++ b/community/event_management/web_template/exhibitor_section/exhibitor_section.html @@ -1,14 +1,20 @@
{{ subtitle }}
+ {%- endif -%} +{{ subtitle }}
+{%- endif -%}{{ subtitle }}
+ {%- endif -%}{{ subtitle }}
+ {%- endif -%} + +