fix: login button before job application
This commit is contained in:
@@ -13,8 +13,8 @@ class JobOpportunity(Document):
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def report(job, reason):
|
def report(job, reason):
|
||||||
system_managers = get_system_managers(only_name=True)
|
system_managers = get_system_managers(only_name=True)
|
||||||
subject = _("User {0} has reported the job post {1}").format(user, job)
|
|
||||||
user = frappe.db.get_value("User", frappe.session.user, "full_name")
|
user = frappe.db.get_value("User", frappe.session.user, "full_name")
|
||||||
|
subject = _("User {0} has reported the job post {1}").format(user, job)
|
||||||
args = {
|
args = {
|
||||||
"job": job,
|
"job": job,
|
||||||
"job_url": get_link_to_form("Job Opportunity", job),
|
"job_url": get_link_to_form("Job Opportunity", job),
|
||||||
|
|||||||
@@ -11,14 +11,14 @@
|
|||||||
{% include "school/templates/job_card.html" %}
|
{% include "school/templates/job_card.html" %}
|
||||||
<div class="p-4">
|
<div class="p-4">
|
||||||
<div>{{ _(job.description) }}</div>
|
<div>{{ _(job.description) }}</div>
|
||||||
{% if frappe.session.user != "Guest" %}
|
|
||||||
<div class="d-flex justify-content-between mt-5">
|
<div class="d-flex justify-content-between mt-5">
|
||||||
|
{% if frappe.session.user != "Guest" %}
|
||||||
<a class="button is-primary" href="{{ job.application_link }}">{{ _("Apply Now") }}</a>
|
<a class="button is-primary" href="{{ job.application_link }}">{{ _("Apply Now") }}</a>
|
||||||
<div class="button is-secondary" id="report">{{ _("Report this post") }}</div>
|
<div class="button is-secondary" id="report">{{ _("Report this post") }}</div>
|
||||||
|
{% else %}
|
||||||
|
<a class="button is-secondary dark-links" href="/login?redirect-to=/jobs/{{ job.name }}">Login to apply for this job.</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
|
||||||
<p class="small alert alert-secondary text-center">Login to apply for this job.</p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user