diff --git a/idhub/templates/certificates/federation-membership_ca.html b/idhub/templates/certificates/federation-membership_ca.html
index d237ca6..b3fd42b 100644
--- a/idhub/templates/certificates/federation-membership_ca.html
+++ b/idhub/templates/certificates/federation-membership_ca.html
@@ -87,7 +87,7 @@
CERTIFICA
-
- Que l’entitat {{ legalName }}, amb NIF {{ taxReference }} i domicili a {{ streetAddress }} {{ postCode }} {{ city }} forma part com a entitat membre de {{ federation }} (ple dret/observadora) de Lafede.cat - Federació d'Organitzacions per a la Justícia Global, des de l’Assemblea General Ordinària celebrada el {{ issue_date }}
+ Que l’entitat {{ legalName }}, amb NIF {{ taxReference }} i domicili a {{ streetAddress }} {{ postCode }} {{ city }} forma part com a entitat membre de {{ federation }} {% if membership_type == "full" %}ple dret{% endif %}{% if membership_type == "observer" %}observadora{% endif %} de Lafede.cat - Federació d'Organitzacions per a la Justícia Global, des de l’Assemblea General Ordinària celebrada el {{ membership_since }}
diff --git a/idhub/templates/certificates/federation-membership_es.html b/idhub/templates/certificates/federation-membership_es.html
index d1cd636..bf00906 100644
--- a/idhub/templates/certificates/federation-membership_es.html
+++ b/idhub/templates/certificates/federation-membership_es.html
@@ -87,7 +87,7 @@
CERTIFICA
-
- Que la entidad {{ legalName }}, con NIF {{ taxReference }} y domicilio {{ streetAddress }} {{ postCode }} {{ city }} forma parte como entidad miembro de {{ federation }} (pleno derecho/observadora) de Lafede.cat - Federación de Organizaciones para la Justícia Global, desde la Asamblea General Ordinaria celebrada el {{ issue_date }}
+ Que la entidad {{ legalName }}, con NIF {{ taxReference }} y domicilio {{ streetAddress }} {{ postCode }} {{ city }} forma parte como entidad miembro de {{ federation }} {% if membership_type == "full" %}pleno derecho{% endif %}{% if membership_type == "observer" %}observadora{% endif %} de Lafede.cat - Federación de Organizaciones para la Justícia Global, desde la Asamblea General Ordinaria celebrada el {{ membership_since }}
diff --git a/idhub/user/views.py b/idhub/user/views.py
index 2922eb1..4f5735d 100644
--- a/idhub/user/views.py
+++ b/idhub/user/views.py
@@ -1,7 +1,6 @@
import json
import base64
import qrcode
-import datetime
import weasyprint
import qrcode.image.svg
@@ -282,21 +281,23 @@ class CredentialPdfView(MyWallet, TemplateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
+ context.update(dict(self.object.get_datas()))
img_sig = self.get_img_sign()
img_head = self.get_img_header()
img_foot = self.get_img_footer()
qr = self.generate_qr_code(self.url_id)
- issue_date_now = datetime.datetime.now()
- issue_date = context.get('issuedDate', issue_date_now)
+ issue_date = context.get('certificationDate', '')
+ membership_since = context.get('membershipSince', '')
+ membership_type = context.get('membershipType', '').lower()
- context.update(dict(self.object.get_datas()))
context.update({
'object': self.object,
"image_signature": img_sig,
"image_header": img_head,
"image_footer": img_foot,
- "issue_date_now": issue_date_now.strftime("%d/%m/%Y"),
- "issue_date": issue_date.strftime("%d/%m/%Y"),
+ "issue_date": issue_date,
+ "membership_since": membership_since,
+ "membership_type": membership_type,
"qr": qr,
})
return context