fix: login button before job application

This commit is contained in:
Jannat Patel
2022-01-11 19:27:12 +05:30
parent a87e3d66a6
commit 19f5251736
2 changed files with 5 additions and 5 deletions

View File

@@ -13,8 +13,8 @@ class JobOpportunity(Document):
@frappe.whitelist()
def report(job, reason):
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")
subject = _("User {0} has reported the job post {1}").format(user, job)
args = {
"job": job,
"job_url": get_link_to_form("Job Opportunity", job),

View File

@@ -11,14 +11,14 @@
{% include "school/templates/job_card.html" %}
<div class="p-4">
<div>{{ _(job.description) }}</div>
{% if frappe.session.user != "Guest" %}
<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>
<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>
{% else %}
<p class="small alert alert-secondary text-center">Login to apply for this job.</p>
{% endif %}
</div>
</div>
</div>