Created
June 13, 2018 05:25
-
-
Save asbasawaraj/2bfb58988cef73e4617121f079be4cf3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "templates/web.html" %} | |
{% block title %} ERPNext Certification {% endblock %} | |
{% block page_content %} | |
{% if frappe.session.user=='Guest' %} | |
<div class='with-border'> | |
<p>You must first sign up and login to apply for certification.</p> | |
<p><a href="/login#signup" class=''>Sign Up</a></p> | |
</div> | |
{% else %} | |
{% if all_certifications %} | |
<h2>Certification History</h2> | |
<div class="table-responsive"> | |
<table class="table table-bordered table-hover"> | |
<thead> | |
<tr class="active"> | |
<th style="width: 200px">Certification Id</th> | |
<th style="width: 150px">Status</th> | |
<th style="width: 150px">Valid From</th> | |
<th style="width: 150px">Valid To</th> | |
<th style="width: 100px">Amount</th> | |
</tr> | |
</thead> | |
<tbody> | |
{% for certification in all_certifications %} | |
<tr> | |
<td>{{ certification.name }}</td> | |
<td>{{ certification.certification_status }}</td> | |
<td>{{ frappe.format_date(certification.from_date) }}</td> | |
<td>{{ frappe.format_date(certification.to_date) }}</td> | |
<td>{{ frappe.utils.fmt_money(certification.amount,currency=frappe.db.get_value("Currency",certification.currency,"symbol")) }}</td> | |
</tr> | |
{% endfor %} | |
</tbody> | |
</table> | |
</div> | |
{% if frappe.utils.getdate(all_certifications[0].to_date) < frappe.utils.getdate(frappe.utils.nowdate()) %} | |
<p>Your certification has expired, Click the button below to start a new membership</p> | |
{% elif frappe.utils.getdate(frappe.utils.add_days(all_certifications[0].to_date, -30)) < frappe.utils.getdate(frappe.utils.nowdate())%} | |
<p>Your certification is due to expire soon. Click on the button below to renew</p> | |
{% endif %} | |
{% endif %} | |
<h2> Certification Price Is 20,000 INR / 300 USD</h2> | |
<section> | |
<input type="radio" name="gender" value="USD" checked> USD <br> | |
<input type="radio" name="gender" value="INR" style="margin-top: 15px;"> INR <br> | |
</section> | |
<div class="section" style="margin-top:10px;"><a class="btn btn-primary next"> Next </a></div> | |
<script> | |
frappe.ready(function() { | |
$('.next').on('click', function() { | |
if($("input[type=radio]:checked").val() == 'INR'){ | |
window.location = '/certification-application?new=1' | |
} | |
else{ | |
window.location = '/memberships-usd?new=1' | |
} | |
}) | |
}) | |
</script> | |
{% endif %} | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment