fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
45696bb
)
add option to enable openid (disabled by default)
author
Jan Szejko
<janek37@gmail.com>
Mon, 9 Apr 2018 14:20:53 +0000
(16:20 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Mon, 9 Apr 2018 14:20:53 +0000
(16:20 +0200)
src/wolnelektury/context_processors.py
patch
|
blob
|
history
src/wolnelektury/templates/auth/login.html
patch
|
blob
|
history
src/wolnelektury/templates/auth/register.html
patch
|
blob
|
history
src/wolnelektury/templates/socialaccount/connections.html
patch
|
blob
|
history
diff --git
a/src/wolnelektury/context_processors.py
b/src/wolnelektury/context_processors.py
index
fb5584e
..
0079ea0
100644
(file)
--- a/
src/wolnelektury/context_processors.py
+++ b/
src/wolnelektury/context_processors.py
@@
-8,5
+8,6
@@
from django.conf import settings
def extra_settings(request):
return {
'STATIC_URL': settings.STATIC_URL,
def extra_settings(request):
return {
'STATIC_URL': settings.STATIC_URL,
- 'FULL_STATIC_URL': request.build_absolute_uri(settings.STATIC_URL)
+ 'FULL_STATIC_URL': request.build_absolute_uri(settings.STATIC_URL),
+ 'USE_OPENID': getattr(settings, 'USE_OPENID', False)
}
}
diff --git
a/src/wolnelektury/templates/auth/login.html
b/src/wolnelektury/templates/auth/login.html
index
8509b4c
..
2965713
100644
(file)
--- a/
src/wolnelektury/templates/auth/login.html
+++ b/
src/wolnelektury/templates/auth/login.html
@@
-14,6
+14,7
@@
</ol>
</form>
</ol>
</form>
+{% if USE_OPENID %}
<h1>{% trans "Sign in using:" %}</h1>
<ul class="socialaccount_providers">
<h1>{% trans "Sign in using:" %}</h1>
<ul class="socialaccount_providers">
@@
-21,6
+22,7
@@
</ul>
{% include "socialaccount/snippets/login_extra.html" %}
</ul>
{% include "socialaccount/snippets/login_extra.html" %}
+{% endif %}
{% block extra %}
{% endblock %}
{% block extra %}
{% endblock %}
diff --git
a/src/wolnelektury/templates/auth/register.html
b/src/wolnelektury/templates/auth/register.html
index
0650602
..
967fc6f
100644
(file)
--- a/
src/wolnelektury/templates/auth/register.html
+++ b/
src/wolnelektury/templates/auth/register.html
@@
-14,6
+14,7
@@
{% block extra %}
{% block extra %}
+{% if USE_OPENID %}
<h1>{% trans "Sign in using:" %}</h1>
<ul class="socialaccount_providers">
<h1>{% trans "Sign in using:" %}</h1>
<ul class="socialaccount_providers">
@@
-21,5
+22,6
@@
</ul>
{% include "socialaccount/snippets/login_extra.html" %}
</ul>
{% include "socialaccount/snippets/login_extra.html" %}
+{% endif %}
{% endblock %}
{% endblock %}
diff --git
a/src/wolnelektury/templates/socialaccount/connections.html
b/src/wolnelektury/templates/socialaccount/connections.html
index
0c7316e
..
0f10724
100644
(file)
--- a/
src/wolnelektury/templates/socialaccount/connections.html
+++ b/
src/wolnelektury/templates/socialaccount/connections.html
@@
-45,6
+45,7
@@
<p>{% trans "You currently have no social network accounts connected to this account." %}</p>
{% endif %}
<p>{% trans "You currently have no social network accounts connected to this account." %}</p>
{% endif %}
+{% if USE_OPENID %}
<h2>{% trans 'Add a 3rd Party Account' %}</h2>
<ul class="socialaccount_providers">
<h2>{% trans 'Add a 3rd Party Account' %}</h2>
<ul class="socialaccount_providers">
@@
-52,6
+53,7
@@
</ul>
{% include "socialaccount/snippets/login_extra.html" %}
</ul>
{% include "socialaccount/snippets/login_extra.html" %}
+{% endif %}
</div>
{% endblock %}
</div>
{% endblock %}