fix get_status in translate pages

This commit is contained in:
Cayo Puigdefabregas 2024-03-18 17:32:11 +01:00
parent bf3d6d85b6
commit 75356b865b
2 changed files with 7 additions and 7 deletions

View file

@ -10,11 +10,11 @@
</h3>
</div>
<div class="col text-end">
{% if object.get_status == 'Issued' %}
{% if object.status == 2 %}
<a class="btn btn-green-admin me-2" href="{% url 'idhub:admin_credential_json' object.id %}">{% trans 'Download as JSON' %}</a>
<a class="btn btn-yellow" class="btn btn-orange" data-bs-toggle="modal" data-bs-target="#confirm-revoke" href="javascript:void()">{% trans 'Revoke' %}</a>
{% endif %}
{% if object.get_status == 'Enabled' %}
{% if object.status == 1 %}
<a class="btn btn-orange" class="btn btn-orange" data-bs-toggle="modal" data-bs-target="#confirm-delete" href="javascript:void()">{% trans 'Delete' %}</a>
{% endif %}
</div>

View file

@ -9,7 +9,7 @@
{{ subtitle }}
</h3>
</div>
{% if object.get_status == 'Issued' %}
{% if object.status == 2 %}
{% if object.eidas1_did and admin_validated %}
<div class="col text-end">
<a class="btn btn-green-user me-2" href="{{ url_ca }}">{% trans 'Download as PDF (Catalan)' %}</a>
@ -20,12 +20,12 @@
{% endif %}
{% endif %}
<div class="col text-end">
{% if object.get_status == 'Issued' %}
{% if object.status == 2 %}
{% if object.eidas1_did and admin_validated %}
{% endif %}
<a class="btn btn-green-user" href="{% url 'idhub:user_credential_json' object.id %}">{% trans 'Download as JSON' %}</a>
{% endif %}
{% if object.get_status == 'Enabled' %}
{% if object.status == 1 %}
<a class="btn btn-green-user" href="{% url 'idhub:user_credentials_request' %}">{% trans 'Request credential' %}</a>
{% endif %}
</div>