aboutsummaryrefslogtreecommitdiff
path: root/views/default/page
diff options
context:
space:
mode:
authorSteve Clay <steve@mrclay.org>2013-06-08 23:31:37 -0400
committerSteve Clay <steve@mrclay.org>2013-06-08 23:31:37 -0400
commit39fa5af1a79f444ec31eb63d0baf299fc8bc7b7a (patch)
treef89daf52b0ba9db54207e25b5fc1820dc7341913 /views/default/page
parent42726251455e87b5ee4d368c0e743057506ad60d (diff)
downloadelgg-39fa5af1a79f444ec31eb63d0baf299fc8bc7b7a.tar.gz
elgg-39fa5af1a79f444ec31eb63d0baf299fc8bc7b7a.tar.bz2
If JS enabled, walled garden registration reload will not flicker
Diffstat (limited to 'views/default/page')
-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 ff8e317c7..87a79a690 100644
--- a/views/default/page/walled_garden.php
+++ b/views/default/page/walled_garden.php
@@ -5,6 +5,12 @@
* Used for the walled garden index page
*/
+$is_sticky_register = elgg_is_sticky_form('register');
+$wg_body_class = 'elgg-body-walledgarden';
+if ($is_sticky_register && !empty($_COOKIE['elgg_js_support'])) {
+ $wg_body_class .= ' hidden';
+}
+
// Set the content type
header("Content-type: text/html; charset=UTF-8");
?>
@@ -18,10 +24,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> \ No newline at end of file