fix: mobile layout and certification link

This commit is contained in:
Jannat Patel
2024-04-05 08:56:18 +05:30
parent 838bc1fac2
commit d892a28069
9 changed files with 37 additions and 15 deletions

0
lms/www/certificate.html Normal file
View File

14
lms/www/certificate.py Normal file
View File

@@ -0,0 +1,14 @@
import frappe
from urllib.parse import quote
def get_context(context):
context.no_cache = 1
template = frappe.db.get_value(
"LMS Certificate", frappe.form_dict.certificate_id, "template"
)
certificate_id = frappe.form_dict.certificate_id
template = quote(template)
frappe.local.flags.redirect_location = f"/api/method/frappe.utils.print_format.download_pdf?doctype=LMS+Certificate&name={certificate_id}&format={template}"
raise frappe.Redirect