aboutsummaryrefslogtreecommitdiff
path: root/views/default/core/account/login_box.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/core/account/login_box.php')
-rw-r--r--views/default/core/account/login_box.php25
1 files changed, 25 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..eb37d7554
--- /dev/null
+++ b/views/default/core/account/login_box.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Elgg login box
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$form_body = elgg_view('account/forms/login');
+
+$login_url = elgg_get_site_url();
+if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {
+ $login_url = str_replace("http:", "https:", $login_url);
+}
+?>
+
+<div id="login">
+<h2><?php echo elgg_echo('login'); ?></h2>
+ <?php
+ echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login"));
+ ?>
+</div>
+<script type="text/javascript">
+ $(document).ready(function() { $('input[name=username]').focus(); });
+</script>