diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-08 12:14:17 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-08 12:14:17 +0000 |
commit | 10f233a2e2a11416413585ceadafa0d7b07988bc (patch) | |
tree | 4dc3c0093d0c0c97cfcf88e7d89292341325350a /views/default/account/forms | |
parent | cef25136b69582dc9e6efd95284f4f3e40b7a53f (diff) | |
download | elgg-10f233a2e2a11416413585ceadafa0d7b07988bc.tar.gz elgg-10f233a2e2a11416413585ceadafa0d7b07988bc.tar.bz2 |
Refs #211: Two forms converted + extra functionality to input views
git-svn-id: https://code.elgg.org/elgg/trunk@1790 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/account/forms')
-rw-r--r-- | views/default/account/forms/forgotten_password.php | 10 | ||||
-rw-r--r-- | views/default/account/forms/login.php | 21 |
2 files changed, 18 insertions, 13 deletions
diff --git a/views/default/account/forms/forgotten_password.php b/views/default/account/forms/forgotten_password.php index 18a9888fd..24c2df2f0 100644 --- a/views/default/account/forms/forgotten_password.php +++ b/views/default/account/forms/forgotten_password.php @@ -9,11 +9,11 @@ * @copyright Curverider Ltd 2008 * @link http://elgg.org/ */ + + $form_body = "<p>" . elgg_echo('user:password:text') . "</p>"; + $form_body .= "<p><b>". elgg_echo('username') . "</b> " . elgg_view('input/text', array('internalname' => 'username')) . "</p>"; + $form_body .= "<p>" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "</p>"; ?> <div id="forgotten_box"> - <form action="<?php echo $vars['url']; ?>actions/user/requestnewpassword" method="post"> - <p><?php echo elgg_echo('user:password:text'); ?></p> - <p><b><?php echo elgg_echo('username'); ?></b> <?php echo elgg_view('input/text', array('internalname' => 'username')); ?></p> - <p><input type="submit" name="submit" class="submit_button" value="<?php echo elgg_echo('request'); ?>" /></p> - </form> + <?php echo elgg_view('input/form', array('action' => "{$vars['url']}actions/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 ea37ff692..7afef1404 100644 --- a/views/default/account/forms/login.php +++ b/views/default/account/forms/login.php @@ -11,15 +11,20 @@ * @link http://elgg.org/
*/
- global $CONFIG;
+ global $CONFIG; + + $form_body = "<p><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'general-textarea')) . "</label>"; + $form_body .= "<br />"; + $form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'general-textarea')) . "</label><br />"; + $form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . "</p>"; + $form_body .= "<p>"; + $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>"; + + //<input name=\"username\" type=\"text\" class="general-textarea" /></label>
?>
<div id="login-box">
<h2><?php echo elgg_echo('login'); ?></h2> - <form action="<?php echo $vars['url']; ?>action/login" method="POST">
- <p><label><?php echo elgg_echo('username'); ?><br /><input name="username" type="text" class="general-textarea" /></label>
- <br />
- <label><?php echo elgg_echo('password'); ?><br /><input name="password" type="password" class="general-textarea" /></label><br />
- <input type="submit" name="submit" class="submit_button" value="<?php echo elgg_echo('login'); ?>" /></p>
- <p><?php if (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) { ?><a href="<?php echo $vars['url']; ?>account/register.php"><?php echo elgg_echo('register'); ?></a> : <?php } ?> <a href="<?php echo $vars['url']; ?>account/forgotten_password.php"><?php echo elgg_echo('user:password:lost'); ?></a></p>
- </form>
+ <?php echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/login")); ?> +
</div>
\ No newline at end of file |