aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/walled_garden.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/page/walled_garden.php')
-rw-r--r--views/default/page/walled_garden.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php
index 1075ea811..c12a7203d 100644
--- a/views/default/page/walled_garden.php
+++ b/views/default/page/walled_garden.php
@@ -7,6 +7,12 @@
* @override views/default/page/walled_garden.php
*/
+$is_sticky_register = elgg_is_sticky_form('register');
+$wg_body_class = 'elgg-body-walledgarden';
+if ($is_sticky_register) {
+ $wg_body_class .= ' hidden';
+}
+
// Set the content type
header("Content-type: text/html; charset=UTF-8");
?>
@@ -20,10 +26,17 @@ header("Content-type: text/html; charset=UTF-8");
<div class="elgg-page-messages">
<?php echo elgg_view('page/elements/messages', array('object' => $vars['sysmessages'])); ?>
</div>
- <div class="elgg-body-walledgarden">
+ <div class="<?php echo $wg_body_class; ?>">
<?php echo $vars['body']; ?>
</div>
</div>
+<?php if ($is_sticky_register): ?>
+<script type="text/javascript">
+elgg.register_hook_handler('init', 'system', function() {
+ $('.registration_link').trigger('click');
+});
+</script>
+<?php endif; ?>
<?php echo elgg_view('page/elements/foot'); ?>
</body>
</html>