replace context processor by template tag
This commit is contained in:
parent
66a732972f
commit
8faa1c9f7d
|
@ -1,4 +0,0 @@
|
||||||
from .util import get_x509_url
|
|
||||||
|
|
||||||
def beid_processor(request):
|
|
||||||
return {'beid_url': get_x509_url(request)}
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% load i18n %}
|
{% load i18n beid %}
|
||||||
|
|
||||||
<div id="login-ssl">
|
<div id="login-ssl">
|
||||||
<p>
|
<p>
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
<p>
|
<p>
|
||||||
{% trans "Please connect the card reader and put your identity card in" %}
|
{% trans "Please connect the card reader and put your identity card in" %}
|
||||||
</p>
|
</p>
|
||||||
<form id='beid_login' action='{{ beid_url }}{% url "beid_signin" %}'>
|
<form id='beid_login' action='{% beid_url request %}{% url "beid_signin" %}'>
|
||||||
<input type="submit" name="{{ submit_name }}" value="{% trans "Log in" %}"/>
|
<input type="submit" name="{{ submit_name }}" value="{% trans "Log in" %}"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% load i18n %}
|
{% load i18n beid %}
|
||||||
<h4 id="a2-beid-certificate-profile" class="a2-bied-certificate-profile-title">
|
<h4 id="a2-beid-certificate-profile" class="a2-bied-certificate-profile-title">
|
||||||
{% trans "Belgian eID card" %}
|
{% trans "Belgian eID card" %}
|
||||||
</h4>
|
</h4>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
<form action="{{ beid_url }}{% url "add_beid" %}" method="get">
|
<form action="{% beid_url request %}{% url "add_beid" %}" method="get">
|
||||||
<label for="id_del_cert">{% trans "Have a belgian eID card?" %}</label>
|
<label for="id_del_cert">{% trans "Have a belgian eID card?" %}</label>
|
||||||
<input type="hidden" name="next" value="{% url "account_management" %}#a2-beid-certificate-profile" />
|
<input type="hidden" name="next" value="{% url "account_management" %}#a2-beid-certificate-profile" />
|
||||||
<input type="submit" class="submit-button a2-ssl-certificate-submit-button" value="{% trans "Link it to your account" %}">
|
<input type="submit" class="submit-button a2-ssl-certificate-submit-button" value="{% trans "Link it to your account" %}">
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
from django import template
|
||||||
|
|
||||||
|
from authentic2_beid.util import get_x509_url
|
||||||
|
|
||||||
|
register = template.Library()
|
||||||
|
|
||||||
|
@register.simple_tag
|
||||||
|
def beid_url(request):
|
||||||
|
print "R: %s" % request
|
||||||
|
return get_x509_url(request)
|
Reference in New Issue