aboutsummaryrefslogtreecommitdiff
path: root/views/default/openid_client
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-12-17 21:52:20 -0500
committercash <cash.costello@gmail.com>2011-12-17 21:52:20 -0500
commitaae0fa0c6762d25e048c297156f8969c6242eb11 (patch)
treea29d26529a26a7ae850a0cea5ce107814325043b /views/default/openid_client
parentaa9ed6f3eb46fb9508692d1b5d92c717c3648527 (diff)
downloadelgg-aae0fa0c6762d25e048c297156f8969c6242eb11.tar.gz
elgg-aae0fa0c6762d25e048c297156f8969c6242eb11.tar.bz2
added support for OpenID 1.x
Diffstat (limited to 'views/default/openid_client')
-rw-r--r--views/default/openid_client/js.php18
-rw-r--r--views/default/openid_client/login.php6
2 files changed, 24 insertions, 0 deletions
diff --git a/views/default/openid_client/js.php b/views/default/openid_client/js.php
new file mode 100644
index 000000000..175577719
--- /dev/null
+++ b/views/default/openid_client/js.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * OpenID JavaScript
+ */
+
+?>
+
+// OpenID toggle
+elgg.register_hook_handler('init', 'system', function() {
+ $(".openid-client-toggle").click(function(event) {
+ $("#openid-client-login-form").slideDown();
+
+ var provider_input = $("#openid-client-login-form input[name=openid_provider]");
+ provider_input.attr('value', $(this).attr('rel'));
+
+ event.preventDefault();
+ });
+});
diff --git a/views/default/openid_client/login.php b/views/default/openid_client/login.php
index 7e71b8bab..30685fe51 100644
--- a/views/default/openid_client/login.php
+++ b/views/default/openid_client/login.php
@@ -10,3 +10,9 @@ echo elgg_view_menu('openid_login', array(
'class' => 'elgg-menu-hz',
'sort_by' => 'priority',
));
+
+$form_vars = array(
+ 'class' => 'hidden',
+ 'id' => 'openid-client-login-form',
+);
+echo elgg_view_form('openid_client/login', $form_vars);