aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-09-24 15:33:16 +0200
committerSem <sembrestels@riseup.net>2012-09-24 15:33:16 +0200
commite826cb586ba363babddad98164bf4c8999aec300 (patch)
treedf50d069ec544815040ddd53c0108893fc05c9b5 /views
parente69825051c3d19f188e68801ba945c1cd8b8cfdd (diff)
downloadelgg-e826cb586ba363babddad98164bf4c8999aec300.tar.gz
elgg-e826cb586ba363babddad98164bf4c8999aec300.tar.bz2
Added remaining files to last commit.
Diffstat (limited to 'views')
-rw-r--r--views/default/core/account/login_box.php23
-rw-r--r--views/default/core/account/login_dropdown.php29
-rw-r--r--views/default/openid_client/icon.php8
3 files changed, 60 insertions, 0 deletions
diff --git a/views/default/core/account/login_box.php b/views/default/core/account/login_box.php
new file mode 100644
index 000000000..1fe452e69
--- /dev/null
+++ b/views/default/core/account/login_box.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Elgg login box
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['module'] The module name. Default: aside
+ */
+
+$module = elgg_extract('module', $vars, 'aside');
+
+$login_url = elgg_get_site_url();
+if (elgg_get_config('https_login')) {
+ $login_url = str_replace("http:", "https:", $login_url);
+}
+
+$title = elgg_echo('login');
+$body = elgg_view_form('login', array('action' => "{$login_url}action/login"));
+$body .= elgg_view_form('openid_client/login', array('class' => 'elgg-form-login hidden'), array());
+$body .= elgg_view('openid_client/icon');
+
+echo elgg_view_module($module, $title, $body);
diff --git a/views/default/core/account/login_dropdown.php b/views/default/core/account/login_dropdown.php
new file mode 100644
index 000000000..7882fde02
--- /dev/null
+++ b/views/default/core/account/login_dropdown.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Elgg drop-down login form
+ */
+
+if (elgg_is_logged_in()) {
+ return true;
+}
+
+$login_url = elgg_get_site_url();
+if (elgg_get_config('https_login')) {
+ $login_url = str_replace("http:", "https:", elgg_get_site_url());
+}
+
+$body = elgg_view_form('login', array('action' => "{$login_url}action/login"), array('returntoreferer' => TRUE));
+$body .= elgg_view_form('openid_client/login', array('class' => 'elgg-form-login hidden'), array());
+$body .= elgg_view('openid_client/icon');
+?>
+<div id="login-dropdown">
+ <?php
+ echo elgg_view('output/url', array(
+ 'href' => 'login#login-dropdown-box',
+ 'rel' => 'popup',
+ 'class' => 'elgg-button elgg-button-dropdown',
+ 'text' => elgg_echo('login'),
+ ));
+ echo elgg_view_module('dropdown', '', $body, array('id' => 'login-dropdown-box'));
+ ?>
+</div>
diff --git a/views/default/openid_client/icon.php b/views/default/openid_client/icon.php
new file mode 100644
index 000000000..3a9a9d981
--- /dev/null
+++ b/views/default/openid_client/icon.php
@@ -0,0 +1,8 @@
+<?php
+
+echo elgg_view('output/url', array(
+ 'text' => elgg_view_icon('openid') . elgg_echo('openid_client:login'),
+ 'href' => '',
+ 'title' => elgg_echo('openid_client'),
+ 'class' => "openid-login-icon",
+)); \ No newline at end of file