non-profit module cleanups
This commit is contained in:
parent
54f5b115a7
commit
419db49806
@ -11,12 +11,7 @@ def get_data():
|
||||
"type": "doctype",
|
||||
"name": "Chapter",
|
||||
"description": _("Chapter information."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Chapter Message",
|
||||
"description": _("Chapter Message."),
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -1,7 +1,13 @@
|
||||
data = {
|
||||
'desktop_icons': [
|
||||
'Non Profit',
|
||||
'Sales Invoice',
|
||||
'Member',
|
||||
'Donor',
|
||||
'Volunteer',
|
||||
'Grant Application',
|
||||
'Accounts',
|
||||
'Buying',
|
||||
'HR',
|
||||
'ToDo'
|
||||
],
|
||||
'modules': [
|
||||
|
@ -147,7 +147,7 @@ standard_portal_menu_items = [
|
||||
{"title": _("Fees"), "route": "/fees", "reference_doctype": "Fees", "role":"Student"},
|
||||
{"title": _("Newsletter"), "route": "/newsletters", "reference_doctype": "Newsletter"},
|
||||
{"title": _("Admission"), "route": "/admissions", "reference_doctype": "Student Admission"},
|
||||
{"title": _("Grant Application"), "route": "/grant-application", "reference_doctype": "Grant Application"},
|
||||
{"title": _("Grant Application"), "route": "/grant-application", "reference_doctype": "Grant Application", "role": "Non Profit Portal User"},
|
||||
{"title": _("Chapter"), "route": "/chapters", "reference_doctype": "Chapter"}
|
||||
]
|
||||
|
||||
|
@ -13,36 +13,6 @@
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "title",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Chapter Name",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
@ -386,7 +356,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-05 07:04:18.311063",
|
||||
"modified": "2017-12-06 11:45:54.559482",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Non Profit",
|
||||
"name": "Chapter",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% if doc.published %}
|
||||
<div style="margin-bottom: 30px; max-width: 600px" class="with-border clickable">
|
||||
<a href="/{{ doc.route }}">
|
||||
<h3>{{ doc.title }}</h3>
|
||||
<h3>{{ doc.name }}</h3>
|
||||
<p>
|
||||
<span class="label">{{ frappe.db.get_value('User', chapter_head, 'full_name') }}</span>
|
||||
<span class="label">
|
||||
|
@ -56,7 +56,7 @@
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Introduction",
|
||||
"length": 0,
|
||||
@ -86,7 +86,7 @@
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Website URL",
|
||||
"length": 0,
|
||||
@ -144,7 +144,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-11-20 17:41:19.173820",
|
||||
"modified": "2017-12-06 11:33:34.300252",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Non Profit",
|
||||
"name": "Chapter Member",
|
||||
|
@ -3,7 +3,7 @@
|
||||
"allow_guest_to_view": 1,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"autoname": "field:email",
|
||||
"autoname": "",
|
||||
"beta": 0,
|
||||
"creation": "2017-09-21 12:02:01.206913",
|
||||
"custom": 0,
|
||||
@ -19,7 +19,38 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "title",
|
||||
"fieldname": "applicant_type",
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Applicant Type",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Individual\nOrganization",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "applicant_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
@ -49,70 +80,9 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "organization_type",
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Organization Type",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Individual\nOrganization",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "company",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Company",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Company",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "column_break_5",
|
||||
"fieldtype": "Column Break",
|
||||
"depends_on": "eval:doc.applicant_type=='Organization'",
|
||||
"fieldname": "contact_person",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
@ -120,6 +90,7 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
@ -170,8 +141,8 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "website_url",
|
||||
"fieldtype": "Data",
|
||||
"fieldname": "column_break_5",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
@ -179,7 +150,6 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Website URL",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
@ -232,21 +202,52 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "image",
|
||||
"fieldtype": "Attach Image",
|
||||
"hidden": 1,
|
||||
"fieldname": "website_url",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Image",
|
||||
"label": "Website URL",
|
||||
"length": 0,
|
||||
"no_copy": 1,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 1,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "company",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Company",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Company",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
@ -436,36 +437,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "grant_purpose",
|
||||
"fieldtype": "Long Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Grant Purpose",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
@ -502,7 +473,7 @@
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "amount",
|
||||
"fieldtype": "Float",
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
@ -520,7 +491,7 @@
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
@ -531,7 +502,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "grant_past_record",
|
||||
"fieldname": "has_any_past_grant_record",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
@ -540,7 +511,7 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Past Grant Record",
|
||||
"label": "Has any past Grant Record",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "",
|
||||
@ -690,7 +661,7 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Assessment Mark ( out of 10 )",
|
||||
"label": "Assessment Mark (Out of 10)",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
@ -720,7 +691,7 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "note",
|
||||
"label": "Note",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
@ -824,74 +795,13 @@
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "default_payable_accounts",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Accounting",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "accounts",
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Accounts",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Party Account",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
"has_web_view": 1,
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_field": "image",
|
||||
"image_field": "",
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"is_published_field": "published",
|
||||
@ -899,7 +809,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-05 06:59:50.313267",
|
||||
"modified": "2017-12-06 12:39:57.677899",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Non Profit",
|
||||
"name": "Grant Application",
|
||||
@ -935,7 +845,7 @@
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"title_field": "",
|
||||
"title_field": "applicant_name",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
}
|
@ -15,7 +15,7 @@ class GrantApplication(WebsiteGenerator):
|
||||
)
|
||||
|
||||
def validate(self):
|
||||
if not self.route: #pylint: disable=E0203
|
||||
if not self.route: #pylint: disable=E0203
|
||||
self.route = 'grant-application/' + self.scrub(self.name)
|
||||
|
||||
def onload(self):
|
||||
@ -34,9 +34,8 @@ def get_list_context(context):
|
||||
context.no_breadcrumbs = True
|
||||
context.show_sidebar = True
|
||||
context.order_by = 'creation desc'
|
||||
context.introduction ='<div>Grant Application List</div><br><a class="btn btn-primary" href="/my-grant?new=1">Apply for new Grant Application</a>'
|
||||
|
||||
|
||||
context.introduction ='''<a class="btn btn-primary" href="/my-grant?new=1">
|
||||
Apply for new Grant Application</a>'''
|
||||
|
||||
@frappe.whitelist()
|
||||
def send_grant_review_emails(grant_application):
|
||||
@ -45,8 +44,8 @@ def send_grant_review_emails(grant_application):
|
||||
frappe.sendmail(
|
||||
recipients= grant.assessment_manager,
|
||||
sender=frappe.session.user,
|
||||
subject=grant.title,
|
||||
message='<p> Please Review this grant application</p><br>'+url,
|
||||
subject='Grant Application for {0}'.format(grant.applicant_name),
|
||||
message='<p> Please Review this grant application</p><br>' + url,
|
||||
reference_doctype=grant.doctype,
|
||||
reference_name=grant.name
|
||||
)
|
||||
|
@ -1,3 +0,0 @@
|
||||
frappe.listview_settings['Grant Application'] = {
|
||||
add_fields: ["name", "image"],
|
||||
};
|
@ -1,7 +1,7 @@
|
||||
{% extends "templates/web.html" %}
|
||||
|
||||
{% block page_content %}
|
||||
<h1>{{ title }}</h1>
|
||||
<h1>{{ applicant_name }}</h1>
|
||||
{% if frappe.user == owner %}
|
||||
<p><a class='btn btn-primary btn-sm' href="/my-grant?name={{ name }}">Edit Grant</a></p>
|
||||
{% endif %}
|
||||
@ -9,11 +9,11 @@
|
||||
<table class='table table-bordered small' style='max-width: 400px; margin-bottom: 0px;'>
|
||||
<tr>
|
||||
<td style='width: 38.2%'>Organization/Indvidual</td>
|
||||
<td>{{ organization_type }}</td>
|
||||
<td>{{ applicant_type }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Grant Applicant Name</td>
|
||||
<td>{{ title}}</td>
|
||||
<td>{{ applicant_name}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Date</td>
|
||||
@ -30,15 +30,19 @@
|
||||
</table>
|
||||
<h2>Q. Please outline your current situation and why you are applying for a grant?</h2>
|
||||
<p> {{ grant_description }}</p>
|
||||
<h2>Q. Please describe the purpose of the grant and how it will benfit your organization?</h2>
|
||||
<p>{{ grant_purpose }}</p>
|
||||
<h2>Q. Requested grant amount details?</h2>
|
||||
<h2>Q. Requested grant amount</h2>
|
||||
<p>{{ amount }}</p>
|
||||
<h2>Q. Have you recevied grant from us before?</h2>
|
||||
<p>{{ grant_past_record }}</p>
|
||||
<p>{{ has_any_past_grant_record }}</p>
|
||||
<h3>Contact</h3>
|
||||
{% if frappe.user != 'Guest' %}
|
||||
<table class='table table-bordered small' style='max-width: 400px; margin-bottom: 0px;'>
|
||||
{% if contact_person %}
|
||||
<tr>
|
||||
<td style='width: 38.2%'>Contact Person</td>
|
||||
<td>{{ contact_person }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td style='width: 38.2%'>Email</td>
|
||||
<td>{{ email }}</td>
|
||||
@ -55,27 +59,4 @@
|
||||
{% else %}
|
||||
<p><br><a href="/my-grant?new=1" class='btn btn-primary'>Post a New Grant</a></p>
|
||||
{% endif %}
|
||||
<script>
|
||||
frappe.ready(function(title) {
|
||||
$(".btn-default").on("click", function() {
|
||||
var scale = $("#scale").val();
|
||||
var note = $("#note").val();
|
||||
var title = $(this).attr("data-title");
|
||||
console.log(scale, note, title);
|
||||
frappe.call({
|
||||
method: 'erpnext.non_profit.doctype.grant_application.grant_application.assessment_result',
|
||||
args: {
|
||||
assessment_scale: scale,
|
||||
note: note,
|
||||
title: title
|
||||
},
|
||||
callback: function(r) {
|
||||
if(r.message) {
|
||||
frappe.msgprint(r.message)
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
@ -2,7 +2,7 @@
|
||||
<div style='margin-bottom: 30px; max-width: 600px;'
|
||||
class='with-border clickable'>
|
||||
<a href="/{{ doc.route }}">
|
||||
<h3 style='margin-top: 0px;'>{{ doc.title }}</h3>
|
||||
<h3 style='margin-top: 0px;'>{{ doc.name }}</h3>
|
||||
<p>
|
||||
<span class='label'>{{ frappe.format_date(doc.creation) }}</span>
|
||||
</p>
|
||||
|
@ -12,17 +12,15 @@ QUnit.test("test: Grant Application", function (assert) {
|
||||
// insert a new Member
|
||||
() => frappe.tests.make('Grant Application', [
|
||||
// values to be set
|
||||
{title: 'Test Organization'},
|
||||
{name:'Test Applicant'},
|
||||
{applicant_name: 'Test Organization'},
|
||||
{contact_person:'Test Applicant'},
|
||||
{email: 'test@example.com'},
|
||||
{grant_description:'Test message'},
|
||||
{grant_purpose: 'Test Meesage'},
|
||||
{amount: 150000},
|
||||
{grant_past_record:'NO'}
|
||||
{amount: 150000}
|
||||
]),
|
||||
() => {
|
||||
assert.equal(cur_frm.doc.title, 'Test Organization');
|
||||
assert.equal(cur_frm.doc.grant_applicant_name, 'Test Applicant');
|
||||
assert.equal(cur_frm.doc.applicant_name, 'Test Organization');
|
||||
assert.equal(cur_frm.doc.contact_person, 'Test Applicant');
|
||||
assert.equal(cur_frm.doc.email, 'test@example.com');
|
||||
assert.equal(cur_frm.doc.amount, 150000);
|
||||
},
|
||||
|
@ -15,12 +15,8 @@ QUnit.test("test: Volunteer", function (assert) {
|
||||
{volunteer_name: 'Test Volunteer'},
|
||||
{volunteer_type:'Test Work'},
|
||||
{email:'test@example.com'},
|
||||
{volunteer_availability_table:[
|
||||
[
|
||||
{'volunteer_availability': 'Weekends'},
|
||||
]
|
||||
]},
|
||||
{volunteer_skills_table:[
|
||||
{'availability': 'Weekends'},
|
||||
{volunteer_skills:[
|
||||
[
|
||||
{'volunteer_skills': 'Fundraiser'},
|
||||
]
|
||||
@ -30,7 +26,7 @@ QUnit.test("test: Volunteer", function (assert) {
|
||||
assert.equal(cur_frm.doc.volunteer_name, 'Test Volunteer');
|
||||
assert.equal(cur_frm.doc.volunteer_type, 'Test Work');
|
||||
assert.equal(cur_frm.doc.email, 'test@example.com');
|
||||
assert.equal(cur_frm.doc.volunteer_availability_table[0].volunteer_availability, 'Weekends');
|
||||
assert.equal(cur_frm.doc.availability, 'Weekends');
|
||||
},
|
||||
() => done()
|
||||
]);
|
||||
|
@ -298,7 +298,7 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Volunteer Availability and Skills Details",
|
||||
"label": "Availability and Skills",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
@ -319,8 +319,8 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "volunteer_availability_table",
|
||||
"fieldtype": "Table",
|
||||
"fieldname": "availability",
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
@ -328,10 +328,41 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Volunteer Availability",
|
||||
"label": "Availability",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Volunteer Availability",
|
||||
"options": "\nWeekly\nWeekdays\nWeekends",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "availability_timeslot",
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Availability Timeslot",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "\nMorning\nAfternoon\nEvening\nAnytime",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
@ -379,7 +410,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "volunteer_skills_table",
|
||||
"fieldname": "volunteer_skills",
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
@ -391,7 +422,7 @@
|
||||
"label": "Volunteer Skills",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Volunteer Skills",
|
||||
"options": "Volunteer Skill",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
@ -475,7 +506,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-05 07:02:20.794687",
|
||||
"modified": "2017-12-06 12:03:08.624579",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Non Profit",
|
||||
"name": "Volunteer",
|
||||
|
@ -1,23 +0,0 @@
|
||||
/* eslint-disable */
|
||||
// rename this file from _test_[name] to test_[name] to activate
|
||||
// and remove above this line
|
||||
|
||||
QUnit.test("test: Volunteer Availability", function (assert) {
|
||||
let done = assert.async();
|
||||
|
||||
// number of asserts
|
||||
assert.expect(1);
|
||||
|
||||
frappe.run_serially([
|
||||
// insert a new Volunteer Availability
|
||||
() => frappe.tests.make('Volunteer Availability', [
|
||||
// values to be set
|
||||
{key: 'value'}
|
||||
]),
|
||||
() => {
|
||||
assert.equal(cur_frm.doc.key, 'value');
|
||||
},
|
||||
() => done()
|
||||
]);
|
||||
|
||||
});
|
@ -1,9 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
class TestVolunteerAvailability(unittest.TestCase):
|
||||
pass
|
@ -1,8 +0,0 @@
|
||||
// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Volunteer Availability', {
|
||||
refresh: function() {
|
||||
|
||||
}
|
||||
});
|
@ -1,73 +0,0 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"beta": 0,
|
||||
"creation": "2017-09-20 15:16:09.175826",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "volunteer_availability",
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Volunteer Availability",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "\nWeekly\nWeekdays\nWeekends\nMorning\nAfternoon\nEvening",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
"has_web_view": 0,
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-11-20 17:43:27.325962",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Non Profit",
|
||||
"name": "Volunteer Availability",
|
||||
"name_case": "",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Non Profit",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from frappe.model.document import Document
|
||||
|
||||
class VolunteerAvailability(Document):
|
||||
pass
|
@ -1,73 +0,0 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"beta": 0,
|
||||
"creation": "2017-09-20 15:26:26.453435",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "volunteer_skills",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Volunteer Skills",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
"has_web_view": 0,
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-11-20 17:43:35.369782",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Non Profit",
|
||||
"name": "Volunteer Skills",
|
||||
"name_case": "",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Non Profit",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from frappe.model.document import Document
|
||||
|
||||
class VolunteerSkills(Document):
|
||||
pass
|
@ -3,7 +3,7 @@
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"autoname": "field:volunteer_type",
|
||||
"autoname": "prompt",
|
||||
"beta": 0,
|
||||
"creation": "2017-09-19 16:13:07.763273",
|
||||
"custom": 0,
|
||||
@ -13,36 +13,6 @@
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "volunteer_type",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 1,
|
||||
"label": "Volunteer Type",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
@ -84,7 +54,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-05 07:05:39.920865",
|
||||
"modified": "2017-12-06 11:52:08.800425",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Non Profit",
|
||||
"name": "Volunteer Type",
|
||||
|
@ -18,7 +18,7 @@
|
||||
"is_standard": 1,
|
||||
"login_required": 1,
|
||||
"max_attachment_size": 0,
|
||||
"modified": "2017-12-05 05:48:57.961053",
|
||||
"modified": "2017-12-06 12:32:16.893289",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Non Profit",
|
||||
"name": "grant-application",
|
||||
@ -32,10 +32,10 @@
|
||||
"title": "Grant Application",
|
||||
"web_form_fields": [
|
||||
{
|
||||
"fieldname": "organization_type",
|
||||
"fieldname": "applicant_type",
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"label": "Organization Type",
|
||||
"label": "Applicant Type",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"options": "Individual\nOrganization",
|
||||
@ -43,7 +43,7 @@
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "title",
|
||||
"fieldname": "applicant_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"label": "Name",
|
||||
@ -73,34 +73,24 @@
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "grant_purpose",
|
||||
"fieldtype": "Text",
|
||||
"hidden": 0,
|
||||
"label": "Grant Purpose",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "amount",
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
"label": "Amount Request",
|
||||
"label": "Requested Amount",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "grant_past_record",
|
||||
"fieldtype": "Select",
|
||||
"fieldname": "has_any_past_grant_record",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"label": "Grant History",
|
||||
"label": "Have you received any grant from us before?",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"options": "YES\nNO",
|
||||
"options": "",
|
||||
"read_only": 0,
|
||||
"reqd": 0
|
||||
},
|
||||
|
@ -10,4 +10,11 @@ def execute():
|
||||
frappe.get_doc({
|
||||
'doctype': 'Domain',
|
||||
'domain': domain
|
||||
}).insert(ignore_permissions=True)
|
||||
|
||||
frappe.get_doc({
|
||||
'doctype': 'Role',
|
||||
'role_name': 'Non Profit Portal User',
|
||||
'desk_access': 0,
|
||||
'restrict_to_domain': domain
|
||||
}).insert(ignore_permissions=True)
|
Loading…
Reference in New Issue
Block a user