]> git.openstreetmap.org Git - osqa.git/blobdiff - forum_modules/facebookauth/templates/button.html
Remove ADMIN_MEDIA_PREFIX since it has been deprecated in Django 1.4
[osqa.git] / forum_modules / facebookauth / templates / button.html
index ceae1fc2e17ac9ba78f1a67e857a24c17703a110..3b8effaacce92a0c4857756c59430376f0faf011 100644 (file)
@@ -1,38 +1,3 @@
-<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>\r
-<script type="text/javascript">\r
-    var FB_API_KEY = "{{ provider.API_KEY }}";\r
-    var FB_CHANNEL_PATH = "{% url  xd_receiver %}";\r
-\r
-    FB.init(FB_API_KEY, FB_CHANNEL_PATH, {permsToRequestOnConnect : "email"});\r
-\r
-    function FB_ConnectPostAuthorization() {\r
-        if ($('#validate_email').attr('checked')) {\r
-            FB_RequireFeatures(["Api"], function(){\r
-                var api = FB.Facebook.apiClient;\r
-                var fb_uid = api.get_session().uid;\r
-\r
-                $.post('{% url  facebook_user_is_registered %}', {'fb_uid': fb_uid}, function(response) {\r
-                    if (response != "yes") {\r
-                        api.users_hasAppPermission("email", function(result) {\r
-                            if (!result) {\r
-                                FB.Connect.showPermissionDialog("email", redirect_to_done_page);\r
-                            } else {\r
-                                redirect_to_done_page()\r
-                            }\r
-                        })\r
-                    } else {\r
-                        redirect_to_done_page()\r
-                    }\r
-                });\r
-            });\r
-        } else {\r
-            redirect_to_done_page();\r
-        }\r
-    }\r
-\r
-    function redirect_to_done_page() {\r
-        window.location = "{% url auth_provider_done provider=provider.id %}";\r
-    }\r
-\r
-</script>\r
-<fb:login-button v="2" size="medium" onlogin="FB_ConnectPostAuthorization()">Facebook</fb:login-button>
\ No newline at end of file
+{% load extra_tags %}
+
+<a style="position: relative; top: -8px;" href="{% url "auth_provider_signin" provider="facebook" %}"><img src="{% media '/media/images/openid/facebook.gif' %}" /></a>