diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-16 19:26:37 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-16 19:26:37 +0000 |
commit | 8048313e87b9fd5ab6734e29a0e951524fa33e45 (patch) | |
tree | 556f70ba4a4c70cbd4890e1d90317d2a636e2d9e /views/default/account | |
parent | 17c17807cc0b63d322d56acfae4f30399041cdb5 (diff) | |
download | elgg-8048313e87b9fd5ab6734e29a0e951524fa33e45.tar.gz elgg-8048313e87b9fd5ab6734e29a0e951524fa33e45.tar.bz2 |
Standardized more files.
git-svn-id: http://code.elgg.org/elgg/trunk@3554 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/account')
-rw-r--r-- | views/default/account/forms/forgotten_password.php | 26 | ||||
-rw-r--r-- | views/default/account/forms/login.php | 62 | ||||
-rw-r--r-- | views/default/account/forms/register.php | 80 | ||||
-rw-r--r-- | views/default/account/forms/useradd.php | 57 |
4 files changed, 111 insertions, 114 deletions
diff --git a/views/default/account/forms/forgotten_password.php b/views/default/account/forms/forgotten_password.php index 1ab2bd42e..5e760cef3 100644 --- a/views/default/account/forms/forgotten_password.php +++ b/views/default/account/forms/forgotten_password.php @@ -1,19 +1,19 @@ <?php - /** - * Elgg forgotten password. - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - */ +/** + * Elgg forgotten password. + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ - $form_body = "<p>" . elgg_echo('user:password:text') . "</p>"; - $form_body .= "<p><label>". elgg_echo('username') . " " . elgg_view('input/text', array('internalname' => 'username')) . "</label></p>"; - $form_body .= elgg_view('input/captcha'); - $form_body .= "<p>" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "</p>"; +$form_body = "<p>" . elgg_echo('user:password:text') . "</p>"; +$form_body .= "<p><label>". elgg_echo('username') . " " . elgg_view('input/text', array('internalname' => 'username')) . "</label></p>"; +$form_body .= elgg_view('input/captcha'); +$form_body .= "<p>" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "</p>"; ?> <div class="contentWrapper"> - <?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/user/requestnewpassword", 'body' => $form_body)); ?> +<?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/user/requestnewpassword", 'body' => $form_body)); ?> </div>
\ No newline at end of file diff --git a/views/default/account/forms/login.php b/views/default/account/forms/login.php index 030375a19..189431698 100644 --- a/views/default/account/forms/login.php +++ b/views/default/account/forms/login.php @@ -1,37 +1,35 @@ <?php +/** + * Elgg login form + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ - /** - * Elgg login form - * - * @package Elgg - * @subpackage Core +global $CONFIG; - * @author Curverider Ltd +$form_body = "<p class=\"loginbox\"><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea')) . "</label>"; +$form_body .= "<br />"; +$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea')) . "</label><br />"; +$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . " <div id=\"persistent_login\"><label><input type=\"checkbox\" name=\"persistent\" value=\"true\" />".elgg_echo('user:persistent')."</label></div></p>"; +$form_body .= "<p class=\"loginbox\">"; +$form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . "</a> | " : ""; +$form_body .= "<a href=\"{$vars['url']}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>"; - * @link http://elgg.org/ - */ - - global $CONFIG; - - $form_body = "<p class=\"loginbox\"><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea')) . "</label>"; - $form_body .= "<br />"; - $form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea')) . "</label><br />"; - $form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . " <div id=\"persistent_login\"><label><input type=\"checkbox\" name=\"persistent\" value=\"true\" />".elgg_echo('user:persistent')."</label></div></p>"; - $form_body .= "<p class=\"loginbox\">"; - $form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . "</a> | " : ""; - $form_body .= "<a href=\"{$vars['url']}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>"; - - $login_url = $vars['url']; - if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) - $login_url = str_replace("http", "https", $vars['url']); +$login_url = $vars['url']; +if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) { + $login_url = str_replace("http", "https", $vars['url']); +} ?> - - <div id="login-box"> - <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>
\ No newline at end of file + +<div id="login-box"> +<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>
\ No newline at end of file diff --git a/views/default/account/forms/register.php b/views/default/account/forms/register.php index 8ceeaab8f..99fdea272 100644 --- a/views/default/account/forms/register.php +++ b/views/default/account/forms/register.php @@ -1,45 +1,43 @@ <?php +/** + * Elgg register form + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ - /** - * Elgg register form - * - * @package Elgg - * @subpackage Core - - * @author Curverider Ltd - - * @link http://elgg.org/ - */ - - $username = get_input('u'); - $email = get_input('e'); - $name = get_input('n'); - - $admin_option = false; - if (($_SESSION['user']->admin) && ($vars['show_admin'])) - $admin_option = true; - - $form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name', 'class' => "general-textarea", 'value' => $name)) . "</label><br />"; - - $form_body .= "<label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email', 'class' => "general-textarea", 'value' => $email)) . "</label><br />"; - $form_body .= "<label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username', 'class' => "general-textarea", 'value' => $username)) . "</label><br />"; - $form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password', 'class' => "general-textarea")) . "</label><br />"; - $form_body .= "<label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2', 'class' => "general-textarea")) . "</label><br />"; - - // Add captcha hook - $form_body .= elgg_view('input/captcha'); - - if ($admin_option) - $form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option')))); - - $form_body .= elgg_view('input/hidden', array('internalname' => 'friend_guid', 'value' => $vars['friend_guid'])); - $form_body .= elgg_view('input/hidden', array('internalname' => 'invitecode', 'value' => $vars['invitecode'])); - $form_body .= elgg_view('input/hidden', array('internalname' => 'action', 'value' => 'register')); - $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>"; +$username = get_input('u'); +$email = get_input('e'); +$name = get_input('n'); + +$admin_option = false; +if (($_SESSION['user']->admin) && ($vars['show_admin'])) { + $admin_option = true; +} + +$form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name', 'class' => "general-textarea", 'value' => $name)) . "</label><br />"; + +$form_body .= "<label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email', 'class' => "general-textarea", 'value' => $email)) . "</label><br />"; +$form_body .= "<label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username', 'class' => "general-textarea", 'value' => $username)) . "</label><br />"; +$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password', 'class' => "general-textarea")) . "</label><br />"; +$form_body .= "<label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2', 'class' => "general-textarea")) . "</label><br />"; + +// Add captcha hook +$form_body .= elgg_view('input/captcha'); + +if ($admin_option) { + $form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option')))); +} + +$form_body .= elgg_view('input/hidden', array('internalname' => 'friend_guid', 'value' => $vars['friend_guid'])); +$form_body .= elgg_view('input/hidden', array('internalname' => 'invitecode', 'value' => $vars['invitecode'])); +$form_body .= elgg_view('input/hidden', array('internalname' => 'action', 'value' => 'register')); +$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>"; ?> - - <div id="register-box"> - <h2><?php echo elgg_echo('register'); ?></h2> - <?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/register", 'body' => $form_body)) ?> - </div>
\ No newline at end of file +<div id="register-box"> +<h2><?php echo elgg_echo('register'); ?></h2> +<?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/register", 'body' => $form_body)) ?> +</div>
\ No newline at end of file diff --git a/views/default/account/forms/useradd.php b/views/default/account/forms/useradd.php index dac31a692..09b4c4718 100644 --- a/views/default/account/forms/useradd.php +++ b/views/default/account/forms/useradd.php @@ -1,32 +1,33 @@ <?php - /** - * Elgg add user form. - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - */ +/** + * Elgg add user form. + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ - $admin_option = false; - if (($_SESSION['user']->admin) && ($vars['show_admin'])) - $admin_option = true; - - $form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name')) . "</label></p>"; - - $form_body .= "<p><label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email')) . "</label></p>"; - $form_body .= "<p><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username')) . "</label></p>"; - $form_body .= "<p><label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password')) . "</label></p>"; - $form_body .= "<p><label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2')) . "</label></p>"; - - if ($admin_option) - $form_body .= "<p>" . elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option')))); - - $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>"; +$admin_option = false; +if (($_SESSION['user']->admin) && ($vars['show_admin'])) { + $admin_option = true; +} + +$form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name')) . "</label></p>"; + +$form_body .= "<p><label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email')) . "</label></p>"; +$form_body .= "<p><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username')) . "</label></p>"; +$form_body .= "<p><label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password')) . "</label></p>"; +$form_body .= "<p><label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2')) . "</label></p>"; + +if ($admin_option) { + $form_body .= "<p>" . elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option')))); +} + +$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>"; ?> - - <div id="add-box"> - <h2><?php echo elgg_echo('adduser'); ?></h2> - <?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/useradd", 'body' => $form_body)) ?> - </div>
\ No newline at end of file +<div id="add-box"> +<h2><?php echo elgg_echo('adduser'); ?></h2> + <?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/useradd", 'body' => $form_body)) ?> +</div>
\ No newline at end of file |