aboutsummaryrefslogtreecommitdiff
path: root/views/default/forms/register.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-02 01:48:20 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-02 01:48:20 +0000
commit06b07bb28ed7d72b682b217d4637865b257f566c (patch)
treea3e171de6b53335aaa9a15296cc22788c84b11f4 /views/default/forms/register.php
parenta112284bc2420bb8cfb336857ad3d772cd0f3ed3 (diff)
downloadelgg-06b07bb28ed7d72b682b217d4637865b257f566c.tar.gz
elgg-06b07bb28ed7d72b682b217d4637865b257f566c.tar.bz2
Refs #3233 registration form should be sticky too
git-svn-id: http://code.elgg.org/elgg/trunk@8902 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/forms/register.php')
-rw-r--r--views/default/forms/register.php64
1 files changed, 48 insertions, 16 deletions
diff --git a/views/default/forms/register.php b/views/default/forms/register.php
index faffb285a..6f35a3ea3 100644
--- a/views/default/forms/register.php
+++ b/views/default/forms/register.php
@@ -6,6 +6,7 @@
* @subpackage Core
*/
+$password = $password2 = '';
$username = get_input('u');
$email = get_input('e');
$name = get_input('n');
@@ -15,31 +16,59 @@ if (elgg_is_admin_logged_in() && isset($vars['show_admin'])) {
$admin_option = true;
}
+if (elgg_is_sticky_form('register')) {
+ extract(elgg_get_sticky_values('register'));
+ elgg_clear_sticky_form('register');
+ if (is_array($admin)) {
+ $admin = $admin[0];
+ }
+}
+
?>
<div class="mtm">
- <label><?php echo elgg_echo('name'); ?></label>
- <br />
- <?php echo elgg_view('input/text', array('name' => 'name', 'value' => $name)); ?>
+ <label><?php echo elgg_echo('name'); ?></label><br />
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'name',
+ 'value' => $name,
+ ));
+ ?>
</div>
<div>
- <label><?php echo elgg_echo('email'); ?></label>
- <br />
- <?php echo elgg_view('input/text', array('name' => 'email', 'value' => $email)); ?>
+ <label><?php echo elgg_echo('email'); ?></label><br />
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'email',
+ 'value' => $email,
+ ));
+ ?>
</div>
<div>
- <label><?php echo elgg_echo('username'); ?></label>
- <br />
- <?php echo elgg_view('input/text', array('name' => 'username', 'value' => $username)); ?>
+ <label><?php echo elgg_echo('username'); ?></label><br />
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'username',
+ 'value' => $username,
+ ));
+ ?>
</div>
<div>
- <label><?php echo elgg_echo('password'); ?></label>
- <br />
- <?php echo elgg_view('input/password', array('name' => 'password')); ?>
+ <label><?php echo elgg_echo('password'); ?></label><br />
+ <?php
+ echo elgg_view('input/password', array(
+ 'name' => 'password',
+ 'value' => $password,
+ ));
+ ?>
</div>
<div>
- <label><?php echo elgg_echo('passwordagain'); ?></label>
- <br />
- <?php echo elgg_view('input/password', array('name' => 'password2')); ?>
+ <label><?php echo elgg_echo('passwordagain'); ?></label><br />
+ <?php
+ echo elgg_view('input/password', array(
+ 'name' => 'password2',
+ 'value' => $password2,
+ ));
+ ?>
</div>
<?php
@@ -50,7 +79,10 @@ echo elgg_view('register/extend');
echo elgg_view('input/captcha');
if ($admin_option) {
- echo elgg_view('input/checkboxes', array('name' => "admin", 'options' => array(elgg_echo('admin_option'))));
+ echo elgg_view('input/checkboxes', array(
+ 'name' => "admin",
+ 'options' => array(elgg_echo('admin_option')),
+ ));
}
echo elgg_view('input/hidden', array('name' => 'friend_guid', 'value' => $vars['friend_guid']));