Added Student Admissions (#6359)

* Added Student Admissions

* Fixes for Student Application
This commit is contained in:
Neil Trini Lasrado 2016-09-15 14:48:13 +05:30 committed by Rushabh Mehta
parent 33d18dbc9a
commit 83d81203b2
14 changed files with 722 additions and 12 deletions

View File

@ -37,6 +37,10 @@ def get_data():
"type": "doctype", "type": "doctype",
"name": "Student Applicant" "name": "Student Applicant"
}, },
{
"type": "doctype",
"name": "Student Admission"
},
{ {
"type": "doctype", "type": "doctype",
"name": "Program Enrollment" "name": "Program Enrollment"

View File

@ -45,7 +45,7 @@ calendars = ["Task", "Production Order", "Leave Application", "Sales Order", "Ho
fixtures = ["Web Form"] fixtures = ["Web Form"]
website_generators = ["Item Group", "Item", "Sales Partner", "Job Opening"] website_generators = ["Item Group", "Item", "Sales Partner", "Job Opening", "Student Admission"]
website_context = { website_context = {
"favicon": "/assets/erpnext/images/favicon.png", "favicon": "/assets/erpnext/images/favicon.png",
@ -89,6 +89,7 @@ website_route_rules = [
} }
}, },
{"from_route": "/jobs", "to_route": "Job Opening"}, {"from_route": "/jobs", "to_route": "Job Opening"},
{"from_route": "/admissions", "to_route": "Student Admission"},
] ]
portal_menu_items = [ portal_menu_items = [

View File

@ -7,8 +7,6 @@ from __future__ import unicode_literals
import frappe import frappe
from frappe.website.website_generator import WebsiteGenerator from frappe.website.website_generator import WebsiteGenerator
from frappe.utils import quoted
from frappe.utils.user import get_fullname_and_avatar
from frappe import _ from frappe import _
class JobOpening(WebsiteGenerator): class JobOpening(WebsiteGenerator):
@ -18,9 +16,6 @@ class JobOpening(WebsiteGenerator):
page_title_field = "job_title", page_title_field = "job_title",
) )
def make_route(self):
return 'jobs/' + self.scrub(self.job_title)
def get_context(self, context): def get_context(self, context):
context.parents = [{'name': 'jobs', 'title': _('All Jobs') }] context.parents = [{'name': 'jobs', 'title': _('All Jobs') }]

View File

@ -0,0 +1,8 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Student Admission', {
refresh: function(frm) {
}
});

View File

@ -0,0 +1,374 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "field:route",
"beta": 0,
"creation": "2016-09-13 03:05:27.154713",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 1,
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "academic_year",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Academic Year",
"length": 0,
"no_copy": 0,
"options": "Academic Year",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "admission_start_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Admission Start Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "admission_end_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Admission End Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "publish",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Publish on website",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "program",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Program",
"length": 0,
"no_copy": 0,
"options": "Program",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "application_fee",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Application Fee",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "currency",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
"options": "Currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "route",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Route",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_5",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "introduction",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Introduction",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "eligibility",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Eligibility",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-09-15 02:59:15.180465",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Admission",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Academics User",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "program",
"track_seen": 0
}

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.website.website_generator import WebsiteGenerator
from frappe import _
class StudentAdmission(WebsiteGenerator):
website = frappe._dict(
template = "templates/generators/student_admission.html",
condition_field = "publish"
)
def get_context(self, context):
context.parents = [{'name': 'admissions', 'title': _('All Student Admissions') }]
def get_list_context(context):
context.title = _("Student Admissions")

View File

@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
# test_records = frappe.get_test_records('Student Admission')
class TestStudentAdmission(unittest.TestCase):
pass

View File

@ -14,7 +14,7 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 4, "columns": 3,
"fieldname": "full_name", "fieldname": "full_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@ -41,7 +41,7 @@
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0, "columns": 1,
"fieldname": "gender", "fieldname": "gender",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
@ -57,6 +57,33 @@
"precision": "", "precision": "",
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"print_width": "",
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"fieldname": "date_of_birth",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Date of Birth",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
@ -69,14 +96,65 @@
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0, "columns": 0,
"fieldname": "date_of_birth", "fieldname": "column_break_4",
"fieldtype": "Date", "fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"fieldname": "program",
"fieldtype": "Data",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"ignore_xss_filter": 0, "ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Date of Birth", "label": "Program",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 2,
"fieldname": "institution",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Institution",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
@ -101,7 +179,7 @@
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"max_attachments": 0, "max_attachments": 0,
"modified": "2016-09-13 12:39:05.078062", "modified": "2016-09-14 06:03:44.067781",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Schools", "module": "Schools",
"name": "Student Sibling", "name": "Student Sibling",

View File

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

View File

@ -0,0 +1,159 @@
{
"allow_comments": 0,
"allow_delete": 0,
"allow_edit": 1,
"allow_multiple": 1,
"creation": "2016-09-12 02:26:42.447103",
"doc_type": "Student Applicant",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"is_standard": 1,
"login_required": 1,
"modified": "2016-09-15 02:00:28.493759",
"modified_by": "Administrator",
"module": "Schools",
"name": "student-applicant",
"owner": "Administrator",
"published": 1,
"route": "student-applicant",
"sidebar_items": [],
"success_url": "/student-applicant",
"title": "Student Applicant",
"web_form_fields": [
{
"fieldname": "first_name",
"fieldtype": "Data",
"hidden": 0,
"label": "First Name",
"read_only": 0,
"reqd": 1
},
{
"fieldname": "middle_name",
"fieldtype": "Data",
"hidden": 0,
"label": "Middle Name",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "last_name",
"fieldtype": "Data",
"hidden": 0,
"label": "Last Name",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "image",
"fieldtype": "Data",
"hidden": 0,
"label": "Image",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "program",
"fieldtype": "Link",
"hidden": 0,
"label": "Program",
"options": "Program",
"read_only": 0,
"reqd": 1
},
{
"fieldname": "academic_year",
"fieldtype": "Link",
"hidden": 0,
"label": "Academic Year",
"options": "Academic Year",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "date_of_birth",
"fieldtype": "Date",
"hidden": 0,
"label": "Date of Birth",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "blood_group",
"fieldtype": "Select",
"hidden": 0,
"label": "Blood Group",
"options": "\nA+\nA-\nB+\nB-\nO+\nO-\nAB+\nAB-",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "student_email_id",
"fieldtype": "Data",
"hidden": 0,
"label": "Student Email ID",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "student_mobile_number",
"fieldtype": "Data",
"hidden": 0,
"label": "Student Mobile Number",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "nationality",
"fieldtype": "Link",
"hidden": 0,
"label": "Nationality",
"options": "Country",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "address_line_1",
"fieldtype": "Data",
"hidden": 0,
"label": "Address Line 1",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "address_line_2",
"fieldtype": "Data",
"hidden": 0,
"label": "Address Line 2",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "pincode",
"fieldtype": "Data",
"hidden": 0,
"label": "Pincode",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "guardians",
"fieldtype": "Table",
"hidden": 0,
"label": "Guardians",
"options": "Student Guardian",
"read_only": 0,
"reqd": 0
},
{
"fieldname": "siblings",
"fieldtype": "Table",
"hidden": 0,
"label": "Siblings",
"options": "Student Sibling",
"read_only": 0,
"reqd": 0
}
]
}

View File

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

View File

@ -0,0 +1,49 @@
{% extends "templates/web.html" %}
{% block breadcrumbs %}
{% include "templates/includes/breadcrumbs.html" %}
{% endblock %}
{% block header %}
<h1>{{ program }}</h1>
{% endblock %}
{% block page_content %}
{%- if introduction -%}
<div>{{ introduction }}</div>
{% endif %}
{%- if eligibility -%}
<h3> Eligibility </h3>
<div>{{ eligibility }}</div>
{% endif %}
<table class="table table-bordered" style="margin-top: 20px; width: 30%">
<tr>
<th> Academic Year</th>
<td>{{ academic_year }} </td>
</tr>
<tr>
<th> Admission Start Date</th>
<td>{{ frappe.utils.formatdate(admission_start_date) }}</td>
</tr>
<tr>
<th> Admission End Date</th>
<td>{{ frappe.utils.formatdate(admission_end_date) }}</td>
</tr>
<tr>
<th> Application Fee</th>
<td>{{ frappe.utils.fmt_money(application_fee, 2, currency) }}</td>
</tr>
</table>
<p>
<a class='btn btn-primary'
href='/student-applicant?program={{ doc.program }}&academic_year={{ doc.academic_year }}&new=1'>
{{ _("Apply Now") }}</a>
</p>
{% endblock %}