From: Radek Czajka Date: Mon, 12 Mar 2012 12:43:40 +0000 (+0100) Subject: nicer social auth X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/a6db1ef5159ff618a9d1a78ff14fd705a106c130?ds=inline;hp=--cc nicer social auth --- a6db1ef5159ff618a9d1a78ff14fd705a106c130 diff --git a/apps/ajaxable/templatetags/__init__.py b/apps/ajaxable/templatetags/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/apps/ajaxable/templatetags/ajaxable_tags.py b/apps/ajaxable/templatetags/ajaxable_tags.py new file mode 100644 index 000000000..2f9a8c4c8 --- /dev/null +++ b/apps/ajaxable/templatetags/ajaxable_tags.py @@ -0,0 +1,7 @@ +from django import template +from ajaxable.utils import placeholdized +register = template.Library() + +@register.filter +def placeholdize(form): + return placeholdized(form) diff --git a/requirements.txt b/requirements.txt index ecb07cca2..bf8bb438a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,7 @@ django-allauth python-memcached piwik +python-fb # Feedparser Feedparser>=4.1 diff --git a/wolnelektury/static/img/auth/facebook.png b/wolnelektury/static/img/auth/facebook.png new file mode 100644 index 000000000..f9b6e7149 Binary files /dev/null and b/wolnelektury/static/img/auth/facebook.png differ diff --git a/wolnelektury/static/img/auth/google-icon.png b/wolnelektury/static/img/auth/google-icon.png deleted file mode 100644 index d16d5313e..000000000 Binary files a/wolnelektury/static/img/auth/google-icon.png and /dev/null differ diff --git a/wolnelektury/static/img/auth/openid-large.png?1237615666 b/wolnelektury/static/img/auth/openid-large.png?1237615666 deleted file mode 100644 index 6094fffec..000000000 Binary files a/wolnelektury/static/img/auth/openid-large.png?1237615666 and /dev/null differ diff --git a/wolnelektury/static/img/auth/twitter.png b/wolnelektury/static/img/auth/twitter.png new file mode 100644 index 000000000..d2a55029d Binary files /dev/null and b/wolnelektury/static/img/auth/twitter.png differ diff --git a/wolnelektury/static/js/dialogs.js b/wolnelektury/static/js/dialogs.js index 086a47d3d..9b8750d0c 100755 --- a/wolnelektury/static/js/dialogs.js +++ b/wolnelektury/static/js/dialogs.js @@ -58,7 +58,7 @@ $('body').append($window); $window.jqm({ - ajax: '/uzytkownicy/zaloguj-utworz/', + ajax: '/uzytkownicy/zaloguj-utworz/?next=' + escape(window.location), ajaxText: '

* ' + gettext("Loading") + '

', target: $('.target', $window)[0], overlay: 60, diff --git a/wolnelektury/templates/auth/login.html b/wolnelektury/templates/auth/login.html index 553e873a0..ba5385a13 100644 --- a/wolnelektury/templates/auth/login.html +++ b/wolnelektury/templates/auth/login.html @@ -1,14 +1,17 @@ -{% extends "ajaxable/form.html" %} {% load i18n %} +

{{ title }}

-{% block extra %} +
+
    +
    + {{ form.as_ul }} +
  1. {% trans "Forgot your password?" %}
  2. +
  3. +
+
-

{% trans "or join accounts:" %}

+

{% trans "or merge accounts:" %}

- - -{% endblock %} - diff --git a/wolnelektury/templates/auth/login_register.html b/wolnelektury/templates/auth/login_register.html index 394902a2b..f879d4674 100755 --- a/wolnelektury/templates/auth/login_register.html +++ b/wolnelektury/templates/auth/login_register.html @@ -1,14 +1,9 @@ -{% extends "ajaxable/form.html" %} +{% extends "auth/login.html" %} {% load i18n %} {% block extra %} -

{% trans "or join accounts:" %}

- - - +{{ block.super }}

{% trans "or register" %}:

diff --git a/wolnelektury/templates/openid/login.html b/wolnelektury/templates/openid/login.html new file mode 100644 index 000000000..afe7fe8f4 --- /dev/null +++ b/wolnelektury/templates/openid/login.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} +{% load i18n %} +{% load ajaxable_tags %} + + +{% block titleextra %}{% trans "OpenID Sign In" %}{% endblock %} + + +{% block body %} + +

{% trans 'OpenID Sign In' %}

+ + +
+ +
+ +{% endblock %} diff --git a/wolnelektury/templates/socialaccount/base.html b/wolnelektury/templates/socialaccount/base.html new file mode 100644 index 000000000..94d9808cc --- /dev/null +++ b/wolnelektury/templates/socialaccount/base.html @@ -0,0 +1 @@ +{% extends "base.html" %} diff --git a/wolnelektury/templates/socialaccount/snippets/provider_list.html b/wolnelektury/templates/socialaccount/snippets/provider_list.html index 99e30a5c1..45b740c25 100644 --- a/wolnelektury/templates/socialaccount/snippets/provider_list.html +++ b/wolnelektury/templates/socialaccount/snippets/provider_list.html @@ -1,21 +1,30 @@ {% load allauth_tags %} +{% load catalogue_tags %} +{% if allauth.facebook_enabled %} +{% fbconnect %} +{% endif %} + +