refactor(Job Application): New fields in Job Applicant and webform (#23326)

* refactor(Job Application): New fields in Job Applicant and webform

* fix: translation syntax

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
This commit is contained in:
Kanchan Chauhan 2021-01-15 13:56:03 +05:30 committed by GitHub
parent b1d08126b0
commit d2c71350cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 447 additions and 519 deletions

View File

@ -11,15 +11,24 @@
"field_order": [ "field_order": [
"applicant_name", "applicant_name",
"email_id", "email_id",
"phone_number",
"country",
"status", "status",
"column_break_3", "column_break_3",
"job_title", "job_title",
"source", "source",
"source_name", "source_name",
"applicant_rating",
"section_break_6", "section_break_6",
"notes", "notes",
"cover_letter", "cover_letter",
"resume_attachment" "resume_attachment",
"resume_link",
"section_break_16",
"currency",
"column_break_18",
"lower_range",
"upper_range"
], ],
"fields": [ "fields": [
{ {
@ -91,12 +100,65 @@
"fieldtype": "Data", "fieldtype": "Data",
"label": "Notes", "label": "Notes",
"read_only": 1 "read_only": 1
},
{
"fieldname": "phone_number",
"fieldtype": "Data",
"label": "Phone Number",
"options": "Phone"
},
{
"fieldname": "country",
"fieldtype": "Link",
"label": "Country",
"options": "Country"
},
{
"fieldname": "resume_link",
"fieldtype": "Data",
"label": "Resume Link"
},
{
"fieldname": "applicant_rating",
"fieldtype": "Rating",
"in_list_view": 1,
"label": "Applicant Rating"
},
{
"fieldname": "section_break_16",
"fieldtype": "Section Break",
"label": "Salary Expectation"
},
{
"fieldname": "lower_range",
"fieldtype": "Currency",
"label": "Lower Range",
"options": "currency",
"precision": "0"
},
{
"fieldname": "upper_range",
"fieldtype": "Currency",
"label": "Upper Range",
"options": "currency",
"precision": "0"
},
{
"fieldname": "column_break_18",
"fieldtype": "Column Break"
},
{
"fieldname": "currency",
"fieldtype": "Link",
"label": "Currency",
"options": "Currency"
} }
], ],
"icon": "fa fa-user", "icon": "fa fa-user",
"idx": 1, "idx": 1,
"index_web_pages_for_search": 1,
"links": [], "links": [],
"modified": "2020-01-13 16:19:39.113330", "modified": "2020-09-18 12:39:02.557563",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Job Applicant", "name": "Job Applicant",

View File

@ -1,456 +1,188 @@
{ {
"allow_copy": 0, "actions": [],
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "field:route", "autoname": "field:route",
"beta": 0,
"creation": "2013-01-15 16:13:36", "creation": "2013-01-15 16:13:36",
"custom": 0,
"description": "Description of a Job Opening", "description": "Description of a Job Opening",
"docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "Document", "document_type": "Document",
"editable_grid": 0,
"engine": "InnoDB", "engine": "InnoDB",
"field_order": [
"job_title",
"company",
"status",
"column_break_5",
"designation",
"department",
"staffing_plan",
"planned_vacancies",
"section_break_6",
"publish",
"route",
"column_break_12",
"job_application_route",
"section_break_14",
"description",
"section_break_16",
"currency",
"lower_range",
"upper_range",
"column_break_20",
"publish_salary_range"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "job_title", "fieldname": "job_title",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0,
"label": "Job Title", "label": "Job Title",
"length": 0, "reqd": 1
"no_copy": 0,
"permlevel": 0,
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "company", "fieldname": "company",
"fieldtype": "Link", "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", "label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company", "options": "Company",
"permlevel": 0, "reqd": 1
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "status", "fieldname": "status",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 1, "in_standard_filter": 1,
"label": "Status", "label": "Status",
"length": 0, "options": "Open\nClosed"
"no_copy": 0,
"options": "Open\nClosed",
"permlevel": 0,
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_5", "fieldname": "column_break_5",
"fieldtype": "Column Break", "fieldtype": "Column 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,
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "designation", "fieldname": "designation",
"fieldtype": "Link", "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": "Designation", "label": "Designation",
"length": 0,
"no_copy": 0,
"options": "Designation", "options": "Designation",
"permlevel": 0, "reqd": 1
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "department", "fieldname": "department",
"fieldtype": "Link", "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": "Department", "label": "Department",
"length": 0, "options": "Department"
"no_copy": 0,
"options": "Department",
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "staffing_plan", "fieldname": "staffing_plan",
"fieldtype": "Link", "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": "Staffing Plan", "label": "Staffing Plan",
"length": 0,
"no_copy": 0,
"options": "Staffing Plan", "options": "Staffing Plan",
"permlevel": 0, "read_only": 1
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "staffing_plan", "depends_on": "staffing_plan",
"fieldname": "planned_vacancies", "fieldname": "planned_vacancies",
"fieldtype": "Int", "fieldtype": "Int",
"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": "Planned number of Positions", "label": "Planned number of Positions",
"length": 0, "read_only": 1
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_6", "fieldname": "section_break_6",
"fieldtype": "Section Break", "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,
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "publish", "fieldname": "publish",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "label": "Publish on website"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 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,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "publish", "depends_on": "publish",
"fieldname": "route", "fieldname": "route",
"fieldtype": "Data", "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": "Route", "label": "Route",
"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,
"translatable": 0,
"unique": 1 "unique": 1
}, },
{ {
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "Job profile, qualifications required etc.", "description": "Job profile, qualifications required etc.",
"fieldname": "description", "fieldname": "description",
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0, "label": "Description"
"label": "Description", },
"length": 0, {
"no_copy": 0, "fieldname": "column_break_12",
"permlevel": 0, "fieldtype": "Column Break"
"print_hide": 0, },
"print_hide_if_no_value": 0, {
"read_only": 0, "fieldname": "section_break_14",
"remember_last_selected_value": 0, "fieldtype": "Section Break"
"report_hide": 0, },
"reqd": 0, {
"search_index": 0, "collapsible": 1,
"set_only_once": 0, "fieldname": "section_break_16",
"translatable": 0, "fieldtype": "Section Break"
"unique": 0 },
{
"fieldname": "currency",
"fieldtype": "Link",
"label": "Currency",
"options": "Currency"
},
{
"fieldname": "lower_range",
"fieldtype": "Currency",
"label": "Lower Range",
"options": "currency",
"precision": "0"
},
{
"fieldname": "upper_range",
"fieldtype": "Currency",
"label": "Upper Range",
"options": "currency",
"precision": "0"
},
{
"fieldname": "column_break_20",
"fieldtype": "Column Break"
},
{
"depends_on": "publish",
"description": "Route to the custom Job Application Webform",
"fieldname": "job_application_route",
"fieldtype": "Data",
"label": "Job Application Route"
},
{
"default": "0",
"fieldname": "publish_salary_range",
"fieldtype": "Check",
"label": "Publish Salary Range"
} }
], ],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "fa fa-bookmark", "icon": "fa fa-bookmark",
"idx": 1, "idx": 1,
"image_view": 0, "links": [],
"in_create": 0, "modified": "2020-09-18 11:23:29.488923",
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-05-20 15:38:44.705823",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Job Opening", "name": "Job Opening",
"owner": "Administrator", "owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 0,
"cancel": 0,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "HR User", "role": "HR User",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0,
"write": 1 "write": 1
}, },
{ {
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 0,
"read": 1, "read": 1,
"report": 0, "role": "Guest"
"role": "Guest",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
} }
], ],
"quick_entry": 0, "sort_field": "modified",
"read_only": 0, "sort_order": "ASC"
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_order": "ASC",
"track_changes": 0,
"track_seen": 0
} }

View File

@ -43,9 +43,8 @@ class JobOpening(WebsiteGenerator):
current_count = designation_counts['employee_count'] + designation_counts['job_openings'] current_count = designation_counts['employee_count'] + designation_counts['job_openings']
if self.planned_vacancies <= current_count: if self.planned_vacancies <= current_count:
frappe.throw(_("Job Openings for designation {0} already open \ frappe.throw(_("Job Openings for designation {0} already open or hiring completed as per Staffing Plan {1}").format(
or hiring completed as per Staffing Plan {1}" self.designation, self.staffing_plan))
.format(self.designation, self.staffing_plan)))
def get_context(self, context): def get_context(self, context):
context.parents = [{'route': 'jobs', 'title': _('All Jobs') }] context.parents = [{'route': 'jobs', 'title': _('All Jobs') }]
@ -56,7 +55,8 @@ def get_list_context(context):
context.get_list = get_job_openings context.get_list = get_job_openings
def get_job_openings(doctype, txt=None, filters=None, limit_start=0, limit_page_length=20, order_by=None): def get_job_openings(doctype, txt=None, filters=None, limit_start=0, limit_page_length=20, order_by=None):
fields = ['name', 'status', 'job_title', 'description'] fields = ['name', 'status', 'job_title', 'description', 'publish_salary_range',
'lower_range', 'upper_range', 'currency', 'job_application_route']
filters = filters or {} filters = filters or {}
filters.update({ filters.update({

View File

@ -1,9 +1,18 @@
<div class="my-5"> <div class="my-5">
<h3>{{ doc.job_title }}</h3> <h3>{{ doc.job_title }}</h3>
<p>{{ doc.description }}</p> <p>{{ doc.description }}</p>
{%- if doc.publish_salary_range -%}
<p><b>{{_("Salary range per month")}}: </b>{{ frappe.format_value(frappe.utils.flt(doc.lower_range), currency=doc.currency) }} - {{ frappe.format_value(frappe.utils.flt(doc.upper_range), currency=doc.currency) }}</p>
{% endif %}
<div> <div>
<a class="btn btn-primary" {%- if doc.job_application_route -%}
href="/job_application?new=1&job_title={{ doc.name }}"> <a class='btn btn-primary'
href='/{{doc.job_application_route}}?new=1&job_title={{ doc.name }}'>
{{ _("Apply Now") }}</a> {{ _("Apply Now") }}</a>
{% else %}
<a class='btn btn-primary'
href='/job_application?new=1&job_title={{ doc.name }}'>
{{ _("Apply Now") }}</a>
{% endif %}
</div> </div>
</div> </div>

View File

@ -8,6 +8,8 @@
"allow_print": 0, "allow_print": 0,
"amount": 0.0, "amount": 0.0,
"amount_based_on_field": 0, "amount_based_on_field": 0,
"apply_document_permissions": 0,
"client_script": "frappe.web_form.on('resume_link', (field, value) => {\n if (!frappe.utils.is_url(value)) {\n frappe.msgprint(__('Resume link not valid'));\n }\n});\n",
"creation": "2016-09-10 02:53:16.598314", "creation": "2016-09-10 02:53:16.598314",
"doc_type": "Job Applicant", "doc_type": "Job Applicant",
"docstatus": 0, "docstatus": 0,
@ -17,13 +19,16 @@
"is_standard": 1, "is_standard": 1,
"login_required": 0, "login_required": 0,
"max_attachment_size": 0, "max_attachment_size": 0,
"modified": "2016-12-20 00:21:44.081622", "modified": "2020-10-07 19:27:17.143355",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "job-application", "name": "job-application",
"owner": "Administrator", "owner": "Administrator",
"published": 1, "published": 1,
"route": "job_application", "route": "job_application",
"route_to_success_link": 0,
"show_attachments": 0,
"show_in_grid": 0,
"show_sidebar": 1, "show_sidebar": 1,
"sidebar_items": [], "sidebar_items": [],
"success_message": "Thank you for applying.", "success_message": "Thank you for applying.",
@ -31,6 +36,7 @@
"title": "Job Application", "title": "Job Application",
"web_form_fields": [ "web_form_fields": [
{ {
"allow_read_on_all_link_options": 0,
"fieldname": "job_title", "fieldname": "job_title",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@ -39,9 +45,11 @@
"max_value": 0, "max_value": 0,
"options": "", "options": "",
"read_only": 1, "read_only": 1,
"reqd": 0 "reqd": 0,
"show_in_filter": 0
}, },
{ {
"allow_read_on_all_link_options": 0,
"fieldname": "applicant_name", "fieldname": "applicant_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@ -49,9 +57,11 @@
"max_length": 0, "max_length": 0,
"max_value": 0, "max_value": 0,
"read_only": 0, "read_only": 0,
"reqd": 1 "reqd": 1,
"show_in_filter": 0
}, },
{ {
"allow_read_on_all_link_options": 0,
"fieldname": "email_id", "fieldname": "email_id",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
@ -60,9 +70,37 @@
"max_value": 0, "max_value": 0,
"options": "Email", "options": "Email",
"read_only": 0, "read_only": 0,
"reqd": 1 "reqd": 1,
"show_in_filter": 0
}, },
{ {
"allow_read_on_all_link_options": 0,
"fieldname": "phone_number",
"fieldtype": "Data",
"hidden": 0,
"label": "Phone Number",
"max_length": 0,
"max_value": 0,
"options": "Phone",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "country",
"fieldtype": "Link",
"hidden": 0,
"label": "Country of Residence",
"max_length": 0,
"max_value": 0,
"options": "Country",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "cover_letter", "fieldname": "cover_letter",
"fieldtype": "Text", "fieldtype": "Text",
"hidden": 0, "hidden": 0,
@ -70,17 +108,93 @@
"max_length": 0, "max_length": 0,
"max_value": 0, "max_value": 0,
"read_only": 0, "read_only": 0,
"reqd": 0 "reqd": 0,
"show_in_filter": 0
}, },
{ {
"fieldname": "resume_attachment", "allow_read_on_all_link_options": 0,
"fieldtype": "Attach", "fieldname": "resume_link",
"fieldtype": "Data",
"hidden": 0, "hidden": 0,
"label": "Resume Attachment", "label": "Resume Link",
"max_length": 0, "max_length": 0,
"max_value": 0, "max_value": 0,
"read_only": 0, "read_only": 0,
"reqd": 0 "reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Expected Salary Range per month",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "currency",
"fieldtype": "Link",
"hidden": 0,
"label": "Currency",
"max_length": 0,
"max_value": 0,
"options": "Currency",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "",
"fieldtype": "Column Break",
"hidden": 0,
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "lower_range",
"fieldtype": "Currency",
"hidden": 0,
"label": "Lower Range",
"max_length": 0,
"max_value": 0,
"options": "currency",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "",
"fieldtype": "Column Break",
"hidden": 0,
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "upper_range",
"fieldtype": "Currency",
"hidden": 0,
"label": "Upper Range",
"max_length": 0,
"max_value": 0,
"options": "currency",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
} }
] ]
} }

View File

@ -13,10 +13,21 @@
{%- if description -%} {%- if description -%}
<div>{{ description }}</div> <div>{{ description }}</div>
{% endif %} {% endif %}
{%- if publish_salary_range -%}
<div><b>{{_("Salary range per month")}}: </b>{{ frappe.format_value(frappe.utils.flt(lower_range), currency=currency) }} - {{ frappe.format_value(frappe.utils.flt(upper_range), currency=currency) }}</div>
{% endif %}
<p style='margin-top: 30px'> <p style='margin-top: 30px'>
{%- if job_application_route -%}
<a class='btn btn-primary'
href='/{{job_application_route}}?new=1&job_title={{ doc.name }}'>
{{ _("Apply Now") }}</a>
{% else %}
<a class='btn btn-primary' <a class='btn btn-primary'
href='/job_application?new=1&job_title={{ doc.name }}'> href='/job_application?new=1&job_title={{ doc.name }}'>
{{ _("Apply Now") }}</a> {{ _("Apply Now") }}</a>
{% endif %}
</p> </p>
{% endblock %} {% endblock %}