From a4dffca4d77259683df4f577e6a708846d529cf7 Mon Sep 17 00:00:00 2001 From: pateljannat Date: Tue, 2 Mar 2021 18:54:37 +0530 Subject: [PATCH] feat: basic doctypes for conference and user profile flow for courses --- .../doctype/community_conference/__init__.py | 0 .../community_conference.js | 8 + .../community_conference.json | 48 ++++++ .../community_conference.py | 10 ++ .../test_community_conference.py | 10 ++ .../__init__.py | 0 .../community_conference_participant.js | 8 + .../community_conference_participant.json | 147 ++++++++++++++++++ .../community_conference_participant.py | 10 ++ .../test_community_conference_participant.py | 10 ++ .../community_conference_request/__init__.py | 0 .../community_conference_request.js | 8 + .../community_conference_request.json | 73 +++++++++ .../community_conference_request.py | 10 ++ .../test_community_conference_request.py | 10 ++ .../community_course_member/__init__.py | 0 .../community_course_member.js | 8 + .../community_course_member.json | 95 +++++++++++ .../community_course_member.py | 62 ++++++++ .../templates/community_course_member.html | 16 ++ .../community_course_member_row.html | 4 + .../test_community_course_member.py | 10 ++ .../community_member/community_member.json | 21 ++- .../community_member/community_member.py | 4 +- .../templates/community_member.html | 19 +++ .../templates/community_member_row.html | 4 + .../community_project/community_project.json | 3 +- .../doctype/tshirt_sizes/__init__.py | 0 .../doctype/tshirt_sizes/test_tshirt_sizes.py | 10 ++ .../doctype/tshirt_sizes/tshirt_sizes.js | 8 + .../doctype/tshirt_sizes/tshirt_sizes.json | 49 ++++++ .../doctype/tshirt_sizes/tshirt_sizes.py | 10 ++ .../community_course_membership/__init__.py | 0 .../community_course_membership.js | 3 + .../community_course_membership.json | 111 +++++++++++++ .../community_course_membership.py | 7 + .../emails/community_course_membership.html | 18 +++ community/www/hackathons/index.html | 2 +- community/www/hackathons/index.py | 4 +- community/www/hackathons/project.py | 114 +++++++------- community/www/jannat.html | 1 + 41 files changed, 868 insertions(+), 67 deletions(-) create mode 100644 community/community/doctype/community_conference/__init__.py create mode 100644 community/community/doctype/community_conference/community_conference.js create mode 100644 community/community/doctype/community_conference/community_conference.json create mode 100644 community/community/doctype/community_conference/community_conference.py create mode 100644 community/community/doctype/community_conference/test_community_conference.py create mode 100644 community/community/doctype/community_conference_participant/__init__.py create mode 100644 community/community/doctype/community_conference_participant/community_conference_participant.js create mode 100644 community/community/doctype/community_conference_participant/community_conference_participant.json create mode 100644 community/community/doctype/community_conference_participant/community_conference_participant.py create mode 100644 community/community/doctype/community_conference_participant/test_community_conference_participant.py create mode 100644 community/community/doctype/community_conference_request/__init__.py create mode 100644 community/community/doctype/community_conference_request/community_conference_request.js create mode 100644 community/community/doctype/community_conference_request/community_conference_request.json create mode 100644 community/community/doctype/community_conference_request/community_conference_request.py create mode 100644 community/community/doctype/community_conference_request/test_community_conference_request.py create mode 100644 community/community/doctype/community_course_member/__init__.py create mode 100644 community/community/doctype/community_course_member/community_course_member.js create mode 100644 community/community/doctype/community_course_member/community_course_member.json create mode 100644 community/community/doctype/community_course_member/community_course_member.py create mode 100644 community/community/doctype/community_course_member/templates/community_course_member.html create mode 100644 community/community/doctype/community_course_member/templates/community_course_member_row.html create mode 100644 community/community/doctype/community_course_member/test_community_course_member.py create mode 100644 community/community/doctype/community_member/templates/community_member.html create mode 100644 community/community/doctype/community_member/templates/community_member_row.html create mode 100644 community/community/doctype/tshirt_sizes/__init__.py create mode 100644 community/community/doctype/tshirt_sizes/test_tshirt_sizes.py create mode 100644 community/community/doctype/tshirt_sizes/tshirt_sizes.js create mode 100644 community/community/doctype/tshirt_sizes/tshirt_sizes.json create mode 100644 community/community/doctype/tshirt_sizes/tshirt_sizes.py create mode 100644 community/community/web_form/community_course_membership/__init__.py create mode 100644 community/community/web_form/community_course_membership/community_course_membership.js create mode 100644 community/community/web_form/community_course_membership/community_course_membership.json create mode 100644 community/community/web_form/community_course_membership/community_course_membership.py create mode 100644 community/templates/emails/community_course_membership.html create mode 100644 community/www/jannat.html diff --git a/community/community/doctype/community_conference/__init__.py b/community/community/doctype/community_conference/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/community/community/doctype/community_conference/community_conference.js b/community/community/doctype/community_conference/community_conference.js new file mode 100644 index 00000000..1c87c1cf --- /dev/null +++ b/community/community/doctype/community_conference/community_conference.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, Frappe and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Community Conference', { + // refresh: function(frm) { + + // } +}); diff --git a/community/community/doctype/community_conference/community_conference.json b/community/community/doctype/community_conference/community_conference.json new file mode 100644 index 00000000..e6d0c0c6 --- /dev/null +++ b/community/community/doctype/community_conference/community_conference.json @@ -0,0 +1,48 @@ +{ + "actions": [], + "creation": "2021-02-25 17:12:51.981534", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "conference_name", + "live_stream_url" + ], + "fields": [ + { + "fieldname": "conference_name", + "fieldtype": "Data", + "label": "Conference Name" + }, + { + "fieldname": "live_stream_url", + "fieldtype": "Data", + "label": "Live Stream URL" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2021-02-25 17:12:51.981534", + "modified_by": "Administrator", + "module": "Community", + "name": "Community Conference", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/community/community/doctype/community_conference/community_conference.py b/community/community/doctype/community_conference/community_conference.py new file mode 100644 index 00000000..22a1aa41 --- /dev/null +++ b/community/community/doctype/community_conference/community_conference.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, Frappe and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class CommunityConference(Document): + pass diff --git a/community/community/doctype/community_conference/test_community_conference.py b/community/community/doctype/community_conference/test_community_conference.py new file mode 100644 index 00000000..7a6360a3 --- /dev/null +++ b/community/community/doctype/community_conference/test_community_conference.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, Frappe and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestCommunityConference(unittest.TestCase): + pass diff --git a/community/community/doctype/community_conference_participant/__init__.py b/community/community/doctype/community_conference_participant/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/community/community/doctype/community_conference_participant/community_conference_participant.js b/community/community/doctype/community_conference_participant/community_conference_participant.js new file mode 100644 index 00000000..ad4c54d7 --- /dev/null +++ b/community/community/doctype/community_conference_participant/community_conference_participant.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, Frappe and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Community Conference Participant', { + // refresh: function(frm) { + + // } +}); diff --git a/community/community/doctype/community_conference_participant/community_conference_participant.json b/community/community/doctype/community_conference_participant/community_conference_participant.json new file mode 100644 index 00000000..b944d44b --- /dev/null +++ b/community/community/doctype/community_conference_participant/community_conference_participant.json @@ -0,0 +1,147 @@ +{ + "actions": [], + "autoname": "CON-.YYYY.-.###", + "creation": "2021-02-25 17:51:23.959033", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "participant_details", + "participant_name", + "participant_designation", + "column_break_4", + "email", + "conference_details", + "year", + "full_conference_tickets", + "user_conference_tickets", + "paid", + "column_break_11", + "tshirt_table", + "tshirt_size", + "currency", + "amount", + "thank_you_email_sent" + ], + "fields": [ + { + "fieldname": "participant_details", + "fieldtype": "Section Break", + "label": "Participant Details" + }, + { + "fieldname": "participant_name", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Participant Name", + "reqd": 1 + }, + { + "fieldname": "participant_designation", + "fieldtype": "Select", + "label": "Participant Designation", + "options": "\nCxO\nAnalyst\nConsultant\nDeveloper\nSystem Administrator\nOther" + }, + { + "fieldname": "column_break_4", + "fieldtype": "Column Break" + }, + { + "fieldname": "email", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Email", + "options": "Email", + "reqd": 1 + }, + { + "fieldname": "conference_details", + "fieldtype": "Section Break", + "label": "Conference Details" + }, + { + "fieldname": "year", + "fieldtype": "Select", + "label": "Year", + "options": "\n2017\n2018\n2019\n2020\n2021\n2022\n2023\n2024\n2025" + }, + { + "fieldname": "full_conference_tickets", + "fieldtype": "Int", + "in_list_view": 1, + "label": "Full Conference Tickets", + "reqd": 1 + }, + { + "fieldname": "user_conference_tickets", + "fieldtype": "Int", + "label": "User Conference Tickets" + }, + { + "default": "0", + "fieldname": "paid", + "fieldtype": "Check", + "label": "Paid" + }, + { + "fieldname": "column_break_11", + "fieldtype": "Column Break" + }, + { + "fieldname": "tshirt_table", + "fieldtype": "Data", + "label": "T-Shirt Sizes" + }, + { + "fieldname": "tshirt_size", + "fieldtype": "Select", + "label": "T-Shirt Size", + "options": "S\nM\nL\nXL\nXXL\nXXXL" + }, + { + "fieldname": "currency", + "fieldtype": "Select", + "in_list_view": 1, + "label": "Currency", + "options": "USD\nINR", + "reqd": 1 + }, + { + "fieldname": "amount", + "fieldtype": "Currency", + "label": "Amount", + "reqd": 1 + }, + { + "default": "0", + "fieldname": "thank_you_email_sent", + "fieldtype": "Check", + "label": "Thank You Email Sent" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2021-02-25 17:51:23.959033", + "modified_by": "Administrator", + "module": "Community", + "name": "Community Conference Participant", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/community/community/doctype/community_conference_participant/community_conference_participant.py b/community/community/doctype/community_conference_participant/community_conference_participant.py new file mode 100644 index 00000000..7bf3f449 --- /dev/null +++ b/community/community/doctype/community_conference_participant/community_conference_participant.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, Frappe and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class CommunityConferenceParticipant(Document): + pass diff --git a/community/community/doctype/community_conference_participant/test_community_conference_participant.py b/community/community/doctype/community_conference_participant/test_community_conference_participant.py new file mode 100644 index 00000000..482021a8 --- /dev/null +++ b/community/community/doctype/community_conference_participant/test_community_conference_participant.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, Frappe and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestCommunityConferenceParticipant(unittest.TestCase): + pass diff --git a/community/community/doctype/community_conference_request/__init__.py b/community/community/doctype/community_conference_request/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/community/community/doctype/community_conference_request/community_conference_request.js b/community/community/doctype/community_conference_request/community_conference_request.js new file mode 100644 index 00000000..15d4808f --- /dev/null +++ b/community/community/doctype/community_conference_request/community_conference_request.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, Frappe and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Community Conference Request', { + // refresh: function(frm) { + + // } +}); diff --git a/community/community/doctype/community_conference_request/community_conference_request.json b/community/community/doctype/community_conference_request/community_conference_request.json new file mode 100644 index 00000000..25d8b667 --- /dev/null +++ b/community/community/doctype/community_conference_request/community_conference_request.json @@ -0,0 +1,73 @@ +{ + "actions": [], + "creation": "2021-02-25 17:19:10.378290", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "contact_name", + "contact_number", + "email", + "organization_name", + "request_type", + "message" + ], + "fields": [ + { + "fieldname": "contact_name", + "fieldtype": "Data", + "label": "Contact Name" + }, + { + "fieldname": "contact_number", + "fieldtype": "Data", + "label": "Contact Number" + }, + { + "fieldname": "email", + "fieldtype": "Data", + "label": "Email" + }, + { + "fieldname": "organization_name", + "fieldtype": "Data", + "label": "Organization Name" + }, + { + "fieldname": "request_type", + "fieldtype": "Select", + "label": "Request Type", + "options": "Sponsorship\nExhibit Program" + }, + { + "fieldname": "message", + "fieldtype": "Text Editor", + "label": "Message" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2021-02-25 17:19:10.378290", + "modified_by": "Administrator", + "module": "Community", + "name": "Community Conference Request", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/community/community/doctype/community_conference_request/community_conference_request.py b/community/community/doctype/community_conference_request/community_conference_request.py new file mode 100644 index 00000000..b8fb93ef --- /dev/null +++ b/community/community/doctype/community_conference_request/community_conference_request.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, Frappe and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class CommunityConferenceRequest(Document): + pass diff --git a/community/community/doctype/community_conference_request/test_community_conference_request.py b/community/community/doctype/community_conference_request/test_community_conference_request.py new file mode 100644 index 00000000..a1a6934b --- /dev/null +++ b/community/community/doctype/community_conference_request/test_community_conference_request.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, Frappe and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestCommunityConferenceRequest(unittest.TestCase): + pass diff --git a/community/community/doctype/community_course_member/__init__.py b/community/community/doctype/community_course_member/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/community/community/doctype/community_course_member/community_course_member.js b/community/community/doctype/community_course_member/community_course_member.js new file mode 100644 index 00000000..a01a2c7c --- /dev/null +++ b/community/community/doctype/community_course_member/community_course_member.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, Frappe and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Community Course Member', { + // refresh: function(frm) { + + // } +}); diff --git a/community/community/doctype/community_course_member/community_course_member.json b/community/community/doctype/community_course_member/community_course_member.json new file mode 100644 index 00000000..2306cbb8 --- /dev/null +++ b/community/community/doctype/community_course_member/community_course_member.json @@ -0,0 +1,95 @@ +{ + "actions": [], + "autoname": "field:user_name", + "creation": "2021-03-02 11:24:49.612530", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "enabled", + "full_name", + "user_name", + "email", + "short_intro", + "bio", + "photo", + "route" + ], + "fields": [ + { + "default": "1", + "fieldname": "enabled", + "fieldtype": "Check", + "label": "Enabled" + }, + { + "fieldname": "full_name", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Full Name", + "reqd": 1 + }, + { + "fieldname": "user_name", + "fieldtype": "Data", + "in_list_view": 1, + "label": "User Name", + "reqd": 1, + "unique": 1 + }, + { + "fieldname": "email", + "fieldtype": "Data", + "label": "Email", + "options": "Email" + }, + { + "fieldname": "short_intro", + "fieldtype": "Data", + "label": "Short Intro" + }, + { + "fieldname": "bio", + "fieldtype": "Markdown Editor", + "label": "Bio" + }, + { + "fieldname": "photo", + "fieldtype": "Attach Image", + "label": "Photo" + }, + { + "fieldname": "route", + "fieldtype": "Data", + "label": "Route" + } + ], + "has_web_view": 1, + "index_web_pages_for_search": 1, + "is_published_field": "enabled", + "links": [], + "modified": "2021-03-02 17:53:40.252130", + "modified_by": "Administrator", + "module": "Community", + "name": "Community Course Member", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "route": "username", + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/community/community/doctype/community_course_member/community_course_member.py b/community/community/doctype/community_course_member/community_course_member.py new file mode 100644 index 00000000..78502c96 --- /dev/null +++ b/community/community/doctype/community_course_member/community_course_member.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, Frappe and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +import re +from frappe.website.website_generator import WebsiteGenerator +from frappe import _ + +class CommunityCourseMember(WebsiteGenerator): + def validate(self): + self.validate_user_name() + if not self.route: + self.route = "username/" + self.user_name + + def validate_user_name(self): + if len(self.user_name) < 4: + frappe.throw(_("Username must be atleast 4 characters long.")) + if not re.match("^[A-Za-z0-9_]*$", self.user_name): + frappe.throw(_("Username can only contain alphabets, numbers, and underscore.")) + self.user_name = self.user_name.lower() + + def after_insert(self): + if frappe.db.exists("User", self.email): + user = frappe.get_doc("User", self.email) + else: + user, update_password_link = self.create_user() + self.send_email(update_password_link) + + def send_email(self, update_password_link): + + args = { + 'update_password_link': update_password_link, + 'full_name': self.full_name, + } + + frappe.sendmail( + recipients=self.email, + sender="Administrator", + subject=_("Set your Password"), + template="community_course_membership", + reference_doctype=self.doctype, + reference_name=self.name, + send_priority=0, + queue_separately=True, + args=args) + + def create_user(self): + user = frappe.get_doc({ + "doctype": "User", + "email": self.email, + "first_name": self.full_name.split(" ")[0], + "full_name": self.full_name, + "username": self.user_name, + "send_welcome_email": 0, + "user_type": 'Website User', + "redirect_url": "username/" + self.name + }) + user.save(ignore_permissions=True) + update_password_link = user.reset_password() + return user, update_password_link diff --git a/community/community/doctype/community_course_member/templates/community_course_member.html b/community/community/doctype/community_course_member/templates/community_course_member.html new file mode 100644 index 00000000..f22d535c --- /dev/null +++ b/community/community/doctype/community_course_member/templates/community_course_member.html @@ -0,0 +1,16 @@ +{% extends "templates/web.html" %} + +{% block page_content %} +
+
+ {{ full_name }} +
+
+

{{ full_name }}

+

{{ short_intro }}

+

{{ frappe.utils.md_to_html(bio) }}

+
+
+{% endblock %} + + \ No newline at end of file diff --git a/community/community/doctype/community_course_member/templates/community_course_member_row.html b/community/community/doctype/community_course_member/templates/community_course_member_row.html new file mode 100644 index 00000000..6444272c --- /dev/null +++ b/community/community/doctype/community_course_member/templates/community_course_member_row.html @@ -0,0 +1,4 @@ +
+ {{ doc.full_name }} +
+ diff --git a/community/community/doctype/community_course_member/test_community_course_member.py b/community/community/doctype/community_course_member/test_community_course_member.py new file mode 100644 index 00000000..45422930 --- /dev/null +++ b/community/community/doctype/community_course_member/test_community_course_member.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, Frappe and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestCommunityCourseMember(unittest.TestCase): + pass diff --git a/community/community/doctype/community_member/community_member.json b/community/community/doctype/community_member/community_member.json index d6be86d9..0880d1a7 100644 --- a/community/community/doctype/community_member/community_member.json +++ b/community/community/doctype/community_member/community_member.json @@ -1,6 +1,6 @@ { "actions": [], - "autoname": "field:full_name", + "autoname": "field:user_name", "creation": "2021-02-12 15:47:23.591567", "doctype": "DocType", "editable_grid": 1, @@ -11,7 +11,9 @@ "role", "photo", "short_intro", - "bio" + "bio", + "user_name", + "route" ], "fields": [ { @@ -49,13 +51,24 @@ { "allow_in_quick_entry": 1, "fieldname": "bio", - "fieldtype": "HTML Editor", + "fieldtype": "Markdown Editor", "label": "Bio" + }, + { + "fieldname": "user_name", + "fieldtype": "Data", + "label": "User Name", + "unique": 1 + }, + { + "fieldname": "route", + "fieldtype": "Data", + "label": "Route" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-02-15 12:16:32.428546", + "modified": "2021-03-02 11:24:28.763348", "modified_by": "Administrator", "module": "Community", "name": "Community Member", diff --git a/community/community/doctype/community_member/community_member.py b/community/community/doctype/community_member/community_member.py index 27bb9750..a5d88aba 100644 --- a/community/community/doctype/community_member/community_member.py +++ b/community/community/doctype/community_member/community_member.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals # import frappe -from frappe.model.document import Document +from frappe.website.website_generator import WebsiteGenerator -class CommunityMember(Document): +class CommunityMember(WebsiteGenerator): pass diff --git a/community/community/doctype/community_member/templates/community_member.html b/community/community/doctype/community_member/templates/community_member.html new file mode 100644 index 00000000..566ae37d --- /dev/null +++ b/community/community/doctype/community_member/templates/community_member.html @@ -0,0 +1,19 @@ +{% extends "templates/web.html" %} + +{% block page_content %} +
+
+ {{ full_name }} +
+
+

{{ full_name }}

+

{{ short_intro }}

+
+
Role: {{ role }}
+
+

{{ frappe.utils.md_to_html(bio) }}

+
+
+{% endblock %} + + \ No newline at end of file diff --git a/community/community/doctype/community_member/templates/community_member_row.html b/community/community/doctype/community_member/templates/community_member_row.html new file mode 100644 index 00000000..d7014b45 --- /dev/null +++ b/community/community/doctype/community_member/templates/community_member_row.html @@ -0,0 +1,4 @@ +
+ {{ doc.title or doc.name }} +
+ diff --git a/community/community/doctype/community_project/community_project.json b/community/community/doctype/community_project/community_project.json index c31019b3..a3e52305 100644 --- a/community/community/doctype/community_project/community_project.json +++ b/community/community/doctype/community_project/community_project.json @@ -1,5 +1,6 @@ { "actions": [], + "allow_import": 1, "autoname": "field:project_name", "creation": "2021-02-12 18:28:33.440328", "doctype": "DocType", @@ -85,7 +86,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-02-23 11:21:47.948253", + "modified": "2021-02-24 15:52:56.588565", "modified_by": "Administrator", "module": "Community", "name": "Community Project", diff --git a/community/community/doctype/tshirt_sizes/__init__.py b/community/community/doctype/tshirt_sizes/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/community/community/doctype/tshirt_sizes/test_tshirt_sizes.py b/community/community/doctype/tshirt_sizes/test_tshirt_sizes.py new file mode 100644 index 00000000..8fe5b122 --- /dev/null +++ b/community/community/doctype/tshirt_sizes/test_tshirt_sizes.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, Frappe and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestTShirtSizes(unittest.TestCase): + pass diff --git a/community/community/doctype/tshirt_sizes/tshirt_sizes.js b/community/community/doctype/tshirt_sizes/tshirt_sizes.js new file mode 100644 index 00000000..af2f720a --- /dev/null +++ b/community/community/doctype/tshirt_sizes/tshirt_sizes.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, Frappe and contributors +// For license information, please see license.txt + +frappe.ui.form.on('TShirt Sizes', { + // refresh: function(frm) { + + // } +}); diff --git a/community/community/doctype/tshirt_sizes/tshirt_sizes.json b/community/community/doctype/tshirt_sizes/tshirt_sizes.json new file mode 100644 index 00000000..ae427958 --- /dev/null +++ b/community/community/doctype/tshirt_sizes/tshirt_sizes.json @@ -0,0 +1,49 @@ +{ + "actions": [], + "creation": "2021-02-25 17:52:49.813558", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "size", + "quantity" + ], + "fields": [ + { + "fieldname": "size", + "fieldtype": "Select", + "label": "Size", + "options": "S\nM\nL\nXL\nXXL\nXXXL" + }, + { + "fieldname": "quantity", + "fieldtype": "Int", + "label": "Quantity" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2021-02-25 17:52:49.813558", + "modified_by": "Administrator", + "module": "Community", + "name": "TShirt Sizes", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/community/community/doctype/tshirt_sizes/tshirt_sizes.py b/community/community/doctype/tshirt_sizes/tshirt_sizes.py new file mode 100644 index 00000000..7825023a --- /dev/null +++ b/community/community/doctype/tshirt_sizes/tshirt_sizes.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, Frappe and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class TShirtSizes(Document): + pass diff --git a/community/community/web_form/community_course_membership/__init__.py b/community/community/web_form/community_course_membership/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/community/community/web_form/community_course_membership/community_course_membership.js b/community/community/web_form/community_course_membership/community_course_membership.js new file mode 100644 index 00000000..699703c5 --- /dev/null +++ b/community/community/web_form/community_course_membership/community_course_membership.js @@ -0,0 +1,3 @@ +frappe.ready(function() { + // bind events here +}) \ No newline at end of file diff --git a/community/community/web_form/community_course_membership/community_course_membership.json b/community/community/web_form/community_course_membership/community_course_membership.json new file mode 100644 index 00000000..288eefc7 --- /dev/null +++ b/community/community/web_form/community_course_membership/community_course_membership.json @@ -0,0 +1,111 @@ +{ + "accept_payment": 0, + "allow_comments": 0, + "allow_delete": 0, + "allow_edit": 0, + "allow_incomplete": 0, + "allow_multiple": 0, + "allow_print": 0, + "amount": 0.0, + "amount_based_on_field": 0, + "apply_document_permissions": 0, + "button_label": "Submit", + "creation": "2021-03-02 11:31:39.072501", + "doc_type": "Community Course Member", + "docstatus": 0, + "doctype": "Web Form", + "idx": 0, + "is_standard": 1, + "login_required": 0, + "max_attachment_size": 0, + "modified": "2021-03-02 11:31:39.072501", + "modified_by": "Administrator", + "module": "Community", + "name": "community-course-membership", + "owner": "Administrator", + "payment_button_label": "Buy Now", + "published": 1, + "route": "community-course-membership", + "route_to_success_link": 0, + "show_attachments": 0, + "show_in_grid": 0, + "show_sidebar": 0, + "sidebar_items": [], + "success_url": "/community-course-membership", + "title": "Community Course Membership", + "web_form_fields": [ + { + "allow_read_on_all_link_options": 0, + "fieldname": "full_name", + "fieldtype": "Data", + "hidden": 0, + "label": "Full Name", + "max_length": 0, + "max_value": 0, + "read_only": 0, + "reqd": 1, + "show_in_filter": 0 + }, + { + "allow_read_on_all_link_options": 0, + "fieldname": "user_name", + "fieldtype": "Data", + "hidden": 0, + "label": "User Name", + "max_length": 0, + "max_value": 0, + "read_only": 0, + "reqd": 1, + "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, + "options": "Email", + "read_only": 0, + "reqd": 0, + "show_in_filter": 0 + }, + { + "allow_read_on_all_link_options": 0, + "fieldname": "short_intro", + "fieldtype": "Data", + "hidden": 0, + "label": "Short Intro", + "max_length": 0, + "max_value": 0, + "read_only": 0, + "reqd": 0, + "show_in_filter": 0 + }, + { + "allow_read_on_all_link_options": 0, + "fieldname": "bio", + "fieldtype": "Data", + "hidden": 0, + "label": "Bio", + "max_length": 0, + "max_value": 0, + "read_only": 0, + "reqd": 0, + "show_in_filter": 0 + }, + { + "allow_read_on_all_link_options": 0, + "fieldname": "photo", + "fieldtype": "Attach Image", + "hidden": 0, + "label": "Photo", + "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/community/web_form/community_course_membership/community_course_membership.py b/community/community/web_form/community_course_membership/community_course_membership.py new file mode 100644 index 00000000..2334f8b2 --- /dev/null +++ b/community/community/web_form/community_course_membership/community_course_membership.py @@ -0,0 +1,7 @@ +from __future__ import unicode_literals + +import frappe + +def get_context(context): + # do your magic here + pass diff --git a/community/templates/emails/community_course_membership.html b/community/templates/emails/community_course_membership.html new file mode 100644 index 00000000..d432fe39 --- /dev/null +++ b/community/templates/emails/community_course_membership.html @@ -0,0 +1,18 @@ +

{{_("Set your Password")}}

+

Dear {{ full_name }},

+

{{ _("") }}

+ +{% if update_password_link %} + +

{{_("Please click on the following button to set your new password")}}:

+

+ +

+ +{% endif %} + +

{{_("Regards")}},
+ {{ _("Team Community") }}


\ No newline at end of file diff --git a/community/www/hackathons/index.html b/community/www/hackathons/index.html index 8b393d91..d434d8b3 100644 --- a/community/www/hackathons/index.html +++ b/community/www/hackathons/index.html @@ -4,7 +4,7 @@ {% from "www/hackathons/macros/card.html" import null_card %} {% block head_include %} - +